2
0

i18n.luadoc 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---[[
  2. LuCI translation library.
  3. ]]
  4. module "luci.i18n"
  5. ---[[
  6. Set the context default translation language.
  7. @class function
  8. @name setlanguage
  9. @param lang An IETF/BCP 47 language tag or ISO3166 country code, e.g. "en-US" or "de"
  10. @return The effective loaded language, e.g. "en" for "en-US" - or nil on failure
  11. ]]
  12. ---[[
  13. Return the translated value for a specific translation key.
  14. @class function
  15. @name translate
  16. @param key Default translation text
  17. @return Translated string
  18. ]]
  19. ---[[
  20. Return the translated value for a specific translation key and use it as sprintf pattern.
  21. @class function
  22. @name translatef
  23. @param key Default translation text
  24. @param ... Format parameters
  25. @return Translated and formatted string
  26. ]]
  27. ---[[
  28. Return all currently loaded translation strings as a key-value table. The key is the
  29. hexadecimal representation of the translation key while the value is the translated
  30. text content.
  31. @class function
  32. @name dump
  33. @return Key-value translation string table.
  34. ]]