Best habits on how to work with Lexicons?

I’ve been looking into the use of lexicons on a multilingual site to handle for example a link to the contact page in a template without having to create that template for each language.

After reading Internationalization - Extending MODX | MODX Documentation I have a basic understanding on how to use lexicons, but a few questions still exist:

  1. Is it recommended/necessary to create a custom Namespace for all my own new lexicon entries? If I would use an existing namespace from i. e. Babel, would that get reset/deleted if I update/remove that extra?

  2. How can I create a new Topic for a lexicon? It seems I can only choose from a pre-defined selection, or is that intentional?

  3. A similar way of achieving the needed would also be to create context specific System Settings. Is there any reason that method should be picked over creaating lexicons? The only difference I can see so far, is that System Settings are a bit more tedious to setup.

Thanks in advance!

I don’t know if you can create a new topic in the manager.

But if you create a file in the folder core/components/my_namespace/lexicon/en with your lexicon strings, then it should show them in the manager under the topic mytopic.

I have also used the extra ClientConfig for context specific settings. It’s probably easier for your client to change values with ClientConfig than in the system settings.

1 Like