Home Dynamically assign rails default locale
Reply: 0

Dynamically assign rails default locale

Jerome
1#
Jerome Published in 2017-12-07 13:48:05Z

Rails has parameters to determine which languages are to be used for i18n applications

config.i18n.default_locale = :en
config.i18n.available_locales = [:gr, :en, :ru, :de]

An application is a bucket for different owners, who might have different default and available locales.

Assuming there is an Owner class, how can these values be set and thus used across all class objects owned by the [ahem] owner ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.33192 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO