18#include <zypp/base/Hash.h>
59 explicit Locale(
const std::string & str_r );
62 explicit Locale(
const char * str_r );
89 {
return std::string(
_str); }
92 std::string
name()
const;
Country codes (iso3166-1-alpha-2).
Base class for creating IdString based types.
Access to the sat-pools string space.
Language codes (iso639_2/iso639_1).
'Language[_Country]' codes.
Locale fallback() const
Return the fallback locale for this locale, if no fallback exists the empty Locale::noCode.
CountryCode country() const
The county part.
static const Locale enCode
Last resort "en".
std::string name() const
Return the translated locale name.
std::string code() const
Return the locale code asString.
LanguageCode language() const
The language part.
static const Locale noCode
Empty code.
Locale()
Default Ctor: noCode.
static Locale bestMatch(const LocaleSet &avLocales_r, Locale requested_r=Locale())
Return the best match for Locale requested_r within the available avLocales_r.
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Locale > LocaleSet
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.