Translation.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Translation" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Language Translation.
  5. </brief_description>
  6. <description>
  7. Translations are resources that can be loaded and unloaded on demand. They map a string to another string.
  8. </description>
  9. <tutorials>
  10. <link>$DOCS_URL/tutorials/i18n/internationalizing_games.html</link>
  11. <link>$DOCS_URL/tutorials/i18n/locales.html</link>
  12. </tutorials>
  13. <methods>
  14. <method name="_get_message" qualifiers="virtual">
  15. <return type="String" />
  16. <argument index="0" name="src_message" type="String" />
  17. <description>
  18. Virtual method to override [method get_message].
  19. </description>
  20. </method>
  21. <method name="add_message">
  22. <return type="void" />
  23. <argument index="0" name="src_message" type="String" />
  24. <argument index="1" name="xlated_message" type="String" />
  25. <description>
  26. Adds a message if nonexistent, followed by its translation.
  27. </description>
  28. </method>
  29. <method name="erase_message">
  30. <return type="void" />
  31. <argument index="0" name="src_message" type="String" />
  32. <description>
  33. Erases a message.
  34. </description>
  35. </method>
  36. <method name="get_message" qualifiers="const">
  37. <return type="String" />
  38. <argument index="0" name="src_message" type="String" />
  39. <description>
  40. Returns a message's translation.
  41. </description>
  42. </method>
  43. <method name="get_message_count" qualifiers="const">
  44. <return type="int" />
  45. <description>
  46. Returns the number of existing messages.
  47. </description>
  48. </method>
  49. <method name="get_message_list" qualifiers="const">
  50. <return type="PoolStringArray" />
  51. <description>
  52. Returns all the messages (keys).
  53. </description>
  54. </method>
  55. </methods>
  56. <members>
  57. <member name="locale" type="String" setter="set_locale" getter="get_locale" default="&quot;en&quot;">
  58. The locale of the translation.
  59. </member>
  60. </members>
  61. <constants>
  62. </constants>
  63. </class>