add dialect support

Looks good Mix. Can you chat Monday after lunch sometime?


On Sat, Jul 26, 2014 at 9:12 PM, mix irving <notifications@github.com>
wrote:

> In config/application.rb:
>
> > @@ -43,7 +43,12 @@ class Application < Rails::Application
> >      # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
> >      # config.i18n.default_locale = :de
> >
> > -    config.i18n.fallbacks = true
> > +    fallback_tree = {
> > +      :pt => :'pt_BR',
> > +      :zh => :'zh_TW',
> > +      :ca => :es
> > +    }
> > +    config.i18n.fallbacks = [:en, fallback_tree]
>
> @robguthrie <https://github.com/robguthrie> here's a starter.
> We need all locales to use either - or _ . If we use -, then all the
> locales will be ugly symbol-strings :'zh-TW' ... I think the better
> option might be to add something which converts all the locale strings
> nabbed by http_accept_language to the underscore version.
>
> Also want to have a brief chat in person about strings versus symbols in
> the locale context
>
> confirming the fallbacks:
>
> [9] pry(main)> I18n.fallbacks[:pt]=> [:pt, :pt_BR, :en][10] pry(main)> I18n.t('about_loomio', locale: :pt)=> "Sobre o Loomio"[11] pry(main)> I18n.t('about_loomio', locale: :pt_BR)=> "Sobre o Loomio"
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/loomio/loomio/pull/1571/files#r15432945>.
>