$tr Translates an English string to the current language |
Usage |
<string> $tr(<default_language_string:string>[,<catalogue:string>]) |
Description |
This function searches for the translation of <default_language_string>
in the specified translation <catalogue> or in the main
KVIrc translation file if <catalogue> is omitted. If no translation is found then <english_string> is returned. <default_language_string> is a string in your script default language (which should probably be English since it is the most common language spoken by the translators). If the <catalogue> is not loaded yet, KVIrc will attempt to load it, but only the first time that the catalogue is accessed (i.e. a load failure will cause the catalogue to be ignored completely until trunload is explicitly used. KVIrc will search the catalogue only in $file.localdir/locale/ and in $file.globaldir/locale/. If your catalogues are in some other place then you must load them explicitly by the means of trload. For more information see the documentation about script localization. |
Examples |
echo $tr("Hello World!") |
See also |
trload, trunload |