godot/doc/classes/TranslationServer.xml
Rémi Verschelde 16fd1c421e
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.

(cherry picked from commit 7adf4cc9b5)
2021-08-03 10:32:31 +02:00

71 lines
2.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="TranslationServer" inherits="Object" version="3.3">
<brief_description>
Server that manages all translations.
</brief_description>
<description>
Server that manages all translations. Translations can be set to it and removed from it.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/3.3/tutorials/i18n/internationalizing_games.html</link>
<link>https://docs.godotengine.org/en/3.3/tutorials/i18n/locales.html</link>
</tutorials>
<methods>
<method name="add_translation">
<return type="void" />
<argument index="0" name="translation" type="Translation" />
<description>
Adds a [Translation] resource.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
Clears the server from all translations.
</description>
</method>
<method name="get_loaded_locales" qualifiers="const">
<return type="Array" />
<description>
Returns an Array of all loaded locales of the game.
</description>
</method>
<method name="get_locale" qualifiers="const">
<return type="String" />
<description>
Returns the current locale of the game.
</description>
</method>
<method name="get_locale_name" qualifiers="const">
<return type="String" />
<argument index="0" name="locale" type="String" />
<description>
Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]).
</description>
</method>
<method name="remove_translation">
<return type="void" />
<argument index="0" name="translation" type="Translation" />
<description>
Removes the given translation from the server.
</description>
</method>
<method name="set_locale">
<return type="void" />
<argument index="0" name="locale" type="String" />
<description>
Sets the locale of the game.
</description>
</method>
<method name="translate" qualifiers="const">
<return type="String" />
<argument index="0" name="message" type="String" />
<description>
Returns the current locale's translation for the given message (key).
</description>
</method>
</methods>
<constants>
</constants>
</class>