<![CDATA[ Multi-lingual chunks? - My Forums]]> https://forums.modx.com/thread/?thread=28840 <![CDATA[Re: Multi-lingual chunks?]]> https://forums.modx.com/thread/28840/multi-lingual-chunks#dis-post-155102 I’ll have a look at this and if I run into any kind of problem, I’ll get back here.
But it sounds very doable.

Thanks again.]]>
paz Jul 28, 2009, 01:59 AM https://forums.modx.com/thread/28840/multi-lingual-chunks#dis-post-155102
<![CDATA[Re: Multi-lingual chunks?]]> https://forums.modx.com/thread/28840/multi-lingual-chunks#dis-post-155101
In your chunk:

[[%lexicon_entry_key? &topic=`topicName` &namespace=`namespaceName`]]


So, say you put all your langauge files in the ’mysite’ Namespace (Namespaces can be used to group lexicon entries and topics), and had a Topic called ’sports’. You can create as many Topics as you like. Say you want to grab the Lexicon Entry with the key ’welcome_message’ from the Topic ’sports’.

You’d then put this in your chunk:

[[%welcome_message? &topic=`sports` &namespace=`mysite`]]


This would then render the translation (depending on what language you’ve initialized that Context in) for the Lexicon Entry ’welcome_message’. It would also load the ’sports’ Topic and ’mysite’ Namespace. You only need to load the Topic/Namespace once on a page.

MODx recommends you prefix your Lexicon Entries with some prefix to distinguish them from other Components Lexicon Entries. But you can do it however you want. smiley

Please read the Internationalization Documentation for Revolution for more information.]]>
splittingred Jul 27, 2009, 10:52 AM https://forums.modx.com/thread/28840/multi-lingual-chunks#dis-post-155101
<![CDATA[Multi-lingual chunks?]]> https://forums.modx.com/thread/28840/multi-lingual-chunks#dis-post-155100 Now with MODx Revolution 2.0 that’s going to be a lot easier, but we just ran into one issue that sounds small, but can become a very big one:
The chunks...

Now there’s a few things that can be done:
1. If necessary, replace chunks with snippets to make its content variable. However, this would make a mess of the list of snippets.
2. Make language named copies of the chunks, so "chunk" becomes "chunk-en", "chunk-de" and "chunk-nl", however this would make the list of chunks huge.

So I was wondering if there really isn’t any other way to do this?

Help would be highly appreciated!]]>
paz Jul 27, 2009, 10:42 AM https://forums.modx.com/thread/28840/multi-lingual-chunks#dis-post-155100