-
☆ A M B ☆
- 279 Posts
Hi all,
I’m a little bit new to MODx but I realy love it!
For a customer I build the new website in MODx-Revo 2.0.3 and I want to know how I can load different language lexicon entries. My resource-structure is like this simple setup;
English (en)
-- Home
-- Contact
Dutch (nl)
-- Home
-- Contact
I have everything like the menu etc. already done but now I want to use the Login snippets also but the lexicon entries needs to be changed when I switched from English to Dutch (for example). The Login lexicon entries for Dutch do I have translated but I don’t know how I could load the right lexicon set.
I also made a little snippet wich finds the language parent and figures out the alias (= language code) for the pages. This snippet will be called by a plugin, onWebPagePrerender. But next? I don’t know! I’ve tried something with the ’cultureKey’ but he’s caching the lexicon entries so on English it could be Dutch and vice versa
Could anyone help me a little bit more?
Regards, Bert
All you need to do is add the ’cultureKey’ Context Setting for each context and set it to the IANA country code you want to load, eg: ’en’ or ’nl’ or ’de’. The scripts should handle the rest.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
-
☆ A M B ☆
- 279 Posts
Okay, but I have just one context..