Translates resource strings in LCLStrConsts to the specified language.
Source position: lcltranslator.pas line 81
function TranslateLCLResourceStrings( |
Lang: string; |
Dir: string |
):string; |
Lang |
|
Language identifier for the translated constants. |
Dir |
|
Path to the .MO or .PO file used for the translation. |
File name used for the translation, or an empty when translation is not available.
TranslateLCLResourceStrings is a String function used to translate resource strings in the LCLStrConsts unit to the language identifier specified in the Lang argument.
Dir is an optional path where .PO or .MO files can be found with the translated values for string constants.
TranslateLCLResourceStrings calls FindLocaleFileName to locate the .PO or .MO file. Preference is given to the .PO variant. If it is locate in the speciifed path, the TranslateUnitResourceStrings routine is called to tranlate constants from the LCLStrConts unit.
If a .PO file is not found, FindLocaleFileName is called to locate a .MO file used for translation. When found, the TranslateResourceStrings routine is called to translate string using the .MO file in the specified path.
The return value contains the name of the .PO or .MO file used to translate string constants, or an empty string when a file is not found in the path specified in Dir.