2018-01-23 14:36:03 +00:00
|
|
|
---[[
|
|
|
|
LuCI translation library.
|
|
|
|
]]
|
|
|
|
module "luci.i18n"
|
|
|
|
|
|
|
|
---[[
|
|
|
|
Set the context default translation language.
|
|
|
|
|
|
|
|
@class function
|
|
|
|
@name setlanguage
|
2019-05-28 19:51:29 +00:00
|
|
|
@param lang An IETF/BCP 47 language tag or ISO3166 country code, e.g. "en-US" or "de"
|
|
|
|
@return The effective loaded language, e.g. "en" for "en-US" - or nil on failure
|
2018-01-23 14:36:03 +00:00
|
|
|
]]
|
|
|
|
|
|
|
|
---[[
|
|
|
|
Return the translated value for a specific translation key.
|
|
|
|
|
|
|
|
@class function
|
|
|
|
@name translate
|
|
|
|
@param key Default translation text
|
|
|
|
@return Translated string
|
|
|
|
]]
|
|
|
|
|
|
|
|
---[[
|
|
|
|
Return the translated value for a specific translation key and use it as sprintf pattern.
|
|
|
|
|
|
|
|
@class function
|
|
|
|
@name translatef
|
|
|
|
@param key Default translation text
|
|
|
|
@param ... Format parameters
|
|
|
|
@return Translated and formatted string
|
|
|
|
]]
|
|
|
|
|
|
|
|
---[[
|
2019-05-28 19:51:29 +00:00
|
|
|
Return all currently loaded translation strings as a key-value table. The key is the
|
|
|
|
hexadecimal representation of the translation key while the value is the translated
|
|
|
|
text content.
|
2018-01-23 14:36:03 +00:00
|
|
|
|
|
|
|
@class function
|
2019-05-28 19:51:29 +00:00
|
|
|
@name dump
|
|
|
|
@return Key-value translation string table.
|
2018-01-23 14:36:03 +00:00
|
|
|
]]
|