Hi,
I am having trouble getting texts that are ‘generated’ code properly translated. Form the documentation it states one can use the MessageTools but I am unable to get it working. It seems that it does not find anything and as a result the texts are not translated.
In fact, MessageTools.loadString() is more an internal tool, and you usually don’t need it. It’s for loading messages by keys specified in XML with “msg://” prefix or without it.
If you know a message pack and a key, use Messages:
Messages has a lot of different variants of loading localized messages, see also JavaDocs.
In a screen controller, you can also use getMessage() method provided by the base class. It returns a message from a message pack specified for the screen.
Your last remark, which I only saw after rebuilding stuff to the use of Messages, actually is the solution that I was hoping for:
In a screen controller, you can also use getMessage() method provided by the base class. It returns a message from a message pack specified for the screen.
This greatly improves readability of the code and reduces coding effort. Thanks!