add dialect support

Mix fallbacks are handled by the I18N lib. See config.i18n.fallbacks




On Fri, Jul 25, 2014 at 11:22 PM, mix irving <notifications@github.com>
wrote:

> In app/helpers/locales_helper.rb:
>
> > +    if user_signed_in?
> > +      best_available_locale
> > +    else
> > +      best_cachable_locale
> > +    end
> > +  end
> > +
> > +  def best_available_locale
> > +    selected_locale || detected_locale || default_locale
> > +  end
> > +
> > +  def best_cachable_locale
> > +    selected_locale || default_locale
> > +  end
> > +
> > +  def locale_fallback(first, second = nil)
>
> @robguthrie <https://github.com/robguthrie> this is the only place I saw
> anything mentioning fallback. You said something about wanting to create a
> fallback tree for languages.
> I imagined that with a locale like like :zh this would mean that the app
> would know that :zh_TW should be tried before :en. Same with :pt and
> :pt_BR. I guess when you said somethinkg like 'tree' I imagined a hash
> with some safe fallbacks which might be referenced when best
> Was this what you were thinking. If so did you have a place/method in mind
> for this?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/loomio/loomio/pull/1571/files#r15396308>.
>