String localization can be achieved using the
DMLocalizedString class. The
getString() method accepts an optional
$strings_folder parameter which can point to any folder
containing string files. (If absent, only built-in strings will be available.)
String files should be named
strings.code.txt where "code"
is an ISO
639-1 language code.
String files are simple UTF-8 text files in "Java properties file" format, consisting of one key-value pair per line.
KEY = value KEY = value KEY = value
Keys should be shared across strings files, but values, of course, should be localized appropriately in different files.
The current language is set in the
config.ini file. Modules should always provide at
least an English strings file, called
This will be used as a fallback in case the user's requested
dmbridge.language is not provided by your module.