Base Framework
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Locale Class Reference

Multi-language support. More...

#include <base/string/Locale.h>

Inherits DateFormatSet.

Public Member Functions

 Locale () noexcept
 
const StringgetBoolean (bool value) const noexcept
 
- Public Member Functions inherited from DateFormatSet
 DateFormatSet () noexcept
 
char getDateSeparator () const noexcept
 
char getTimeSeparator () const noexcept
 
String getShortNameOfWeekday (unsigned int weekday) const
 
String getLongNameOfWeekday (unsigned int weekday) const
 
String getShortNameOfMonth (unsigned int month) const
 
String getLongNameOfMonth (unsigned int month) const
 
const StringgetPM () const noexcept
 
const StringgetAM () const noexcept
 
const StringgetShortDateFormat () const noexcept
 
void setShortDateFormat (const String &format) noexcept
 
const StringgetMediumDateFormat () const noexcept
 
void setMediumDateFormat (const String &format) noexcept
 
const StringgetLongDateFormat () const noexcept
 
void setLongDateFormat (const String &format) noexcept
 
const StringgetShortTimeFormat () const noexcept
 
void setShortTimeFormat (const String &format) noexcept
 
const StringgetMediumTimeFormat () const noexcept
 
void setMediumTimeFormat (const String &format) noexcept
 
const StringgetLongTimeFormat () const noexcept
 
void setLongTimeFormat (const String &format) noexcept
 

Static Public Member Functions

static String getLocale () noexcept
 
static void setUserLocale () noexcept
 
static void setASCIILocale () noexcept
 
static bool setLocale (const String &locale) noexcept
 
static void getLocaleSpecific () noexcept
 

Public Attributes

String falseMessage
 
String trueMessage
 

Static Public Attributes

static const Locale POSIX
 

Detailed Description

Multi-language support.

This class provides multi-language support.

Version
1.1

Constructor & Destructor Documentation

◆ Locale()

Locale::Locale ( )
noexcept

Initializes locale.

Member Function Documentation

◆ getBoolean()

const String& Locale::getBoolean ( bool  value) const
inlinenoexcept

Returns boolean as string.

◆ getLocale()

static String Locale::getLocale ( )
staticnoexcept

Returns the current locale as a string.

◆ getLocaleSpecific()

static void Locale::getLocaleSpecific ( )
staticnoexcept

Queries the locale specific numeric and monetary information.

◆ setASCIILocale()

static void Locale::setASCIILocale ( )
staticnoexcept

Sets the locale of the application.

◆ setLocale()

static bool Locale::setLocale ( const String locale)
staticnoexcept

Sets the locale of the application.

Returns
True on success.

◆ setUserLocale()

static void Locale::setUserLocale ( )
staticnoexcept

Sets the application locale according to the environment settings.

Member Data Documentation

◆ POSIX

const Locale Locale::POSIX
static

POSIX locale.