Skip to content
Snippets Groups Projects
Commit 4f9f226a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Start of localization support for JS modules/shells/etc.

Similar to GNU gettext(), by loading gettext.js and enclosing all user-visible
strings in gettext(), a script can get easy/easier support for non-default
(i.e. US-English) locales by loading translated strings from the [JS] section
of ctrl/text.<locale>.ini (if it exists), or customized strings from the [JS]
section of ctrl/text.ini (if it exists).

Results are cached for fast subsequent uses of the same string.

What's *not* supported is different translations (e.g. colorization or
whatever) for the same string used in a different scripts. That could be
added (e.g. use a different section name for script-specific translations),
pretty easily, if desired.
parent 79dd2496
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment