function stringf(key, ...)
return tostring(translate(key)):format(...)
end
+
+function dump()
+ local rv = {}
+ tparser.get_translations(function(k, v) rv[k] = v end)
+ return rv
+end
---[[
Clear the translation table.
-
@class function
@name clear
]]
Load a translation file using the default translation language.
Alternatively load the translation of the fallback language.
+
@class function
@name loadc
@param file Language file
---[[
Return the translated value for a specific translation key
-
and ensure that the returned value is a Lua string value.
+
This is the same as calling <code>tostring(translate(...))</code>
+
@class function
@name string
@param key Default translation text
Return the translated value for a specific translation key and use it as sprintf pattern.
Ensure that the returned value is a Lua string value.
+
This is the same as calling <code>tostring(translatef(...))</code>
+
@class function
@name stringf
@param key Default translation text
@return Translated and formatted string
]]
+---[[
+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.
+
+@class function
+@name dump
+@return Key-value translation string table.
+]]