Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

zcpdog/rails-i18n

 
 

Repository files navigation

Build Status

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

Gem installation

Add to your Gemfile:

gem 'rails-i18n', '~> 4.0.0.pre' # For 4.0.xgem 'rails-i18n', '~> 3.0.0.pre' # For 3.x

or run this command:

gem install rails-i18n -v '~> 4.0.0.pre' # For 4.0.xgem install rails-i18n -v '~> 3.0.0.pre' # For 3.x

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

Configuration

By defaultrails-i18n loads all locale files, pluralization andtransliteration rules available in the gem. This behaviour can be changed, if youspecify inconfig/environments/* the locales which have to be loaded viaI18n.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 directoryrails/locale and put them into theconfig/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, visitRails Internationalization (I18n) API on theRailsGuides.

Usage on Rails 2.3

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

Available Locales

Available locales are:

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

Following locales are complete:

bs, da, en, hr, is, ja, sr

Following locales have some missing translations or pluralizations:

af, ar, az, bg, bn, ca, cs, cy, da, de, de-AT, de-CH, el, en-AU, en-CA, en-GB, en-IN, en-NZ, en-IE, eo,es, es-419, es-AR, es-CL, es-CO, es-MX, es-PE, es-VE, et, eu, fa, fi, fr, fr-CA, fr-CH, gl,he, hi, hi-IN, hu, id, is, it, it-CH, kn, ko, lo, lt, lv, mk, mn, nb,ne, nl, nn, or, pl, pt, pt-BR, rm, ro, ru, sk, sl, sv, sw, th,tl, tr, uk, uz, vi, wo, zh-CN, zh-HK, zh-TW

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 theGist.
  • Open an issue with reference to the Gist you created.

Fetch therails-i18n repository

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

Create or edit your locale file

  • Have a look inrails/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.yml rails/locale/YOUR_NEW_LOCALE.yml

You can list all complete and incomplete locales:

thor locales:completethor locales:incomplete

Also, you can list all available locales:

thor locales:list

Edit README.md

Add your locale name to the list inREADME.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

Seehttps://github.com/svenfuchs/rails-i18n/contributors

Special thanks

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp