Translation.xml 1.9 KB

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