Editor localization manager. Editor localization is described in detail in Localization article.
addTables (tmp:Array<{name:String, lang:Null<String>}>):Void
Adds a list of database table names to load localized editor strings for.
Should be called in editor module constructors or in editor main()
after the
initialization.
Parameters:
tmp
Database table info.
tmp.name
Database table name.
tmp.lang
Editor strings language. If not null, will only load strings for a single specified language for that table.
get<T> (tableID:String, id:Int, defValue:T, ?locale:String):T
Returns a typed localization row for that table and row ID. Accepts default row as an argument.
Parameters:
tableID
Database table name.
id
Database row ID.
defValue
Default row. Also sets the return type.
locale
If not null, will return row for that language. Will use editor user language otherwise.
Returns:
Localization row. Will return default row if row does not exists for that table name, row ID and language.
getAll (tableID:String, id:Int):Map<String, Dynamic>
Returns a key-value map of localization rows for this table name, row ID pair.
Parameters:
tableID
Database table name.
id
Database row ID.
Returns:
Key-value map of localization rows for all existing languages.
getMap<T> (tableID:String, id:Int, defValue:T):LocaleMap<T>
Returns a typed key-value localization row map for that table and row ID. Accepts default row as an argument.
Parameters:
tableID
Database table name.
id
Database row ID.
defValue
Default row. Also sets the return type.
Returns:
Localization row map.