getdtext

Returns translated string s for specified locale. If locale is empty default locale will be taken. If locale name is equal to base locale s string is returned without modification.

Localization strings are taken from special files previosly loaded into memory.

If string s isn't persists in locale strings it will be put into fuzzy text map. Fuzzy strings is saved in separate file for each locale to be translated later.

string
getdtext
(
string s
,
string locale = ""
)

Examples

assert(getdtext("Hello, world!", "ru_RU") == "Привет, мир!");
assert(getdtext("Hello, world!", "es_ES") == "Hola, mundo!");
assert(getdtext("") == "");

See Also

BASE_LOCALE, defaultLocale properties.

Meta