|Can Spree support multiple locale concurrently?||femto||3/21/12 8:22 AM|
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||3/21/12 8:37 AM|
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||3/21/12 9:03 AM|
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! :)
|Re: [spree-user] Can Spree support multiple locale concurrently?||femto||3/22/12 9:49 AM|