Rails 4 multidomain application with locale set for each domain i18n locale -
In a Rail 4 Multidomain app, I will need a set of local files (3 domains total) for 4 languages for each domain.
Some translations overlap between domains, but some of them are very specific, so I'm thinking of a structure that would be something like this:
< Code> config / locase / nnlf.iml.dinl.it.iml # All domain config / locale / domain1 / nnlf IML. D.M.L. have been raised by. Domains taken by domain 1 config / locale / domain 2 / n.imil.fr.yml ..de.yml ..it.yml # have been taken by 2 domains / config / locales / domain3 / en.yml. .fr.yml ..de.yml ..it.yml # This domain has been raised by 3Is it possible in Rail 4? And if so, what would be the best way to go about this setup?
In
config / application you will have:
some_domain = Rails.root.basename.to_s # This will give us "myapp.com" if the app is in "/ var / www / myapp" .com "config.i18n.load_path + = Dir [Rails.root. To_s]
This will load only the required files and should em> will overwrite any duplicate key with subsequent data, but I have not checked that bit.
Comments
Post a Comment