====== gettext.js ====== Localized/customized support for JavaScript user-visible text (i.e. strings not contained in text.dat) ===== Usage ===== Customized text strings go in the ''[JS]'' section of ''[[dir:ctrl]]/[[custom:text.ini]]''. Localized (translated to non-default locale) text strings go in the ''[JS]'' section of ''[[dir:ctrl]]/text..ini'' By ''load()''ing or ''require()''ing ''gettext.js'', a JavaScript module can gain localization/customization support by simply wrapping strings (words, terms) in calls to ''gettext()''. For example: load("gettext.js"); print(getttext("This string is now localizable.")); For easier localization, it's recommended that Ctrl-A codes/sequences are contained in separate strings from words/terms that can be translated for other locales. ===== See Also ===== * [[:custom:javascript:lib:|custom:javascript:lib index]] {{tag>}}