Hi all,
I have a weird issue with my lexicon. I have a website translated in quite a few languages, but focusing on English/Chinese for now.
I have for example a lexicon entry whose key is 'name', English is "Name" and Chinese is "姓名".
If I clear the cache and reset the lexicon, the lexicon is properly generated. I got the proper value for English context or Chinese context.
Now, if I switched context (without clearing the cache), I always get the previous value (ie, if after clearing the cache, I load the English context, then switch to Chinese, the value for 'name' will be "Name" not "姓名").
I tried different syntax:
- [[%name? &namespace=`quote`]]
- [[%name? &namespace=`quote` &language=`[[++cultureKey]]`]]
I think they are equivalent, as (I assume), the language used for the lexicon is set by the cultureKey system setting.
Any idea ? Am I doing it wrong ?
ah, first syntax is %name? &namespace=`quote` (for some reasons it doesn't show in the post if I put the brackets)
Additional information as I'm investigating:
- the chunk that calls the lexicon entry seems to be cached uniquely for one context. If I put [++cultureKey] somewhere in it, clear the cache, load the page in Chinese, I see "zh" (which is correct), if I load the English version, I still see "zh", even though the cultureKey should be "en".
-
☆ A M B ☆
- 24,524 Posts
This forum is a native MODx application; if you post MODx tags it thinks it's supposed to actually use them. To post code or tags, use the code tags from the post editing tool bar (the little < > button).
Ah, I'm a loser.
The chunk is called in a snippet, not with $chunk.
And I manually cached that.
Sorry for that :/