|
HoverRace
2.0
|
A library of available locales. More...
#include <Locale.h>
Public Types | |
| using | const_iterator = locales_t::const_iterator |
| using | iterator = locales_t::iterator |
| using | value_type = locales_t::value_type |
Public Member Functions | |
| Locale (const OS::path_t &path, const std::string &domain) | |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| const_iterator | end () const |
| const boost::optional< std::string > & | GetSelectedLocaleId () const |
| Return the ID of the locale that was selected by RequestLocale(). More... | |
| const std::string & | IdToName (const std::string &id) const |
| Find the locale name for the given locale ID. More... | |
| void | RequestLocale (const std::string &id) |
| Attempt to change the global locale. More... | |
| void | RequestPreferredLocale () |
| Attempt to change the global locale to the preferred locale. More... | |
Static Public Member Functions | |
| static std::string | NormalizeId (const std::string &s) |
| Normalize the locale ID. More... | |
Private Types | |
| using | locales_t = std::map< std::string, std::string > |
Private Member Functions | |
| void | ScanLocales () |
| Scan the locale directory for available locales. More... | |
Private Attributes | |
| locales_t | availableLocales |
| Cached list of available locales. More... | |
| std::string | domain |
| OS::path_t | path |
| boost::optional< std::string > | selectedLocaleId |
A library of available locales.
| using HoverRace::Util::Locale::const_iterator = locales_t::const_iterator |
| using HoverRace::Util::Locale::iterator = locales_t::iterator |
|
private |
| using HoverRace::Util::Locale::value_type = locales_t::value_type |
| HoverRace::Util::Locale::Locale | ( | const OS::path_t & | path, |
| const std::string & | domain | ||
| ) |
|
inline |
| Locale::const_iterator HoverRace::Util::Locale::cbegin | ( | ) | const |
| Locale::const_iterator HoverRace::Util::Locale::cend | ( | ) | const |
|
inline |
|
inline |
Return the ID of the locale that was selected by RequestLocale().
| const std::string & HoverRace::Util::Locale::IdToName | ( | const std::string & | id | ) | const |
Find the locale name for the given locale ID.
| id | The locale ID. |
|
static |
Normalize the locale ID.
This removes extraneous whitespace and invalid characters.
| s | The original locale ID. |
| void HoverRace::Util::Locale::RequestLocale | ( | const std::string & | id | ) |
Attempt to change the global locale.
| id | The locale ID. |
| void HoverRace::Util::Locale::RequestPreferredLocale | ( | ) |
Attempt to change the global locale to the preferred locale.
|
private |
Scan the locale directory for available locales.
This will invalidate all iterators.
|
private |
Cached list of available locales.
|
private |
|
private |
|
private |
1.8.11