dagor.localize
module ‘dagor.localize’
Source files:
prog/gameLibs/quirrel/bindQuirrelEx/localization.cpp
Usage:
let { loc, getLocTextForLang, processHypenationsCN, processHypenationsJP, doesLocTextExist, getCurrentLanguage, getForceLanguage, setLanguageToSettings, loadLocalizationFromFile, getLangId, initLocalization } = require("dagor.localize")
or:
from "dagor.localize" import *
//'dagor.localize' exports:
{
pure function loc(key, ...): string|null, ...any_type -> string
pure function getLocTextForLang(key, lang, ...): string, string|null, ...any_type -> string
pure function processHypenationsCN(str): string -> string
pure function processHypenationsJP(str): string -> string
pure function doesLocTextExist(key): string -> bool
function getCurrentLanguage()
function getForceLanguage()
function setLanguageToSettings()
function loadLocalizationFromFile(filename, lang): string, string -> null
function getLangId()
function initLocalization(locBlk, curLang): instance, string -> null
}
- pure function loc(key, ...)
- Arguments:
key (
string|null())... (
any_type()) – this function accepts unlimited arguments
nparamscheck:1typecheck mask: string or null- Returns:
string
- pure function getLocTextForLang(key, lang, ...)
- Arguments:
key (
string())lang (
string|null())... (
any_type()) – this function accepts unlimited arguments
nparamscheck:2typecheck mask: string, string or null- Returns:
string
- pure function processHypenationsCN(str)
- Arguments:
str (
string())
nparamscheck:1typecheck mask: string- Returns:
string
- pure function processHypenationsJP(str)
- Arguments:
str (
string())
nparamscheck:1typecheck mask: string- Returns:
string
- pure function doesLocTextExist(key)
- Arguments:
key (
string())
nparamscheck:1typecheck mask: string- Returns:
bool
- function getCurrentLanguage()
- function getForceLanguage()
- function setLanguageToSettings()
- function loadLocalizationFromFile(filename, lang)
- Arguments:
filename (
string())lang (
string())
- Returns:
null
- function getLangId()
- function initLocalization(locBlk, curLang)
- Arguments:
locBlk (
instance())curLang (
string, optional())
nparamscheck:-1typecheck mask: class_instance, string- Returns:
null