summaryrefslogtreecommitdiffstats
path: root/doc/classes/TranslationDomain.xml
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2024-08-15 09:14:41 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2024-09-17 13:09:44 +0800
commit68d494e24e2d6704ae95b1d00fa91b440311e8c3 (patch)
tree0216a77378d717873d4fbf7c71f405e0cc02081b /doc/classes/TranslationDomain.xml
parent48403b5358c11ffff702da82c48464db8c536ee3 (diff)
downloadredot-engine-68d494e24e2d6704ae95b1d00fa91b440311e8c3.tar.gz
Add translation domain
Diffstat (limited to 'doc/classes/TranslationDomain.xml')
-rw-r--r--doc/classes/TranslationDomain.xml59
1 files changed, 59 insertions, 0 deletions
diff --git a/doc/classes/TranslationDomain.xml b/doc/classes/TranslationDomain.xml
new file mode 100644
index 0000000000..8079685885
--- /dev/null
+++ b/doc/classes/TranslationDomain.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TranslationDomain" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A self-contained collection of [Translation] resources.
+ </brief_description>
+ <description>
+ [TranslationDomain] is a self-contained collection of [Translation] resources. Translations can be added to or removed from it.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_translation">
+ <return type="void" />
+ <param index="0" name="translation" type="Translation" />
+ <description>
+ Adds a translation.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Removes all translations.
+ </description>
+ </method>
+ <method name="get_translation_object" qualifiers="const">
+ <return type="Translation" />
+ <param index="0" name="locale" type="String" />
+ <description>
+ Returns the [Translation] instance that best matches [param locale]. Returns [code]null[/code] if there are no matches.
+ </description>
+ </method>
+ <method name="remove_translation">
+ <return type="void" />
+ <param index="0" name="translation" type="Translation" />
+ <description>
+ Removes the given translation.
+ </description>
+ </method>
+ <method name="translate" qualifiers="const">
+ <return type="StringName" />
+ <param index="0" name="message" type="StringName" />
+ <param index="1" name="context" type="StringName" default="&amp;&quot;&quot;" />
+ <description>
+ Returns the current locale's translation for the given message and context.
+ </description>
+ </method>
+ <method name="translate_plural" qualifiers="const">
+ <return type="StringName" />
+ <param index="0" name="message" type="StringName" />
+ <param index="1" name="message_plural" type="StringName" />
+ <param index="2" name="n" type="int" />
+ <param index="3" name="context" type="StringName" default="&amp;&quot;&quot;" />
+ <description>
+ Returns the current locale's translation for the given message, plural message and context.
+ The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
+ </description>
+ </method>
+ </methods>
+</class>