class_translation.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Translation.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Translation:
  5. Translation
  6. ===========
  7. **Inherits:** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Inherited By:** :ref:`PHashTranslation<class_phashtranslation>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Language Translation.
  13. Member Functions
  14. ----------------
  15. +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`add_message<class_Translation_add_message>` **(** :ref:`String<class_string>` src_message, :ref:`String<class_string>` xlated_message **)** |
  17. +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`erase_message<class_Translation_erase_message>` **(** :ref:`String<class_string>` src_message **)** |
  19. +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`String<class_string>` | :ref:`get_message<class_Translation_get_message>` **(** :ref:`String<class_string>` src_message **)** const |
  21. +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_message_count<class_Translation_get_message_count>` **(** **)** const |
  23. +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_message_list<class_Translation_get_message_list>` **(** **)** const |
  25. +------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
  26. Member Variables
  27. ----------------
  28. .. _class_Translation_locale:
  29. - :ref:`String<class_string>` **locale**
  30. Description
  31. -----------
  32. Translations are resources that can be loaded/unloaded on demand. They map a string to another string.
  33. Member Function Description
  34. ---------------------------
  35. .. _class_Translation_add_message:
  36. - void **add_message** **(** :ref:`String<class_string>` src_message, :ref:`String<class_string>` xlated_message **)**
  37. Add a message for translation.
  38. .. _class_Translation_erase_message:
  39. - void **erase_message** **(** :ref:`String<class_string>` src_message **)**
  40. Erase a message.
  41. .. _class_Translation_get_message:
  42. - :ref:`String<class_string>` **get_message** **(** :ref:`String<class_string>` src_message **)** const
  43. Return a message for translation.
  44. .. _class_Translation_get_message_count:
  45. - :ref:`int<class_int>` **get_message_count** **(** **)** const
  46. .. _class_Translation_get_message_list:
  47. - :ref:`PoolStringArray<class_poolstringarray>` **get_message_list** **(** **)** const
  48. Return all the messages (keys).