grosser / gettext_i18n_rails

Rails: FastGettext, I18n integration -- simple, threadsafe and fast!
MIT License
268 stars 91 forks source link

How to handle multiple variations of the same language? #133

Open coffeebite opened 9 years ago

coffeebite commented 9 years ago

I am supporting multiple versions of Portuguese in my app -> pt-PT and pt-BR.

How would one handle this situation? The plugin seems to support 2 letter language names only.

grosser commented 9 years ago

pt_PT should work

coffeebite commented 9 years ago

Thanks.

— Love, laughter Nitesh

On Sun, Apr 12, 2015 at 8:18 AM, Michael Grosser notifications@github.com wrote:

pt_PT should work

Reply to this email directly or view it on GitHub: https://github.com/grosser/gettext_i18n_rails/issues/133#issuecomment-92078393

kalsan commented 1 year ago

This does not appear to work for Rails 7. My config is:

# config/initializers/fast_gettext.rb

FastGettext.default_available_locales = %w[de-CH]
FastGettext.default_text_domain = 'app'
# locale/de_CH/app.po

msgid "Configuration"
msgstr "Konfiguration"

rails c
Loading development environment (Rails 7.0.4)
irb(main):001:0> I18n.locale
=> :"de-CH"
irb(main):002:0> _('Configuration')
=> "Configuration"
irb(main):003:0> I18n.t 'Configuration'
=> "translation missing: de-CH.Configuration"
``
kalsan commented 1 year ago

Hello, is there any update on this?