Lexicon and namespace not working

Hello fellow ModXians,

i setup a namespace and lexicons in two languages according to this information: Internationalization - modmore documentation
and Using lexicons in MODx | lux-medien.

Cleared the cache.

But the lexicon entries won’t show up in the backend.

Question: Do I have a wrong expection of the behaviour?

Where exactly don’t they show up? Under :gear: → “Lexicons” (manager/?a=workspaces/lexicon) or when you try to use the entries as tags ([[%...]])?

@halftrainedharry I am sorry to have spared the most crucial information. The entries do not appear in the backend / lexicons with the given namespace/topic. It also does not appear when using the [[%…]] entry in the frontend.

I “call” the lexicon by a plugin:

<?php $modx->controller->addLexiconTopic('testnamespace:default'); "OnDocFormRenderer". Thanks for further assistance.

So probably a file name or path is incorrect. Maybe also check the capitalization.


The namespace should be like
“Name” = testnamespace
“Core Path” = {core_path}components/testnamespace/

Then in the folder core/components/testnamespace/lexicon/en/ create a file with the name default.inc.php and content like

<?php
$_lang['test_key'] = 'Test Value';
1 Like

Thank you @halftrainedharry. It was indeed a wrong bracket…