|
xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
|
Internationalization facilities. More...
Namespaces | |
| namespace | tparam |
Classes | |
| class | Context |
| A context that uses a certain context string. More... | |
| struct | SortAscending |
| A predicate for sorting strings in ascending order using the comparison rules of the current locale. More... | |
| struct | SortDescending |
| A predicate for sorting strings in descending order using the comparison rules of the current locale. More... | |
| struct | SortOrdering |
| A predicate that compares two strings using the comparison rules of the current locale. More... | |
| struct | Translate |
| A translated string that can be used as a template parameter. More... | |
Functions | |
| auto | translate (std::string_view context, std::string_view text) -> ui::String |
| Function to translate a string to the system language. | |
| auto | convert (std::string_view text) -> auto |
| Converts a string to a UI string. | |
| template<typename... Arguments> | |
| auto | make_format_args (Arguments &...arguments) -> decltype(auto) |
| Function to create format arguments for use in std::vformat and std::vformat_to. | |
| template<typename... Arguments> | |
| auto | format (std::string_view context, std::string_view format, Arguments &&...arguments) -> ui::String |
| Function to format a string and translate it to the system language. | |
| template<typename OutputIterator , typename... Arguments> | |
| auto | format_to (std::string_view context, OutputIterator output, std::string_view format, Arguments &&...arguments) -> OutputIterator |
| Function to format a string to an output sequence and translate it to the system language. | |
Variables | |
| constexpr SortOrdering | kSortOrdering |
| A predicate that compares two strings using the comparison rules of the current locale. | |
| constexpr SortAscending | kSortAscending |
| A predicate for sorting strings in ascending order using the comparison rules of the current locale. | |
| constexpr SortDescending | kSortDescending |
| A predicate for sorting strings in descending order using the comparison rules of the current locale. | |
Internationalization facilities.
This namespace contains functionality for internationalizing user facing text, so that it can be localized to different languages.
| auto xentara::workbench::i18n::convert | ( | std::string_view | text | ) | -> auto |
Converts a string to a UI string.
#include <xentara/workbench/i18n/Context.hpp> | text | The text to translate |
| auto xentara::workbench::i18n::format | ( | std::string_view | context, |
| std::string_view | format, | ||
| Arguments &&... | arguments | ||
| ) | -> ui::String |
Function to format a string and translate it to the system language.
#include <xentara/workbench/i18n/Context.hpp> | context | The context |
| format | The format string (will be translated) |
| arguments | The format arguments (will not be translated) |
| auto xentara::workbench::i18n::format_to | ( | std::string_view | context, |
| OutputIterator | output, | ||
| std::string_view | format, | ||
| Arguments &&... | arguments | ||
| ) | -> OutputIterator |
Function to format a string to an output sequence and translate it to the system language.
#include <xentara/workbench/i18n/Context.hpp> | context | The context |
| output | The iterator that the translated text should be written to. |
| format | The format string (will be translated) |
| arguments | The format arguments (will not be translated) |
| auto xentara::workbench::i18n::make_format_args | ( | Arguments &... | arguments | ) | -> decltype(auto) |
Function to create format arguments for use in std::vformat and std::vformat_to.
#include <xentara/workbench/i18n/Context.hpp> | arguments | The format arguments |
| auto xentara::workbench::i18n::translate | ( | std::string_view | context, |
| std::string_view | text | ||
| ) | -> ui::String |
Function to translate a string to the system language.
#include <xentara/workbench/i18n/Context.hpp> | context | The context |
| text | The text to translate |
|
constexpr |
A predicate for sorting strings in ascending order using the comparison rules of the current locale.
|
constexpr |
A predicate for sorting strings in descending order using the comparison rules of the current locale.
|
constexpr |
A predicate that compares two strings using the comparison rules of the current locale.