|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Sets and gets the system's locale settings. More...
#include <e32std.h>
Public Types | |
| enum | TNegativeCurrencyFormat { ELeadingMinusSign , EInBrackets , ETrailingMinusSign , EInterveningMinusSign } |
| Indicates how negative currency values are formatted. More... | |
| enum | { EFlagNegativeLoseSpace = 0x00000001 , EFlagNegativeCurrencySymbolOpposite =0x00000002 } |
| Flags for negative currency values formatting. More... | |
| enum | TDeviceTimeState { EDeviceUserTime , ENITZNetworkTimeSync } |
| Indicates how the device universal time is maintained. More... | |
Public Member Functions | |
| IMPORT_C | TLocale () |
| Default constructor. | |
| TLocale (TInt) | |
| IMPORT_C void | Refresh () |
| Refreshes the contents of this object with the system's locale settings. | |
| IMPORT_C TInt | Set () const |
| Transfers the locale settings from this object to the system. | |
| IMPORT_C void | FormatCurrency (TDes &aText, TInt aAmount) |
| Renders a currency value as text, based on the locale's currency and numeric format settings. | |
| IMPORT_C void | FormatCurrency (TDes &aText, TInt64 aAmount) |
| Renders a currency value as text, based on the locale's currency and numeric format settings. | |
| IMPORT_C void | FormatCurrency (TDes &aText, TDesOverflow &aOverflowHandler, TInt aAmount) |
| Renders a currency value as text, based on the locale's currency and numeric format settings. | |
| IMPORT_C void | FormatCurrency (TDes &aText, TDesOverflow &aOverflowHandler, TInt64 aAmount) |
| Renders a currency value as text, based on the locale's currency and numeric format settings. | |
| TInt | CountryCode () const |
| Gets the code which is used to select country-specific locale data. | |
| void | SetCountryCode (TInt aCode) |
| Sets the value which is used to select country-specific locale data. | |
| TTimeIntervalSeconds | UniversalTimeOffset () const |
| Gets the locale's universal time offset. | |
| TDateFormat | DateFormat () const |
| Gets the date format. | |
| void | SetDateFormat (TDateFormat aFormat) |
| Sets the date format. | |
| TTimeFormat | TimeFormat () const |
| Gets the time format (12 or 24 hour). | |
| void | SetTimeFormat (TTimeFormat aFormat) |
| Sets the time format (12 or 24 hour). | |
| TLocalePos | CurrencySymbolPosition () const |
| Gets the currency symbol position. | |
| void | SetCurrencySymbolPosition (TLocalePos aPos) |
| Sets the currency symbol position. | |
| TBool | CurrencySpaceBetween () const |
| Gets whether or not a space is inserted between the currency symbol and the currency value. | |
| void | SetCurrencySpaceBetween (TBool aSpace) |
| Sets whether a space is inserted between the currency symbol and the currency amount. | |
| TInt | CurrencyDecimalPlaces () const |
| Gets the number of decimal places to which currency values are set. | |
| void | SetCurrencyDecimalPlaces (TInt aPlaces) |
| Sets the number of decimal places to which currency values should be set. | |
| TBool | CurrencyNegativeInBrackets () const |
| Gets whether negative currency values are enclosed in brackets rather than being preceded by a minus sign. | |
| void | SetCurrencyNegativeInBrackets (TBool aBool) |
| Sets whether negative currency values are enclosed in brackets rather than being preceded by a minus sign. | |
| TBool | CurrencyTriadsAllowed () const |
| Gets whether triads are allowed in currency values. | |
| void | SetCurrencyTriadsAllowed (TBool aBool) |
| Sets whether triads are allowed in currency values. | |
| TChar | ThousandsSeparator () const |
| Gets the character used to separate groups of three digits to the left of the decimal separator. | |
| void | SetThousandsSeparator (const TChar &aChar) |
| Sets the character to be used to separate groups of three digits to the left of the decimal separator. | |
| TChar | DecimalSeparator () const |
| Gets the character used to separate a whole number from its fractional part. | |
| void | SetDecimalSeparator (const TChar &aChar) |
| Sets the character to be used to separate a whole number from its fractional part. | |
| TChar | DateSeparator (TInt aIndex) const |
| Gets one of the four characters used to separate the day, month and year components of the date. | |
| void | SetDateSeparator (const TChar &aChar, TInt aIndex) |
| Sets one of the four characters used to separate the day, month and year components of the date. | |
| TChar | TimeSeparator (TInt aIndex) const |
| Gets one of the four characters used to separate the hour, second and minute components of the time. | |
| void | SetTimeSeparator (const TChar &aChar, TInt aIndex) |
| Sets one of the four characters used to separate the hour, minute and second components of the date. | |
| TBool | AmPmSpaceBetween () const |
| Tests whether or not a space is inserted between the time and the preceding or trailing am/pm text. | |
| void | SetAmPmSpaceBetween (TBool aSpace) |
| Sets whether a space is inserted between the time and the preceding or trailing am/pm text. | |
| TLocalePos | AmPmSymbolPosition () const |
| Gets the am/pm text position (before or after the time value). | |
| void | SetAmPmSymbolPosition (TLocalePos aPos) |
| Sets the am/pm text position (before or after the time value). | |
| TUint | DaylightSaving () const |
| Gets the zones in which daylight saving is in effect. | |
| TBool | QueryHomeHasDaylightSavingOn () const |
| Tests whether or not daylight saving is set for the home city. | |
| TDaylightSavingZone | HomeDaylightSavingZone () const |
| Gets the daylight saving zone in which the home city is located. | |
| TUint | WorkDays () const |
| Gets a bit mask representing the days of the week which are considered as working days. | |
| void | SetWorkDays (TUint aMask) |
| Sets the days of the week which are considered as working days. | |
| TDay | StartOfWeek () const |
| Gets the day which is considered the first day of the week. | |
| void | SetStartOfWeek (TDay aDay) |
| Sets the day which is considered to be the first day of the week. | |
| TClockFormat | ClockFormat () const |
| Gets the clock display format. | |
| void | SetClockFormat (TClockFormat aFormat) |
| Sets the clock display format. | |
| TUnitsFormat | UnitsGeneral () const |
| Gets the general units of measurement. | |
| void | SetUnitsGeneral (TUnitsFormat aFormat) |
| Sets the general units of measurement. | |
| TUnitsFormat | UnitsDistanceShort () const |
| Gets the units of measurement for short distances. | |
| void | SetUnitsDistanceShort (TUnitsFormat aFormat) |
| Sets the units of measurement for short distances. | |
| TUnitsFormat | UnitsDistanceLong () const |
| Gets the units of measurement for long distances. | |
| void | SetUnitsDistanceLong (TUnitsFormat aFormat) |
| Sets the units of measurement for long distances. | |
| TNegativeCurrencyFormat | NegativeCurrencyFormat () const |
| Gets the negative currency format. | |
| void | SetNegativeCurrencyFormat (TNegativeCurrencyFormat aNegativeCurrencyFormat) |
| Sets the negative currency format. | |
| TBool | NegativeLoseSpace () const |
| Gets whether negative currency values lose the space between the currency symbol and the value. | |
| void | SetNegativeLoseSpace (TBool aBool) |
| Sets whether negative currency values lose the space between the currency symbol and the value. | |
| TBool | NegativeCurrencySymbolOpposite () const |
| Gets whether in negative currency values, the position of the currency symbol is set to be the opposite of the position used for non-negative values (before or after the value, as set by SetCurrencySymbolPosition()). | |
| void | SetNegativeCurrencySymbolOpposite (TBool aBool) |
| Sets whether the position of the currency symbol for negative currency values should be the opposite of the position used for non-negative values (before or after the value, as set by SetCurrencySymbolPosition()). | |
| TLanguage | LanguageDowngrade (TInt aIndex) const |
| Gets the language that is stored at the specified index into the customisable part of the language downgrade path. | |
| void | SetLanguageDowngrade (TInt aIndex, TLanguage aLanguage) |
| Sets a language in the customisable part of the language downgrade path. | |
| TDigitType | DigitType () const |
| Gets the number mode stored in the locale. | |
| void | SetDigitType (TDigitType aDigitType) |
| Sets the number mode for the locale. | |
| TDeviceTimeState | DeviceTime () const |
| Gets the device time state. | |
| void | SetDeviceTime (TDeviceTimeState aState) |
| Sets the device time state. | |
| TInt | RegionCode () const |
| void | SetDefaults () |
| Internal component API. | |
Friends | |
| class | TExtendedLocale |
Sets and gets the system's locale settings.
Symbian OS maintains the locale information internally. On construction, this object is initialized with the system information for all locale items.
| anonymous enum |
Flags for negative currency values formatting.
Indicates how the device universal time is maintained.
Indicates how negative currency values are formatted.
| IMPORT_C TLocale::TLocale | ( | ) |
Default constructor.
It constructs the object with the system's locale settings.
A single copy of the locale information is maintained by the system. This copy may be refreshed under application control with TLocale::Refresh(), and the settings may be saved to the system with TLocale::Set(). However, the settings are never updated by the system apart from under application control. This enables applications to guarantee that consistent locale information is used.
TLocale::Refresh() TLocale::Set()
(generated from Symbian Developer Library)
|
inline |
|
inline |
Tests whether or not a space is inserted between the time and the preceding or trailing am/pm text.
(generated from Symbian Developer Library)
|
inline |
Gets the am/pm text position (before or after the time value).
(generated from Symbian Developer Library)
|
inline |
Gets the clock display format.
(generated from Symbian Developer Library)
|
inline |
Gets the code which is used to select country-specific locale data.
The country code is the code used as the international dialling prefix. This code is also used to identify a country by the dialling software.
(generated from Symbian Developer Library)
|
inline |
Gets the number of decimal places to which currency values are set.
(generated from Symbian Developer Library)
|
inline |
Gets whether negative currency values are enclosed in brackets rather than being preceded by a minus sign.
This is deprecated, use NegativeCurrencyFormat() instead.
TLocale::NegativeCurrencyFormat
(generated from Symbian Developer Library)
|
inline |
Gets whether or not a space is inserted between the currency symbol and the currency value.
For negative currency values, the space can be removed using SetNegativeLoseSpace().
(generated from Symbian Developer Library)
|
inline |
Gets the currency symbol position.
For negative currency values, this position may be reversed using SetNegativeCurrencySymbolOpposite().
TLocale::SetNegativeCurrencySymbolOpposite
(generated from Symbian Developer Library)
|
inline |
Gets whether triads are allowed in currency values.
Triads are groups of three digits separated by the thousands separator.
(generated from Symbian Developer Library)
|
inline |
Gets the date format.
(generated from Symbian Developer Library)
|
inline |
Gets one of the four characters used to separate the day, month and year components of the date.
If the four separators are represented by S0, S1, S2 and S3 and the three date components are represented by XX, YY and ZZ, then the separators are located: S0 XX S1 YY S2 ZZ S3.
| aIndex | An index indicating which of the four separators is being accessed. This must be a value between zero and three inclusive. |
(generated from Symbian Developer Library)
|
inline |
Gets the zones in which daylight saving is in effect.
If daylight saving is in effect, one hour is added to the time.
Use TLocale::QueryHomeHasDaylightSavingOn() to find out whether daylight saving is in effect for the home city. This is because the daylight saving setting for the home city may differ from that of the zone in which home is located.
TLocale::QueryHomeHasDaylightSavingOn TDaylightSavingZoneUse the timezone server to retrieve information on timezones and DST. This method will always indicate that DST is inactive, in order to preserve compatibility.
(generated from Symbian Developer Library)
|
inline |
Gets the character used to separate a whole number from its fractional part.
(generated from Symbian Developer Library)
|
inline |
Gets the device time state.
Use the timezone server to coordinate automatic time adjustment.
(generated from Symbian Developer Library)
|
inline |
Gets the number mode stored in the locale.
(generated from Symbian Developer Library)
| IMPORT_C void TLocale::FormatCurrency | ( | TDes & | aText, |
| TDesOverflow & | aOverflowHandler, | ||
| TInt | aAmount | ||
| ) |
Renders a currency value as text, based on the locale's currency and numeric format settings.
These settings include the currency symbol, the symbol's position and the way negative values are formatted. If aText is not long enough to hold the formatted currency value, the overflow handler's Overflow() function is called.
| aText | On return, contains the currency value as text, formatted according to the locale's currency format settings. |
| aOverflowHandler | An object derived from TDesOverflow which handles descriptor overflows. |
| aAmount | The currency value to be formatted. |
(generated from Symbian Developer Library)
| IMPORT_C void TLocale::FormatCurrency | ( | TDes & | aText, |
| TDesOverflow & | aOverflowHandler, | ||
| TInt64 | aAmount | ||
| ) |
Renders a currency value as text, based on the locale's currency and numeric format settings.
These settings include the currency symbol, the symbol's position and the way negative values are formatted. If aText is not long enough to hold the formatted currency value, the overflow handler's Overflow() function is called.
| aText | On return, contains the currency value as text, formatted according to the locale's currency format settings. |
| aOverflowHandler | An object derived from TDesOverflow which handles descriptor overflows. |
| aAmount | The currency value to be formatted. |
(generated from Symbian Developer Library)
| IMPORT_C void TLocale::FormatCurrency | ( | TDes & | aText, |
| TInt | aAmount | ||
| ) |
Renders a currency value as text, based on the locale's currency and numeric format settings.
These settings include the currency symbol, the symbol's position and the way negative values are formatted.
| aText | On return, contains the currency value as text, formatted according to the locale's currency format settings. |
| aAmount | The currency value to be formatted. |
Panic condition: USER 11, if aText is not long enough to hold the formatted value.
(generated from Symbian Developer Library)
| IMPORT_C void TLocale::FormatCurrency | ( | TDes & | aText, |
| TInt64 | aAmount | ||
| ) |
Renders a currency value as text, based on the locale's currency and numeric format settings.
These settings include the currency symbol, the symbol's position and the way negative values are formatted.
| aText | On return, contains the currency value as text, formatted according to the locale's currency format settings. |
| aAmount | The currency value to be formatted. |
Panic condition: USER 11, if aText is not long enough to hold the formatted value.
(generated from Symbian Developer Library)
|
inline |
Gets the daylight saving zone in which the home city is located.
Use the timezone server to retrieve information on timezones and DST.
(generated from Symbian Developer Library)
|
inline |
Gets the language that is stored at the specified index into the customisable part of the language downgrade path.
The second, third and fourth languages in the language downgrade path can be customised. These can be enquired using this function. The first language in the path is always the language of the current locale, as returned by User::Language().
The languages in the downgrade path are used in turn by the BaflUtils::NearestLanguageFile() function to find the best matching language-specific version of a language-neutral filename.
The full language downgrade path can be retrieved using BaflUtils::GetDowngradePath().
BaflUtils::NearestLanguageFile BaflUtils::GetDowngradePath
| aIndex | An index into the customisable part of the language downgrade path. Between zero and two inclusive. |
(generated from Symbian Developer Library)
|
inline |
Gets the negative currency format.
(generated from Symbian Developer Library)
|
inline |
Gets whether in negative currency values, the position of the currency symbol is set to be the opposite of the position used for non-negative values (before or after the value, as set by SetCurrencySymbolPosition()).
TLocale::SetCurrencySymbolPosition
(generated from Symbian Developer Library)
|
inline |
Gets whether negative currency values lose the space between the currency symbol and the value.
(generated from Symbian Developer Library)
|
inline |
Tests whether or not daylight saving is set for the home city.
Use the timezone server to retrieve information on timezones and DST. This method will always indicate that DST is inactive, in order to preserve compatibility.
(generated from Symbian Developer Library)
| IMPORT_C void TLocale::Refresh | ( | ) |
Refreshes the contents of this object with the system's locale settings.
(generated from Symbian Developer Library)
|
inline |
| IMPORT_C TInt TLocale::Set | ( | ) | const |
Transfers the locale settings from this object to the system.
Note that the timezone offset and daylight savings flags are ignored as setting these through TLocale is no longer supported.
After this function has been called, other applications may use the new settings for newly-constructed TLocale objects, or if they use TLocale::Refresh(), to refresh their settings from the system copy.
(generated from Symbian Developer Library)
|
inline |
Sets whether a space is inserted between the time and the preceding or trailing am/pm text.
(generated from Symbian Developer Library)
|
inline |
Sets the am/pm text position (before or after the time value).
(generated from Symbian Developer Library)
|
inline |
Sets the clock display format.
| aFormat | The clock display format. |
(generated from Symbian Developer Library)
|
inline |
Sets the value which is used to select country-specific locale data.
This value can be retrieved by using TLocale::CountryCode(). The country code is the code used as the international dialling prefix. This code is also used to identify a country by the dialling software.
| aCode | The country code. |
(generated from Symbian Developer Library)
|
inline |
Sets the number of decimal places to which currency values should be set.
| aPlaces | The number of decimal places. |
(generated from Symbian Developer Library)
|
inline |
Sets whether negative currency values are enclosed in brackets rather than being preceded by a minus sign.
This is deprecated, use SetNegativeCurrencyFormat() instead.
TLocale::SetNegativeCurrencyFormat
| aBool | ETrue, if a negative currency value must be enclosed in brackets without a minus sign; EFalse, if a negative currency value is preceded by a minus sign without any enclosing brackets. |
(generated from Symbian Developer Library)
|
inline |
Sets whether a space is inserted between the currency symbol and the currency amount.
| aSpace | ETrue if a space is inserted; EFalse if not. |
(generated from Symbian Developer Library)
|
inline |
Sets the currency symbol position.
| aPos | The currency symbol position. |
(generated from Symbian Developer Library)
|
inline |
Sets whether triads are allowed in currency values.
| aBool | ETrue if triads are allowed; EFalse if triads not allowed. |
(generated from Symbian Developer Library)
|
inline |
Sets the date format.
| aFormat | The date format to be used. |
(generated from Symbian Developer Library)
|
inline |
Sets one of the four characters used to separate the day, month and year components of the date.
If the four separators are represented by S0, S1, S2 and S3 and the three date components are represented by XX, YY and ZZ, then the separators are located: S0 XX S1 YY S2 ZZ S3.
| aChar | A date separator character to be used. |
| aIndex | An index indicating which of the four separators is being accessed. This must be a value between zero and three inclusive. |
(generated from Symbian Developer Library)
|
inline |
Sets the character to be used to separate a whole number from its fractional part.
| aChar | The character to be used as the decimal separator. |
(generated from Symbian Developer Library)
| void TLocale::SetDefaults | ( | ) |
Internal component API.
|
inline |
Sets the device time state.
Use the timezone server to coordinate automatic time adjustment.
| aState | The device time state. |
(generated from Symbian Developer Library)
|
inline |
Sets the number mode for the locale.
| aDigitType | The number mode to be set. |
(generated from Symbian Developer Library)
|
inline |
Sets a language in the customisable part of the language downgrade path.
BaflUtils::NearestLanguageFile BaflUtils::GetDowngradePath
| aIndex | An index into the customisable part of the path at which to add the language, a value between zero and two. |
| aLanguage | The language to add. ELangNone is considered to be the last language in the path, no more will be searched, so can be used to specify that no language downgrade is required. |
(generated from Symbian Developer Library)
|
inline |
Sets the negative currency format.
| aNegativeCurrencyFormat | How negative currency values are formatted. |
(generated from Symbian Developer Library)
|
inline |
Sets whether the position of the currency symbol for negative currency values should be the opposite of the position used for non-negative values (before or after the value, as set by SetCurrencySymbolPosition()).
TLocale::SetCurrencySymbolPosition
| aBool | ETrue to set the position of the currency symbol in negative currency values to be the opposite of the position as set using SetCurrencySymbolPosition(). EFalse to leave the position unchanged. |
(generated from Symbian Developer Library)
|
inline |
Sets whether negative currency values lose the space between the currency symbol and the value.
| aBool | ETrue to set a flag which indicates that negative currency values should lose the space between the value and the symbol. EFalse to unset it. |
(generated from Symbian Developer Library)
|
inline |
Sets the day which is considered to be the first day of the week.
| aDay | The first day of the week. |
(generated from Symbian Developer Library)
|
inline |
Sets the character to be used to separate groups of three digits to the left of the decimal separator.
A thousands separator character is only displayed in currency values if currency triads are allowed.
| aChar | The character to be used as the thousands separator. |
(generated from Symbian Developer Library)
|
inline |
Sets the time format (12 or 24 hour).
| aFormat | The time format. |
(generated from Symbian Developer Library)
|
inline |
Sets one of the four characters used to separate the hour, minute and second components of the date.
If the four separators are represented by S0, S1, S2 and S3 and the three time components are represented by XX, YY and ZZ, then the separators are located: S0 XX S1 YY S2 ZZ S3.
| aChar | A time separator character to be used. |
| aIndex | An index indicating which of the four separators is being accessed. This must be a value between zero and three inclusive. |
(generated from Symbian Developer Library)
|
inline |
Sets the units of measurement for long distances.
Long distances are those which would normally be represented by either miles or kilometres.
| aFormat | Units of measurement for long distances. |
(generated from Symbian Developer Library)
|
inline |
Sets the units of measurement for short distances.
Short distances are those which would normally be represented by either metres and centimetres or feet and inches.
| aFormat | Units of measurement for short distances. |
(generated from Symbian Developer Library)
|
inline |
Sets the general units of measurement.
This function should be used when both short and long distances use the same units of measurement.
| aFormat | General units of measurement. |
(generated from Symbian Developer Library)
|
inline |
Sets the days of the week which are considered as working days.
| aMask | A bit mask of seven bits indicating (by being set) which days are workdays. The least significant bit corresponds to Monday, the next bit is Tuesday and so on. |
(generated from Symbian Developer Library)
|
inline |
Gets the day which is considered the first day of the week.
(generated from Symbian Developer Library)
|
inline |
Gets the character used to separate groups of three digits to the left of the decimal separator.
A thousands separator character is only displayed in currency values if currency triads are allowed.
(generated from Symbian Developer Library)
|
inline |
Gets the time format (12 or 24 hour).
(generated from Symbian Developer Library)
|
inline |
Gets one of the four characters used to separate the hour, second and minute components of the time.
If the four separators are represented by S0, S1, S2 and S3 and the three time components are represented by XX, YY and ZZ, then the separators are located: S0 XX S1 YY S2 ZZ S3.
| aIndex | An index indicating which of the four separators is being accessed. This must be a value between zero and three inclusive. |
(generated from Symbian Developer Library)
|
inline |
Gets the units of measurement for long distances.
Long distances are those which would normally be represented by either miles or kilometres.
(generated from Symbian Developer Library)
|
inline |
Gets the units of measurement for short distances.
Short distances are those which would normally be represented by either metres and centimetres or feet and inches.
(generated from Symbian Developer Library)
|
inline |
Gets the general units of measurement.
This function should be used when both short and long distances use the same units of measurement.
(generated from Symbian Developer Library)
|
inline |
Gets the locale's universal time offset.
Use User::UTCOffset to get the current offset inclusive of daylight savings time. This function returns the same value, for compatibility.
(generated from Symbian Developer Library)
|
inline |
Gets a bit mask representing the days of the week which are considered as working days.
(generated from Symbian Developer Library)
|
friend |