Locale Manager
[System]


Defines

#define ALP_LOCALE_ERR_ALREADY_EXISTS   (ALP_CLASS_LOCALE | 0x00060000)
 error code: locale already exists
#define ALP_LOCALE_ERR_DATABASE   (ALP_CLASS_LOCALE | 0x00030000)
 error code: I/O error
#define ALP_LOCALE_ERR_IN_USE   (ALP_CLASS_LOCALE | 0x00070000)
 error code: locale is in use
#define ALP_LOCALE_ERR_LOCALE_NOT_FOUND   (ALP_CLASS_LOCALE | 0x00010000)
 error code: locale not found/defined
#define ALP_LOCALE_ERR_OUT_OF_MEMORY   (ALP_CLASS_LOCALE | 0x00040000)
 error code: out of memory or allocated memory is too small
#define ALP_LOCALE_ERR_PERMISSION_DENIED   (ALP_CLASS_LOCALE | 0x00050000)
 error code: operation is not permitted
#define ALP_LOCALE_ERR_SETTING_NOT_FOUND   (ALP_CLASS_LOCALE | 0x00020000)
 error code: locale setting not found/defined
#define ALP_NOTIFY_EVENT_LOCALE_FORMAT_CHANGED   "/alp/localemgr/format_changed"
 Notification type which is broadcasted when the format locale is changed.
#define ALP_NOTIFY_EVENT_LOCALE_SYSTEM_CHANGED   "/alp/localemgr/system_changed"
 Notification type which is broadcasted when the system locale is changed.
#define AlpLocChoiceAprSingleLetterFormat   ((AlpLocLocaleSettingChoice)36)
 char[] - single letter April
#define AlpLocChoiceAugSingleLetterFormat   ((AlpLocLocaleSettingChoice)40)
 char[] - single letter August
#define AlpLocChoiceCountryName   ((AlpLocLocaleSettingChoice)5)
 gchar[] - Name of the country (localized)
#define AlpLocChoiceCurrencyDecimalPlaces   ((AlpLocLocaleSettingChoice)15)
 gint - Number of decimals for currency (e.g., 2 for $10.12)
#define AlpLocChoiceCurrencyName   ((AlpLocLocaleSettingChoice)12)
 gchar[] - Name of local currency (e.g., "US Dollar")
#define AlpLocChoiceCurrencySymbol   ((AlpLocLocaleSettingChoice)13)
 char[] - Currency symbol (e.g., "$")
#define AlpLocChoiceDateFormat   ((AlpLocLocaleSettingChoice)6)
 DateFormatType.
#define AlpLocChoiceDayDateFormat   ((AlpLocLocaleSettingChoice)24)
 DayDateFormatType.
#define AlpLocChoiceDayLongDateFormat   ((AlpLocLocaleSettingChoice)25)
 DayDateFormatType.
#define AlpLocChoiceDecSingleLetterFormat   ((AlpLocLocaleSettingChoice)44)
 char[] - single letter December
#define AlpLocChoiceFebSingleLetterFormat   ((AlpLocLocaleSettingChoice)34)
 char[] - single letter February
#define AlpLocChoiceFriSingleLetterFormat   ((AlpLocLocaleSettingChoice)30)
 char[] - single letter Friday
#define AlpLocChoiceJanSingleLetterFormat   ((AlpLocLocaleSettingChoice)33)
 char[] - single letter January
#define AlpLocChoiceJulSingleLetterFormat   ((AlpLocLocaleSettingChoice)39)
 char[] - single letter July
#define AlpLocChoiceJunSingleLetterFormat   ((AlpLocLocaleSettingChoice)38)
 char[] - single letter June
#define AlpLocChoiceLongDateFormat   ((AlpLocLocaleSettingChoice)7)
 DateFormatType.
#define AlpLocChoiceMarSingleLetterFormat   ((AlpLocLocaleSettingChoice)35)
 char[] - single letter March
#define AlpLocChoiceMaySingleLetterFormat   ((AlpLocLocaleSettingChoice)37)
 char[] - single letter May
#define AlpLocChoiceMeasurementSystem   ((AlpLocLocaleSettingChoice)16)
 MeasurementSystemType - Metric, English, etc.
#define AlpLocChoiceMonSingleLetterFormat   ((AlpLocLocaleSettingChoice)26)
 char[] - single letter Monday
#define AlpLocChoiceNovSingleLetterFormat   ((AlpLocLocaleSettingChoice)43)
 char[] - single letter November
#define AlpLocChoiceNumberFormat   ((AlpLocLocaleSettingChoice)11)
 NumberFormatType - Specifies decimal and thousands separator characters.
#define AlpLocChoiceOctSingleLetterFormat   ((AlpLocLocaleSettingChoice)42)
 char[] - single letter October
#define AlpLocChoiceOutboundVObjectEncoding   ((AlpLocLocaleSettingChoice)22)
 CharEncodingType - Outbound encoding for vObjects.
#define AlpLocChoicePrimaryEmailEncoding   ((AlpLocLocaleSettingChoice)20)
 char[] - First attempt at Email encoding
#define AlpLocChoicePrimarySMSEncoding   ((AlpLocLocaleSettingChoice)18)
 CharEncodingType - First attempt at SMS encoding.
#define AlpLocChoiceSatSingleLetterFormat   ((AlpLocLocaleSettingChoice)31)
 char[] - single letter Saturday
#define AlpLocChoiceSecondaryEmailEncoding   ((AlpLocLocaleSettingChoice)21)
 char[] - Second attempt at Email encoding
#define AlpLocChoiceSecondarySMSEncoding   ((AlpLocLocaleSettingChoice)19)
 CharEncodingType - Second attempt at SMS encoding.
#define AlpLocChoiceSepSingleLetterFormat   ((AlpLocLocaleSettingChoice)41)
 char[] - single letter September
#define AlpLocChoiceSunSingleLetterFormat   ((AlpLocLocaleSettingChoice)32)
 char[] - single letter Sunday
#define AlpLocChoiceThuSingleLetterFormat   ((AlpLocLocaleSettingChoice)29)
 char[] - single letter Thursday
#define AlpLocChoiceTimeFormat   ((AlpLocLocaleSettingChoice)8)
 TimeFormatType.
#define AlpLocChoiceTimeZone   ((AlpLocLocaleSettingChoice)10)
 gint - Default GMT offset minutes, + for east of GMT, - for west
#define AlpLocChoiceTueSingleLetterFormat   ((AlpLocLocaleSettingChoice)27)
 char[] - single letter Tuesday
#define AlpLocChoiceUniqueCurrencySymbol   ((AlpLocLocaleSettingChoice)14)
 char[] - Unique currency symbol (e.g., "US$")
#define AlpLocChoiceWedSingleLetterFormat   ((AlpLocLocaleSettingChoice)28)
 char[] - single letter Wednesday
#define AlpLocChoiceWeekStartDay   ((AlpLocLocaleSettingChoice)9)
 gint - Weekday for calendar column 1 (sunday=0, monday=1, etc.)

Typedefs

typedef gint AlpLocLocaleSettingChoice
 Constants that you can pass to the alp_loc_get_locale_setting() function to specify which locale setting to retrieve.
typedef void * AlpLocLocaleType
 internal locale type

Functions

alp_status_t alp_loc_get_country_name (AlpLocLocaleType *pLocale, gchar *pName, gint *nSize)
alp_status_t alp_loc_get_format_locale (AlpLocLocaleType *pLocale)
alp_status_t alp_loc_get_format_locales (AlpLocLocaleType *pLocale, int *count)
alp_status_t alp_loc_get_language_name (AlpLocLocaleType *pLocale, gchar *pName, gint *nSize)
alp_status_t alp_loc_get_locale_setting (AlpLocLocaleType *pLocale, AlpLocLocaleSettingChoice nChoice, void *pValue, gint *nSize)
alp_status_t alp_loc_get_posix_name (AlpLocLocaleType *pLocale, gchar *pName, gint *nSize)
alp_status_t alp_loc_get_rom_locale (AlpLocLocaleType *pLocale)
alp_status_t alp_loc_get_system_locale (AlpLocLocaleType *pLocale)
alp_status_t alp_loc_get_system_locales (AlpLocLocaleType *pLocale, int *count)
alp_status_t alp_loc_set_format_locale (AlpLocLocaleType *pLocale)
alp_status_t alp_loc_set_locale_setting (AlpLocLocaleType *pLocale, AlpLocLocaleSettingChoice nChoice, void *pValue, gint nSize)
alp_status_t alp_loc_set_system_locale (AlpLocLocaleType *pLocale)


Define Documentation

#define ALP_LOCALE_ERR_ALREADY_EXISTS   (ALP_CLASS_LOCALE | 0x00060000)
 

error code: locale already exists

#define ALP_LOCALE_ERR_DATABASE   (ALP_CLASS_LOCALE | 0x00030000)
 

error code: I/O error

#define ALP_LOCALE_ERR_IN_USE   (ALP_CLASS_LOCALE | 0x00070000)
 

error code: locale is in use

#define ALP_LOCALE_ERR_LOCALE_NOT_FOUND   (ALP_CLASS_LOCALE | 0x00010000)
 

error code: locale not found/defined

#define ALP_LOCALE_ERR_OUT_OF_MEMORY   (ALP_CLASS_LOCALE | 0x00040000)
 

error code: out of memory or allocated memory is too small

#define ALP_LOCALE_ERR_PERMISSION_DENIED   (ALP_CLASS_LOCALE | 0x00050000)
 

error code: operation is not permitted

#define ALP_LOCALE_ERR_SETTING_NOT_FOUND   (ALP_CLASS_LOCALE | 0x00020000)
 

error code: locale setting not found/defined

#define ALP_NOTIFY_EVENT_LOCALE_FORMAT_CHANGED   "/alp/localemgr/format_changed"
 

Notification type which is broadcasted when the format locale is changed.

#define ALP_NOTIFY_EVENT_LOCALE_SYSTEM_CHANGED   "/alp/localemgr/system_changed"
 

Notification type which is broadcasted when the system locale is changed.

#define AlpLocChoiceAprSingleLetterFormat   ((AlpLocLocaleSettingChoice)36)
 

char[] - single letter April

#define AlpLocChoiceAugSingleLetterFormat   ((AlpLocLocaleSettingChoice)40)
 

char[] - single letter August

#define AlpLocChoiceCountryName   ((AlpLocLocaleSettingChoice)5)
 

gchar[] - Name of the country (localized)

#define AlpLocChoiceCurrencyDecimalPlaces   ((AlpLocLocaleSettingChoice)15)
 

gint - Number of decimals for currency (e.g., 2 for $10.12)

#define AlpLocChoiceCurrencyName   ((AlpLocLocaleSettingChoice)12)
 

gchar[] - Name of local currency (e.g., "US Dollar")

#define AlpLocChoiceCurrencySymbol   ((AlpLocLocaleSettingChoice)13)
 

char[] - Currency symbol (e.g., "$")

#define AlpLocChoiceDateFormat   ((AlpLocLocaleSettingChoice)6)
 

DateFormatType.

#define AlpLocChoiceDayDateFormat   ((AlpLocLocaleSettingChoice)24)
 

DayDateFormatType.

#define AlpLocChoiceDayLongDateFormat   ((AlpLocLocaleSettingChoice)25)
 

DayDateFormatType.

#define AlpLocChoiceDecSingleLetterFormat   ((AlpLocLocaleSettingChoice)44)
 

char[] - single letter December

#define AlpLocChoiceFebSingleLetterFormat   ((AlpLocLocaleSettingChoice)34)
 

char[] - single letter February

#define AlpLocChoiceFriSingleLetterFormat   ((AlpLocLocaleSettingChoice)30)
 

char[] - single letter Friday

#define AlpLocChoiceJanSingleLetterFormat   ((AlpLocLocaleSettingChoice)33)
 

char[] - single letter January

#define AlpLocChoiceJulSingleLetterFormat   ((AlpLocLocaleSettingChoice)39)
 

char[] - single letter July

#define AlpLocChoiceJunSingleLetterFormat   ((AlpLocLocaleSettingChoice)38)
 

char[] - single letter June

#define AlpLocChoiceLongDateFormat   ((AlpLocLocaleSettingChoice)7)
 

DateFormatType.

#define AlpLocChoiceMarSingleLetterFormat   ((AlpLocLocaleSettingChoice)35)
 

char[] - single letter March

#define AlpLocChoiceMaySingleLetterFormat   ((AlpLocLocaleSettingChoice)37)
 

char[] - single letter May

#define AlpLocChoiceMeasurementSystem   ((AlpLocLocaleSettingChoice)16)
 

MeasurementSystemType - Metric, English, etc.

#define AlpLocChoiceMonSingleLetterFormat   ((AlpLocLocaleSettingChoice)26)
 

char[] - single letter Monday

#define AlpLocChoiceNovSingleLetterFormat   ((AlpLocLocaleSettingChoice)43)
 

char[] - single letter November

#define AlpLocChoiceNumberFormat   ((AlpLocLocaleSettingChoice)11)
 

NumberFormatType - Specifies decimal and thousands separator characters.

#define AlpLocChoiceOctSingleLetterFormat   ((AlpLocLocaleSettingChoice)42)
 

char[] - single letter October

#define AlpLocChoiceOutboundVObjectEncoding   ((AlpLocLocaleSettingChoice)22)
 

CharEncodingType - Outbound encoding for vObjects.

#define AlpLocChoicePrimaryEmailEncoding   ((AlpLocLocaleSettingChoice)20)
 

char[] - First attempt at Email encoding

#define AlpLocChoicePrimarySMSEncoding   ((AlpLocLocaleSettingChoice)18)
 

CharEncodingType - First attempt at SMS encoding.

#define AlpLocChoiceSatSingleLetterFormat   ((AlpLocLocaleSettingChoice)31)
 

char[] - single letter Saturday

#define AlpLocChoiceSecondaryEmailEncoding   ((AlpLocLocaleSettingChoice)21)
 

char[] - Second attempt at Email encoding

#define AlpLocChoiceSecondarySMSEncoding   ((AlpLocLocaleSettingChoice)19)
 

CharEncodingType - Second attempt at SMS encoding.

#define AlpLocChoiceSepSingleLetterFormat   ((AlpLocLocaleSettingChoice)41)
 

char[] - single letter September

#define AlpLocChoiceSunSingleLetterFormat   ((AlpLocLocaleSettingChoice)32)
 

char[] - single letter Sunday

#define AlpLocChoiceThuSingleLetterFormat   ((AlpLocLocaleSettingChoice)29)
 

char[] - single letter Thursday

#define AlpLocChoiceTimeFormat   ((AlpLocLocaleSettingChoice)8)
 

TimeFormatType.

#define AlpLocChoiceTimeZone   ((AlpLocLocaleSettingChoice)10)
 

gint - Default GMT offset minutes, + for east of GMT, - for west

#define AlpLocChoiceTueSingleLetterFormat   ((AlpLocLocaleSettingChoice)27)
 

char[] - single letter Tuesday

#define AlpLocChoiceUniqueCurrencySymbol   ((AlpLocLocaleSettingChoice)14)
 

char[] - Unique currency symbol (e.g., "US$")

#define AlpLocChoiceWedSingleLetterFormat   ((AlpLocLocaleSettingChoice)28)
 

char[] - single letter Wednesday

#define AlpLocChoiceWeekStartDay   ((AlpLocLocaleSettingChoice)9)
 

gint - Weekday for calendar column 1 (sunday=0, monday=1, etc.)


Typedef Documentation

typedef gint AlpLocLocaleSettingChoice
 

Constants that you can pass to the alp_loc_get_locale_setting() function to specify which locale setting to retrieve.

typedef void* AlpLocLocaleType
 

internal locale type


Function Documentation

alp_status_t alp_loc_get_country_name AlpLocLocaleType pLocale,
gchar *  pName,
gint *  nSize
 

Returns the country name like "United States" for the specified locale.

Parameters:
[in] pLocale locale
[out] pName country name or null to get the length
[in,out] nSize length of pName
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND locale not found

ALP_LOCALE_ERR_SETTING_NOT_FOUND locale setting not found

ALP_LOCALE_ERR_DATABASE database error

ALP_LOCALE_ERR_OUT_OF_MEMORY allocated buffer is too size

alp_status_t alp_loc_get_format_locale AlpLocLocaleType pLocale  ) 
 

Returns the current format locale.

Parameters:
[out] pLocale format locale
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND no current format locale

ALP_LOCALE_ERR_DATABASE database error

Remarks:
The formats locale is initially set to the system locale; however, the users can change the formats locale in the Formats Preference panel if they prefer a different locale.

The caller is responsible for creating the AlpLocLocalType object.

alp_status_t alp_loc_get_format_locales AlpLocLocaleType pLocale,
int *  count
 

Get all available format locales.

Parameters:
[out] pLocale all format locales or null to get the count
[in,out] count number of format locales
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND no format locales

ALP_LOCALE_ERR_DATABASE database error

ALP_LOCALE_ERR_OUT_OF_MEMORY allocated buffer is too size

Remarks:
The caller is responsible for creating the array of AlpLocLocalType objects.

alp_status_t alp_loc_get_language_name AlpLocLocaleType pLocale,
gchar *  pName,
gint *  nSize
 

Returns the language name like "English" for the specified locale.

Parameters:
[in] pLocale locale
[out] pName language name or null to get the length
[in,out] nSize length of pName
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND locale not found

ALP_LOCALE_ERR_SETTING_NOT_FOUND locale setting not found

ALP_LOCALE_ERR_DATABASE database error

ALP_LOCALE_ERR_OUT_OF_MEMORY allocated buffer is too size

alp_status_t alp_loc_get_locale_setting AlpLocLocaleType pLocale,
AlpLocLocaleSettingChoice  nChoice,
void *  pValue,
gint *  nSize
 

Get the specified setting for the specified locale.

Parameters:
[in] pLocale The locale whose settings you want to retrieve.
[in] nChoice The AlpLocLocaleSettingChoice constant for the setting you want to retrieve.
[out] pValue The value for the requested setting or null to get the size.
[in,out] nSize The size of the pValue buffer.
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND locale not found

ALP_LOCALE_ERR_SETTING_NOT_FOUND locale setting not found

ALP_LOCALE_ERR_DATABASE database error

ALP_LOCALE_ERR_OUT_OF_MEMORY allocated buffer is too size

Remarks:
The caller is responsible for creating the AlpLocLocalType and pValue objects.

alp_status_t alp_loc_get_posix_name AlpLocLocaleType pLocale,
gchar *  pName,
gint *  nSize
 

Returns the POSIX name like "en_US" for the specified locale.

Parameters:
[in] pLocale locale
[out] pName country name or null to get the length
[in,out] nSize length of pName
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND locale not found

ALP_LOCALE_ERR_SETTING_NOT_FOUND locale setting not found

ALP_LOCALE_ERR_DATABASE database error

ALP_LOCALE_ERR_OUT_OF_MEMORY allocated buffer is too size

alp_status_t alp_loc_get_rom_locale AlpLocLocaleType pLocale  ) 
 

Returns the ROM locale

Parameters:
[out] pLocale ROM locale
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND no ROM locale

ALP_LOCALE_ERR_DATABASE database error

Remarks:
The caller is responsible for creating the array of AlpLocLocalType objects.

alp_status_t alp_loc_get_system_locale AlpLocLocaleType pLocale  ) 
 

Returns the current system locale

Parameters:
[out] pLocale system locale
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND no current system locale

ALP_LOCALE_ERR_DATABASE database error

Remarks:
The system locale is used for various system settings. Applications should instead use the values stored in the user's preferences or those in the formats locale.

The caller is responsible for creating the AlpLocLocalType object.

alp_status_t alp_loc_get_system_locales AlpLocLocaleType pLocale,
int *  count
 

Get all available system locales.

Parameters:
[out] pLocale all system locales or null to get the count
[in,out] count number of system locales
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND no system locales

ALP_LOCALE_ERR_DATABASE database error

ALP_LOCALE_ERR_OUT_OF_MEMORY allocated buffer is too size

Remarks:
The caller is responsible for creating the array of AlpLocLocalType objects.

alp_status_t alp_loc_set_format_locale AlpLocLocaleType pLocale  ) 
 

Sets the current formats locale and changes the preference settings for locale-specific items to the default values from this locale.

Parameters:
[in] pLocale format locale
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND not a format locale

ALP_LOCALE_ERR_DATABASE database error

Remarks:
The Formats Preference panel uses this function when the user selects a new country from the country pop-up list. It then changes the formats locale and all locale-dependent preferences to the settings in the first locale that it finds matching the country. Applications should not call this function without first confirming with the user that the formats locale should be changed.

alp_status_t alp_loc_set_locale_setting AlpLocLocaleType pLocale,
AlpLocLocaleSettingChoice  nChoice,
void *  pValue,
gint  nSize
 

Set the specified setting for the specified locale.

Parameters:
[in] pLocale The locale whose settings you want to set.
[in] nChoice The AlpLocLocaleSettingChoice constant for the setting you want to retrieve.
[in] pValue The value for the requested setting.
[in] nSize The size of the pValue buffer.
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND locale not found

ALP_LOCALE_ERR_DATABASE database error

Remarks:
The caller is responsible for creating the AlpLocLocalType and pValue objects.

alp_status_t alp_loc_set_system_locale AlpLocLocaleType pLocale  ) 
 

Set the current system locale to a new locale

Parameters:
[in] pLocale system locale
Returns:
ALP_STATUS_OK success

ALP_LOCALE_ERR_LOCALE_NOT_FOUND not a system locale

ALP_LOCALE_ERR_DATABASE database error

Remarks:
Will perform a soft reset to start making use of it.


Generated on Wed Jul 30 07:06:42 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.