Functions for localization.
See the I18N section for more information.
local I18N = ELONA.require("core.I18N")
get (key) | Gets a localized string and optionally formats it with arguments. |
get_optional (key) | Gets a localized string and optionally formats it with arguments. |
get_enum (key, index) | Gets a localized string from an enum-style localization object. |
get_enum_optional (key, index) | Gets a localized string from an enum-style localization object and optionally formats it with arguments. |
get_enum_property (key_base, key_property, index) | Gets a localized string from an enum-style localization object where the enum's children are themselves objects. |
get_enum_property_optional (key_base, key_property, index) | Gets a localized string from an enum-style localization object where the enum's children are themselves objects. |
get_data_text (prototype_id, instance_id, property_name) | Get a localized text associated with the given data ID. |
register_function (language, name, func) | Registers a new function for use inside localization files. |
Gets a localized string and optionally formats it with arguments.
This will return a string with a warning if the localization string doesn't exist.
Parameters:I18N.get("core.map.you_see", "Vernis")
Gets a localized string and optionally formats it with arguments.
This will return nil if the localization string doesn't exist.
Parameters:Gets a localized string from an enum-style localization object.
This will return a string with a warning if the localization string doesn't exist.
Parameters:Gets a localized string from an enum-style localization object and optionally formats it with arguments.
This will return nil if the localization string doesn't exist.
Parameters:Gets a localized string from an enum-style localization object where the enum's children are themselves objects.
This will return a string with a warning if the localization string doesn't exist.
Parameters:Gets a localized string from an enum-style localization object where the enum's children are themselves objects.
This will return nil if the localization string doesn't exist.
Parameters:Get a localized text associated with the given data ID.
This will return a string with a warning if the localization string doesn't exist.
Parameters:Registers a new function for use inside localization files.
Parameters: