Internationalisation
Webmin versions 0.75 and above provide module writers with functions for generating different text and messages depending on the language selected by the user. Each module that wishes to use this feature should have a subdirectory called lang which contains a translation file for each language supported. Each line of a translation file defines a message in that language in the format :message_code=Message in this language
The default language for Webmin is english (code en), so every module should have at least a file called lang/en. If any other language is missing a message, the english one will be used instead. Check the file lang_list.txt for all the languages currently supported and their codes. To change the current language, go into the Webmin Configuration module and click on the Language icon.
When your module calls the init_config function, all the messages from the appropriate translation file will be read into the hash %text. Thus instead of generating hard-coded text like this :
print "Click here to start the server :<p>\n";Your module should use the %text hash like this :
print $text{'startmsg'},"<p>\n";
Messages from the appropriate file in the top-level lang directory
are also included in %text. Several useful messages such as
save, delete and create are thus available to
every module. In some cases, you may want to include some variable text in a message. Because the position of the variable may differ depending on the language used, message strings can include placemarkers like $1, $2 or $3. The function text should be used to replace these placemarkers with actual values like so :
print &text('servercount', $count),"<p>\n";
Your module's module.info file can also support multiple languages by adding a line like desc_code=module description for each language, where code is the language code. You can also have a separate config.info file for each language, called config.info.code, and separate help files for each language, named like intro.code.html. In all cases, if there is no translation for the user's chosen language then the default (English) will be used instead.

