#include <translator.h>
Represents translator class. This class cannot be inherited.
_t
and translation files. Properties | |
static xtd::ustring | language () |
Gets the current application language. More... | |
static void | language (const xtd::ustring &language) |
Sets the current application language. More... | |
static std::vector< xtd::ustring > | languages () |
Gets an array of languages supported by the application. More... | |
static xtd::ustring | system_language () |
Gets the current system language. More... | |
Methods | |
static void | add_value (const xtd::ustring &language, const xtd::ustring &key, const xtd::ustring &value) |
Manually adds a translation for a specified key and language. More... | |
static void | parse_locale (const xtd::ustring &locale_path) |
Parses a specified path that contains translations. More... | |
static void | parse_file (const xtd::ustring &file, const xtd::ustring &language) |
Parses a specified file that contains translations for a specified language. More... | |
static xtd::ustring | translate (const xtd::ustring &value) noexcept |
Translates a string into the lganguage specified by the xtd::translate::language property. More... | |
static xtd::ustring | translate (const xtd::ustring &language, const xtd::ustring &value) noexcept |
Translates a string into the specified lganguage. More... | |
|
static |
Manually adds a translation for a specified key and language.
language | The language of the key to be translated. |
key | The key to be translated. value The translation of the key for the specified language. |
|
static |
Gets the current application language.
|
static |
Sets the current application language.
language | The current application language. |
|
static |
Gets an array of languages supported by the application.
|
static |
Parses a specified file that contains translations for a specified language.
file | The file that contains translations. |
language | The language of the translation file. |
|
static |
Parses a specified path that contains translations.
locale_path | Path that contains translations. |
|
static |
Gets the current system language.
|
staticnoexcept |
Translates a string into the lganguage specified by the xtd::translate::language property.
|
staticnoexcept |
Translates a string into the specified lganguage.
language | The language used to translate the value |