TExtendedLocale Class Reference
Extended locale class
This class holds a collection of locale information. It contains a TLocale internally. It has methods to load a locale DLL and to set the system wide locale information.
Constructor & Destructor Documentation
TExtendedLocale()
IMPORT_C | TExtendedLocale | ( | ) | |
Member Functions Documentation
DoLoadLocale(const TDesC &, TLibraryFunction *)
DoUpdateLanguageSettings(TLibraryFunction *)
DoUpdateLocaleSettings(TLibraryFunction *)
DoUpdateTimeDateFormat(TLibraryFunction *)
GetCurrencySymbol()
IMPORT_C TPtrC | GetCurrencySymbol | ( | ) | |
GetLocale()
Get the pointer to the TLocale object contained in this extended locale.
GetLocaleDllName(TLocaleAspect, TDes &)
Returns the name of the DLL containing the given bits of locale information
Given the bits of locale information specified in aLocaleDataSet, it returns the name of the locale DLL storing the information. TExtendedLocale can contain information from different DLLs.
Parameters
TLocaleAspect aLocaleDataSet | The TLocaleAspect specifying a group of locale properties |
TDes & aDllName | The descriptor that will contain the name of DLL containing the specifying bits of locale information (valid if the method is successful) |
GetLongDateFormatSpec()
IMPORT_C TPtrC | GetLongDateFormatSpec | ( | ) | |
GetPreferredCollationMethod(TInt)
Get the preferred collation method for the preferred charset.
Note that some charsets may contain more than one collation method (e.g "dictionary" v "phonebook" ordering) so an optional index parameter can be used to select between them.
-
panic
- USER 185 In both debug and release builds, if either the current charset is not set up or aIndex is greater than or equal to the total number of collation methods in the preferred charset in this locale.
TCollationMethod
Parameters
TInt index = 0 | Optional parameter specifying the index of the collation method in the locale to get. This is the responsibility of the caller to make sure that the index is less than the total number of collation methods in the preferred charset in this locale. |
GetShortDateFormatSpec()
IMPORT_C TPtrC | GetShortDateFormatSpec | ( | ) | |
GetTimeFormatSpec()
IMPORT_C TPtrC | GetTimeFormatSpec | ( | ) | |
LoadLocale(const TDesC &)
IMPORT_C TInt | LoadLocale | ( | const TDesC & | aLocaleDllName | ) | |
Parameters
const TDesC & aLocaleDllName | The name of the locale DLL to be loaded |
LoadLocale(const TDesC &, const TDesC &, const TDesC &)
IMPORT_C TInt | LoadLocale | ( | const TDesC & | aLanguageLocaleDllName, |
| const TDesC & | aRegionLocaleDllName, |
| const TDesC & | aCollationLocaleDllName |
| ) | |
Parameters
const TDesC & aLanguageLocaleDllName | The name of the language locale DLL to be loaded |
const TDesC & aRegionLocaleDllName | The name of the region locale DLL to be loaded |
const TDesC & aCollationLocaleDllName | The name of the collation locale DLL to be loaded |
LoadLocaleAspect(TUint, const TDesC &)
IMPORT_C TInt | LoadLocaleAspect | ( | TUint | aAspectGroup, |
| const TDesC & | aLocaleDllName |
| ) | |
Loads a DLL and get some locale information
It loads the specified locale DLL and depending on the aAspectGroup it overwrites locale information in this TExtendedLocale with the locale information stored in the DLL. aAspectGroup is a bitmap of TLocaleAspect values specifying what to be overwritten. The locale information is only stored in this TExtendedLocale. If you want to set the system wide settings with the locale information in the DLL, you can call TExtendedLocale::SaveSystemSettings after calling this function.
TLocaleAspect TExtendedLocale::SaveSystemSettings
Parameters
TUint aAspectGroup | A bitmap of TLocaleAspect values specifying what to be overwritten in this TExtendedLocale. (eg.: ELocaleLanguageSettings | ELocaleTimeDateSettings) |
const TDesC & aLocaleDllName | The name of the locale DLL to be loaded |
LoadLocaleAspect(const TDesC &)
IMPORT_C TInt | LoadLocaleAspect | ( | const TDesC & | aLocaleDllName | ) | |
Parameters
const TDesC & aLocaleDllName | The name of the locale DLL to be loaded |
LoadSystemSettings()
IMPORT_C void | LoadSystemSettings | ( | ) | |
SaveSystemSettings()
IMPORT_C TInt | SaveSystemSettings | ( | ) | |
Make the current locale information system wide
It overwrites the system wide locale information with the locale information stored in this TExtendedLocale. This will generate a notification for system locale changes. In case of an error, the locale might be in an unconsistent state.
-
capability
- WriteDeviceData
SetCurrencySymbol(const TDesC &)
IMPORT_C TInt | SetCurrencySymbol | ( | const TDesC & | aSymbol | ) | |
Sets the currency symbol
It sets the currency symbol. The maximum lenght for the currency symbol is KMaxCurrencySymbol. Trying to pass a descriptor longer than that, will result in a panic.
-
panic
- USER 119, if the length of aSymbol is greater than KMaxCurrencySymbol.
-
capability
- WriteDeviceData
Parameters
const TDesC & aSymbol | The new currency symbol |
Member Data Documentation
const LCharSet * iDefaultCharSet
const LCharSet * | iDefaultCharSet | [private] |
SLocaleLanguage
iLanguageSettings
SLocaleLocaleSettings
iLocaleExtraSettings
SLocaleTimeDateFormat
iLocaleTimeDateFormat
const LCharSet * iPreferredCharSet
const LCharSet * | iPreferredCharSet | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.