2 LuCI translation library.
7 Clear the translation table.
15 Load a translation and copy its data into the translation table.
19 @param file Language file
20 @param lang Two-letter language code
21 @param force Force reload even if already loaded (optional)
22 @return Success status
26 Load a translation file using the default translation language.
28 Alternatively load the translation of the fallback language.
31 @param file Language file
32 @param force Force reload even if already loaded (optional)
36 Set the context default translation language.
40 @param lang Two-letter language code
44 Return the translated value for a specific translation key.
48 @param key Default translation text
49 @return Translated string
53 Return the translated value for a specific translation key and use it as sprintf pattern.
57 @param key Default translation text
58 @param ... Format parameters
59 @return Translated and formatted string
63 Return the translated value for a specific translation key
65 and ensure that the returned value is a Lua string value.
66 This is the same as calling <code>tostring(translate(...))</code>
69 @param key Default translation text
70 @return Translated string
74 Return the translated value for a specific translation key and use it as sprintf pattern.
76 Ensure that the returned value is a Lua string value.
77 This is the same as calling <code>tostring(translatef(...))</code>
80 @param key Default translation text
81 @param ... Format parameters
82 @return Translated and formatted string