The server responsible for language translations.
The server that manages all language translations. Translations can be added to or removed from it.
$DOCS_URL/tutorials/i18n/internationalizing_games.html $DOCS_URL/tutorials/i18n/locales.html
Adds a [Translation] resource.
Clears the server from all translations.
Compares two locales and returns a similarity score between [code]0[/code] (no match) and [code]10[/code] (full match).
Returns an array of known country codes.
Returns array of known language codes.
Returns an array of known script codes.
Returns a readable country name for the [param country] code.
Returns a readable language name for the [param language] code.
Returns an array of all loaded locales of the project.
Returns the current locale of the project. See also [method OS.get_locale] and [method OS.get_locale_language] to query the locale of the user system.
Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]).
Returns a readable script name for the [param script] code.
Returns the current locale of the editor. [b]Note:[/b] When called from an exported project returns the same value as [method get_locale].
Returns the [Translation] instance based on the [param locale] passed in. It will return [code]null[/code] if there is no [Translation] instance that matches the [param locale].
Returns the pseudolocalized string based on the [param message] passed in.
Reparses the pseudolocalization options and reloads the translation.
Removes the given translation from the server.
Sets the locale of the project. The [param locale] string will be standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]). If translations have been loaded beforehand for the new locale, they will be applied.
Returns a [param locale] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
Returns the current locale's translation for the given message (key) and context.
Returns the current locale's translation for the given message (key), 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.
- If [code]true[/code], enables the use of pseudolocalization. See [member ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization] for details.