Represents translator class. This class cannot be inherited.
_t and translation files. Public Static Properties | |
| static auto | language () -> xtd::string |
| Gets the current application language. | |
| static auto | language (const xtd::string &language) -> void |
| Sets the current application language. | |
| static auto | language (xtd::null_ptr) -> void |
| Sets the current application language. | |
| static auto | languages () -> xtd::array< xtd::string > |
| Gets an array of languages supported by the application. | |
| static auto | system_language () -> xtd::string |
| Gets the current system language. | |
Public Static Methods | |
| static auto | add_value (const xtd::string &language, const xtd::string &key, const xtd::string &value) -> void |
| Manually adds a translation for a specified key and language. | |
| static auto | parse_locale (const xtd::string &locale_path) -> bool |
| Parses a specified path that contains translations. | |
| static auto | parse_locale (const xtd::string &locale_path, const xtd::string &language) -> bool |
| Parses a specified path that contains translations. | |
| static auto | parse_file (const xtd::string &file) -> bool |
| Parses a specified file that contains translations for a specified language. | |
| static auto | parse_file (const xtd::string &file, const xtd::string &language) -> bool |
| Parses a specified file that contains translations for a specified language. | |
| static auto | translate (const xtd::string &value) noexcept -> xtd::string |
| Translates a string into the lganguage specified by the xtd::translate::language property. | |
| static auto | translate (const xtd::string &language, const xtd::string &value) noexcept -> xtd::string |
| Translates a string into the specified lganguage. | |
|
staticnodiscard |
Gets the current application language.
|
static |
Sets the current application language.
| language | The current application language. |
|
static |
Sets the current application language.
| language | The current application language. |
|
staticnodiscard |
Gets an array of languages supported by the application.
|
staticnodiscard |
Gets the current system language.
|
inlinestatic |
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. @parama value The translation of the key for the specified language. |
|
static |
Parses a specified path that contains translations.
| locale_path | Path that contains translations. |
true if parse succeed; otherwhise false.
|
static |
Parses a specified path that contains translations.
| locale_path | Path that contains translations. |
true if parse succeed; otherwhise false.
|
static |
Parses a specified file that contains translations for a specified language.
| file | The file that contains translations. |
true if parse succeed; otherwhise false.
|
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. |
true if parse succeed; otherwhise false.
|
inlinestaticnodiscardnoexcept |
Translates a string into the lganguage specified by the xtd::translate::language property.
|
inlinestaticnodiscardnoexcept |
Translates a string into the specified lganguage.
| language | The language used to translate the value |