summaryrefslogtreecommitdiff
path: root/doc/classes/Translation.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Translation.xml')
-rw-r--r--doc/classes/Translation.xml37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index 11245195bf..1989a63362 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -18,8 +18,25 @@
</argument>
<argument index="1" name="xlated_message" type="StringName">
</argument>
+ <argument index="2" name="context" type="StringName" default="&quot;&quot;">
+ </argument>
<description>
Adds a message if nonexistent, followed by its translation.
+ An additional context could be used to specify the translation context or differentiate polysemic words.
+ </description>
+ </method>
+ <method name="add_plural_message">
+ <return type="void">
+ </return>
+ <argument index="0" name="src_message" type="StringName">
+ </argument>
+ <argument index="1" name="xlated_messages" type="PackedStringArray">
+ </argument>
+ <argument index="2" name="context" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Adds a message involving plural translation if nonexistent, followed by its translation.
+ An additional context could be used to specify the translation context or differentiate polysemic words.
</description>
</method>
<method name="erase_message">
@@ -27,6 +44,8 @@
</return>
<argument index="0" name="src_message" type="StringName">
</argument>
+ <argument index="1" name="context" type="StringName" default="&quot;&quot;">
+ </argument>
<description>
Erases a message.
</description>
@@ -36,6 +55,8 @@
</return>
<argument index="0" name="src_message" type="StringName">
</argument>
+ <argument index="1" name="context" type="StringName" default="&quot;&quot;">
+ </argument>
<description>
Returns a message's translation.
</description>
@@ -54,6 +75,22 @@
Returns all the messages (keys).
</description>
</method>
+ <method name="get_plural_message" qualifiers="const">
+ <return type="StringName">
+ </return>
+ <argument index="0" name="src_message" type="StringName">
+ </argument>
+ <argument index="1" name="src_plural_message" type="StringName">
+ </argument>
+ <argument index="2" name="n" type="int">
+ </argument>
+ <argument index="3" name="context" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns a message's translation involving plurals.
+ The number [code]n[/code] 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>
<members>
<member name="locale" type="String" setter="set_locale" getter="get_locale" default="&quot;en&quot;">