|Can Spree support multiple locale concurrently?||femto||21.03.12 08:22|
Hello guys, I've seen the spree i18n doc
it refers to user locale(in currency formating section:)
Currency formatting is therefore dictated by the current user locale (if locale is allowed to change) or the default locale (as above) if locale is fixed
so can spree support concurrently multiple locale
like mentioned in agile web development with rails book,
it seemed from documentation you just set
Spree::Config.default_locale, so at any time,
the final site will have one locale, can't be switched by user,
(what does user locale mean anyway? I can't find in spree documentation).
besides, setting Spree::Config.default_locale = "zh-CN",
then I18n.locale still equals :en which is confused, do I need to setting I18n.locale as well?
besides, and even if the sites supports two locale concurrently, from documentation
says it will be considered in later releases, how is it current status? Because
changing locale in more site of course relate problem to counrrency exchange.
|Re: [spree-user] Can Spree support multiple locale concurrently?||Ryan Bigg||21.03.12 08:37|
Spree doesn't currently support the locale routing like that, but with the upcoming https://github.com/jipiboily/spree_multi_lingual gem it will.
Spree::Config.default_locale is setting the *default* locale for people. This determines what locale Spree will display in when they visit it without any locale scoping what so ever. This setting does not change I18n.locale. You would need to set this in a before_filter of your controller some how.
We're currently working on adding better language support to Spree. It's not quite there yet.
|Re: [spree-user] Can Spree support multiple locale concurrently?||Jean-Philippe Boily||21.03.12 09:03|
just like Ryan just told you, I started work on a gem but had no time to put on that recently. Luckily, sbounmy did work on his fork (https://github.com/sbounmy/spree_multi_lingual). I just updated my repo with his great work. I encourage you to take a look at it, try it and if you need some more features you are encouraged to add them and make a pull request! :)
As Ryan said, you will have to take care of I18n.locale with a before_filter, nothing major here. You will also have to handle make a language switching nav on your own as it is not yet part of spree_multi_lingual.
Good luck! :)
Le mercredi 21 mars 2012 à 11:37, Ryan Bigg a écrit :
|Re: [spree-user] Can Spree support multiple locale concurrently?||femto||22.03.12 09:49|