svenfuchs/rails-i18n — pull request #261 by samleb (2012-12-20 12:00:23+00:00)
Title: Using region code prevents from loading pluralization rules

I'm currently adding support for localizing an application in Chinese.
There are two different YAML files for Chinese:
* `rails/locale/zh-CN.yml`
* `rails/locale/zh-TW.yml`

On the other hand, there's only one ruby file defining Chinese pluralization rules:
* `rails/pluralization/zh.rb`

As our application should be translated in China Chinese (instead of Taiwan Chinese), I'm tempted to use:
```ruby
I18n.available_locales += [:"zh-CN"]
```
But then, when playing in the console:
```ruby
I18n.locale = :"zh-CN"
I18n.translate("i18n.plural.rule")
# => "translation missing: zh-CN.i18n.plural.rule"
```

The problem here is that the Railtie only loads files with the exact locale including region as basename, therefore loading `rails/locale/zh-CN.yml`, but not `rails/pluralization/zh.rb`, which would define the pluralization rules for the `zh` locale anyway (without region).

One straightforward solution is for the developer to copy the `rails/pluralization/zh.rb` to the application's `config/locales` directory (or anywhere on the `I18n.load_path`) and change it to:
```ruby
require 'rails_i18n/common_pluralizations/other'

# Change :zh to :"zh-CN"
::RailsI18n::Pluralization::Other.with_locale(:"zh-CN")
```

Another solution would be to add add those files to the rails-i18n project which would be IMHO simpler and less surprinsing for the application developer.
What's your opinion about this ? Is this documented anywhere ?