|
HikoGUI
A low latency retained GUI
|
Public Member Functions | |
| language (std::string tag) noexcept | |
| language (language const &)=delete | |
| language (language &&)=delete | |
| language & | operator= (language const &)=delete |
| language & | operator= (language &&)=delete |
| ssize_t | plurality (long long n, ssize_t max) const noexcept |
Static Public Member Functions | |
| static language * | find (std::string const &tag) noexcept |
| static language & | find_or_create (std::string const &tag) noexcept |
| static std::vector< std::string > | add_short_names (std::vector< std::string > tags) noexcept |
| Add short language names to the list of names. | |
| static void | set_preferred_languages (std::vector< std::string > tags) noexcept |
| static std::vector< std::string > | get_preferred_language_tags () noexcept |
| Get the preferred language tags from the operating system. | |
Data Fields | |
| std::string | tag |
| std::function< int(int)> | plurality_func |
Static Public Attributes | |
| static std::unordered_map< std::string, std::unique_ptr< language > > | languages |
| static observable< std::vector< language * > > | preferred_languages |
| static std::recursive_mutex | static_mutex |
|
inlinestaticnoexcept |
Add short language names to the list of names.
The short names are inserted right after a consecutive group of long names with the same short name.
|
staticnoexcept |
Get the preferred language tags from the operating system.
Language tags are based on IETF BCP-47/RFC-5646