The full version of a Revolution language tag is:
[[%LanguageStringKey? &namespace=`NameSpaceName` &topic=`TopicName`]].
If you leave out the parameters and just use [[%LanguageStringKey]], the default namespace (core) and the default topic (default) will be used. So if the string you’re looking for isn’t in that namespace and topic, it could be your problem.
Try this:
[[%login.username? &namespace=`login` &topic=`default`]].
Ok I understand it better now.
I’m still confused why in the docs [[%register.username]] is used while it should be [[%login.username? &namespace=`login` &topic=`register`]] when you use the login module.
I also don’t understand how the [[+error.username]] does seem to work while I can’t seemed to find any topic named error in any namespace or is this some kind of general error string located elsewhere?
Anyway thank you very much for your quick replies I’m working against a deadline and I’m new to modx so your help is really appreciated.
Can you give me the URL of the documentation where you saw this?
AFAIK, there is no register.username language string, only login.username.
Try just using [[%login.username]] and let me know if it works. The snippet may load the appropriate topic for you.
The reason that [[+error.username]] works is that it is a placeholder set in the snippet, not a language string.
Quote from: stofke72 at Jul 30, 2010, 03:28 AM
I saw this here. http://svn.modxcms.com/docs/display/ADDON/Register.Example+Form+1
And when I check the Lexicon Management indeed there is no register.username to be found, yet using [[%register.username? &namespace=`login` &topic=`register`]] seems to get translated just fine.
I wonder how this is possible? It seems it takes it’s value from login.username instead as that is the only string I translated that I can find.
I see that the login namespace has a "register" topic as well as a "default" one. I didn’t notice that before.
I went to correct the example, but Shaun has beat me to it.