Closed hopewise closed 10 years ago
Ok, we should move setting the I18n.locale
into Alchemy::BaseController
, so it not always sets the locale globally in any controller. I will fix this in a sec.
But besides that, you should always ensure that you have matching languages in your app and in Alchemy, so that the content from Alchemy and your App's locales is always in sync.
Yea, but my matching language for English is 'en' while, for Alchemy, its 'en-us' I already have popular links for my website using /en/ so, I have to stick with /en/ rather than /en-us/ Can I keep my en locale to serve my existing app and set en-us for the CMS to en too?
May be its a good idea to give the hosting app a chance to have a callback for set_alchemy_language of the CMS, for ex: my existing app always needs to set locale upon forced locale in urls.
Please inform me when you re-scope it locally into the CMS.
Any reason why are you using en-us for the Alchemy language?
Why not also just use en for it? The country code part is completely optional.
I am already setting it to en at alchemy config, I don't know why it get en-us On Mar 15, 2014 12:06 PM, "Thomas von Deyen" notifications@github.com wrote:
Any reason why are you using en-us for the Alchemy language?
Why not also just use en for it? The country code part is completely optional.
Reply to this email directly or view it on GitHubhttps://github.com/magiclabs/alchemy_cms/issues/492#issuecomment-37720161 .
The config setting is only relevant while seeding the default language.
You can always change the settings of all languages in the languages module.
Can I change the settings of all languages in the languages module while I am using the CMS within my existing rails app? sorry, as it seems easy thing to do, but I am not sure how to this..
The Languages module only manages the alchemy languages. They are not related to the locales from your host app. These are completely different things.
So yes, you change the alchemy languages independent from your apps locales. But you should keep them in sync. Meaning, you should have a language (and therefore a language page tree) for every locale in your app. So that you can manage translated pages for each of them.
I hope that clears things up a little bit.
Thanks for clarification, I will read about it, meanwhile I will wait the fix you've mentioned in this post..
Good luck On Mar 15, 2014 3:31 PM, "Thomas von Deyen" notifications@github.com wrote:
The Languages module only manages the alchemy languages. They are not related to the locales from your host app. These are completely different things.
So yes, you change the alchemy languages independent from your apps locales. But you should keep them in sync. Meaning, you should have a language (and therefore a language page tree) for every locale in your app. So that you can manage translated pages for each of them.
I hope that clears things up a little bit.
Reply to this email directly or view it on GitHubhttps://github.com/magiclabs/alchemy_cms/issues/492#issuecomment-37723526 .
The fix already landed. So please try it and report back.
Thanks, the fix worked.
On Sat, Mar 15, 2014 at 3:39 PM, Thomas von Deyen notifications@github.comwrote:
The fix already landed. So please try it and report back.
Reply to this email directly or view it on GitHubhttps://github.com/magiclabs/alchemy_cms/issues/492#issuecomment-37723679 .
Samir Sabri Software Architect& Developer www.dcaclab.com Jordan-Middle East
Great
In my ApplicationController I have
Which I need to read locale from url ex:
/en/
but I found that settingI18n.locale
no more effect my app locale, after investigation, I found thatlib/alchemy/controller_actions.rb:95
inset_alchemy_language
would override my setting in set_locale before_filterEven if I am at my existing app routes, set_alchemy_language will be called and override any set_locale filter, before I discovered this, I posted a question that has more details here http://stackoverflow.com/questions/22353229/how-to-force-locale-in-routes
Please tell me how to fix this, visiting http://lvh.me:3000/ will result into: