4#ifndef _Stroika_Foundation_Common_Locale_h_
5#define _Stroika_Foundation_Common_Locale_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
13#include "Stroika/Foundation/Common/Common.h"
14#include "Stroika/Foundation/Execution/Exceptions.h"
48 class LocaleNotFoundException :
public Execution::RuntimeErrorException<> {
50 LocaleNotFoundException (
const optional<Characters::String>& iso2LetterLanguageCode = {},
51 const optional<Characters::String>& iso2LetterTerritoryCode = {});
54 static const LocaleNotFoundException kThe;
56 inline const LocaleNotFoundException LocaleNotFoundException::kThe;
95 Characters::String
FindLocaleName (
const Characters::String& iso2LetterLanguageCode,
const Characters::String& iso2LetterTerritoryCode);
105 optional<Characters::String>
FindLocaleNameQuietly (
const Characters::String& iso2LetterLanguageCode,
const Characters::String& iso2LetterTerritoryCode);
113 locale
FindNamedLocale (
const Characters::String& iso2LetterLanguageCode,
const Characters::String& iso2LetterTerritoryCode);
117 optional<locale> FindNamedLocaleQuietly (
const Characters::String& iso2LetterLanguageCode,
const Characters::String& iso2LetterTerritoryCode);
134 optional<locale> fPrev_;
Characters::String FindLocaleName(const Characters::String &iso2LetterLanguageCode, const Characters::String &iso2LetterTerritoryCode)
Not all systems appear to follow the same naming conventions for locales, so help lookup.
optional< Characters::String > FindLocaleNameQuietly(const Characters::String &iso2LetterLanguageCode, const Characters::String &iso2LetterTerritoryCode)
Not all systems appear to follow the same naming conventions for locales, so help lookup.
vector< Characters::String > GetAvailableLocales()
List all installed locale names (names which can be passed to std::locale::CTOR)
locale GetPlatformDefaultLocale()
locale FindNamedLocale(const Characters::String &iso2LetterLanguageCode, const Characters::String &iso2LetterTerritoryCode)
Find the locale matching these properties (for exception trying)
void UsePlatformDefaultLocaleAsDefaultLocale()
Set the operating system locale into the current C++ locale used by locale functions (and most locale...