|
||
class TExtendedLocale;
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.
Defined in TExtendedLocale
:
GetCurrencySymbol()
Get the Currency Symbol from SLocaleLocaleSettings objectGetLocale()
GetLocaleDllName(TLocaleAspect,TDes &)
Returns the name of the DLL containing the given bits of locale informationGetLongDateFormatSpec()
Get the Long Date Format from SLocaleTimeDateFormat objectGetPreferredCollationMethod(TInt)
GetShortDateFormatSpec()
Get the Short Date Format from SLocaleTimeDateFormat objectGetTimeFormatSpec()
Get the Time Format from SLocaleTimeDateFormat objectLoadLocale(const TDesC &)
Loads a locale Dll and get the locale informationLoadLocaleAspect(TUint,const TDesC &)
Loads a DLL and get some locale informationLoadSystemSettings()
Load system wide locale settingsSaveSystemSettings()
Make the current locale information system wideSetCurrencySymbol(const TDesC &)
Sets the currency symbolTExtendedLocale()
Default constructor.IMPORT_C TExtendedLocale();
Default constructor.
It constructs an empty object
This is an empty copy of TExtendedLocale. To get the system locale you can use TExtendedLocale::LoadSystemSettings()
. The current settings may be saved to the system with TLocale::SaveSystemSettings().
TExtendedLocale::LoadSystemSettings()
Load system wide locale settingsTExtendedLocale::SaveSystemSettings()
Make the current locale information system wideIMPORT_C void LoadSystemSettings();
Load system wide locale settings
It initialises this TExtendedLocale with the system wide locale settings. The settings stored in the TExtendedLocale are overwritten with the system wide locale.
TExtendedLocale::SaveSystemSettings()
Make the current locale information system wideCapability: | WriteDeviceData |
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.
|
IMPORT_C TInt LoadLocale(const TDesC &aLocaleDllName);
Loads a locale Dll
and get the locale information
It loads a locale DLL and it initialises the contents of this TExtendedLocale with the locale information stored in the DLL.
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.
|
|
TExtendedLocale::SaveSystemSettings()
Make the current locale information system wideIMPORT_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.
|
|
TExtendedLocale::SaveSystemSettings()
Make the current locale information system wideCapability: | WriteDeviceData |
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.
|
|
|
IMPORT_C TInt GetLocaleDllName(TLocaleAspect aLocaleDataSet, TDes &aDllName);
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.
|
|
IMPORT_C TCollationMethod GetPreferredCollationMethod(TInt index=0);
|
|
IMPORT_C TPtrC GetCurrencySymbol();
Get the Currency Symbol from SLocaleLocaleSettings
object
|
IMPORT_C TPtrC GetLongDateFormatSpec();
Get the Long Date Format from SLocaleTimeDateFormat
object
|
IMPORT_C TPtrC GetShortDateFormatSpec();
Get the Short Date Format from SLocaleTimeDateFormat
object
|