GithubHelp home page GithubHelp logo

rynqs / rails-i18n Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svenfuchs/rails-i18n

0.0 2.0 0.0 1.83 MB

Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff

Home Page: http://rails-i18n.org

License: MIT License

rails-i18n's Introduction

Rails Locale Data Repository

Build Status

Central point to collect locale data for use in Ruby on Rails.

Gem installation

Add to your Gemfile:

gem 'rails-i18n'

or run this command:

gem install rails-i18n

Note that your rails version must be 3.0 or higher if you want to install rails-i18n as a gem. For rails 2.x, install it manually as described below.

Configuration

By default rails-i18n loads all locale files, pluralization and transliteration rules available in the gem. This behaviour can be changed, if you specify in config/environments/* the locales which have to be loaded via I18n.available_locales option:

config.i18n.available_locales = ['es-CO', :de]

or

config.i18n.available_locales = :nl

Manual installation

Download the locale files that are found in the directory rails/locale and put them into the config/locales directory of your Rails application.

If any translation doesn't suit well to the requirements of your application, edit them or add your own locale files.

For more information, visit Rails Internationalization (I18n) API on the RailsGuides.

Usage on Rails 2.3

Locale data whose structure is compatible with Rails 2.3 are available on the separate branch rails-2-3.

Available Locales

Available locales are:

ar, az, bg, bn-IN, bs, ca, cs, csb, cy, da, de, de-AT, de-CH, dsb, el, en-AU, en-CA, en-GB, en-IN, en-US, eo, es, es-AR, es-CL, es-CO, es-MX, es-PE, es-VE, et, eu, fa, fi, fr, fr-CA, fr-CH, fur, gl-ES, gsw-CH, he, hi, hi-IN, hr, hsb, hu, id, is, it, ja, kn, ko, lo, lt, lv, mk, mn, nb, ne, nl, nn, pl, pt-BR, pt-PT, rm, ro, ru, sk, sl, sr, sr-Latn, sv-SE, sw, th, tl, tr, uk, uz, vi, wo, zh-CN, zh-TW

Following locales are complete:

az, bg, bs, ca, csb, da, de, de-AT, de-CH, el, en-AU, en-CA, en-GB, en-IN, en-US, eo, es, es-AR, es-CL, es-CO, es-MX, es-VE, et, eu, fa, fi, fr, fr-CA, fr-CH, fur, gsw-CH, he, hi, hi-IN, hr, hu, is, it, ja, kn, ko, lv, mn, nb, ne, nl, pt-BR, pt-PT, ru, sk, sv-SE, sw, th, tl, tr, uk, uz, vi, wo, zh-CN, zh-TW

Following locales have some missing translations or pluralizations:

ar, bn-IN, cs, cy, dsb, es-PE, gl-ES, hsb, id, lo, lt, mk, nn, pl, rm, ro, sl, sr, sr-Latn

We always welcome your contributions!

How to contribute

Quick contribution

If you are familiar with GitHub operations, follow the procedures described in the subsequent sections.

If you are not,

  • Save your locale data on the Gist.
  • Open an issue with reference to the Gist you created.

Fetch the rails-18n repository

  • Get a github account and Git program if you haven't. See Help.Github for instructions.
  • Fork svenfuchs/rails-i18n repository and clone it into your PC.

Create or edit your locale file

  • Have a look in rails/locale/en-US.yml, which can be used as the base of your translation. Note that we use &errors_messages and <<: *errors_messages to anchor and merge a part of translation data.
  • Create or edit your locale file. Please pay attention to save your files as UTF-8.

Test your locale file

Before committing and pushing your changes, test the integrity of your locale file.

rake spec

Make sure you have included all translations with:

rake i18n-spec:completeness rails/locale/en-US.yml rails/locale/YOUR_NEW_LOCALE.yml

You can list all complete locales:

thor locales:complete

Also, you can list all available locales:

thor locales:list

Edit README.md

Add your locale name to the list in README.md if it isn't there.

Send pull request

If you are ready, push the repository into the Github and send us a pull request.

We will do the formality check and publish it as quick as we can.

See also

License

MIT

Contributors

See https://github.com/svenfuchs/rails-i18n/contributors

Special thanks

Tsutomu Kuroda for untiringly taking care of this repository, issues and pull requests

rails-i18n's People

Contributors

kuroda avatar tigrish avatar ariejan avatar yaroslav avatar amatsuda avatar digitalex avatar jofi avatar nashbridges avatar pama avatar huerlisi avatar kfl62 avatar nkokkos avatar tomhughes avatar weppos avatar ozataman avatar tsechingho avatar sikachu avatar matthewtodd avatar rbarazi avatar hron84 avatar netzpirat avatar ncr avatar andrewradev avatar rosenfeld avatar zencocoon avatar karmi avatar jana4u avatar edgarjs avatar victormartins avatar szymon-jez avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.