Tizen Native API
5.5
|
The locale display names module returns display names of Locales and components of Locales.
Required Header
#include <utils_i18n.h>
Overview
The locale display names module returns display names of Locales and components of Locales.
Functions | |
int | i18n_loc_disp_names_create (const char *locale, i18n_loc_disp_names_h *loc_disp_names) |
Creates a default locale display names object. | |
int | i18n_loc_disp_names_create_from_dialect (const char *locale, i18n_udialect_handling_e dialect, i18n_loc_disp_names_h *loc_disp_names) |
Creates a locale display names object for the given dialect handling. | |
int | i18n_loc_disp_names_create_from_context (const char *locale, i18n_udisplay_context_e *contexts, int32_t length, i18n_loc_disp_names_h *loc_disp_names) |
Creates a locale display names object for given display contexts. | |
int | i18n_loc_disp_names_destroy (i18n_loc_disp_names_h loc_disp_names) |
Destroys the locale display names object. | |
int | i18n_loc_disp_names_get_locale (i18n_loc_disp_names_h loc_disp_names, char **locale) |
Gets the locale used by the given locale display names object to determinate the display names. | |
int | i18n_loc_disp_names_get_dialect_handling (i18n_loc_disp_names_h loc_disp_names, i18n_udialect_handling_e *handling) |
Gets the dialect handling used by the given locale display names object. | |
int | i18n_loc_disp_names_get_context (i18n_loc_disp_names_h loc_disp_names, i18n_udisplay_context_type_e type, i18n_udisplay_context_e *context) |
Gets the context from the given locale display names object. | |
int | i18n_loc_disp_names_get_loc_disp_name (i18n_loc_disp_names_h loc_disp_names, const char *locale, char **name) |
Gets the display name of the provided locale. | |
int | i18n_loc_disp_names_get_language_disp_name (i18n_loc_disp_names_h loc_disp_names, const char *language, char **name) |
Gets the display name of the provided language code. | |
int | i18n_loc_disp_names_get_script_disp_name (i18n_loc_disp_names_h loc_disp_names, const char *script, char **name) |
Gets the display name of the script code provided as string. | |
int | i18n_loc_disp_names_get_script_disp_name_with_script_code (i18n_loc_disp_names_h loc_disp_names, i18n_uscript_code_e code, char **name) |
Gets the display name of the script code provided as enumeration. | |
int | i18n_loc_disp_names_get_region_disp_name (i18n_loc_disp_names_h loc_disp_names, const char *region, char **name) |
Gets the display name of the provided region code. | |
int | i18n_loc_disp_names_get_variant_disp_name (i18n_loc_disp_names_h loc_disp_names, const char *variant, char **name) |
Gets the display name of the provided variant. | |
int | i18n_loc_disp_names_get_key_disp_name (i18n_loc_disp_names_h loc_disp_names, const char *key, char **name) |
Gets the display name of the provided locale key. | |
int | i18n_loc_disp_names_get_key_value_disp_name (i18n_loc_disp_names_h loc_disp_names, const char *key, const char *value, char **name) |
Gets the display name of the provided locale key-value. | |
Typedefs | |
typedef void * | i18n_loc_disp_names_h |
An i18n_loc_disp_names_h handle. |
Typedef Documentation
typedef void* i18n_loc_disp_names_h |
An i18n_loc_disp_names_h handle.
Use i18n_loc_disp_names_* functions to operate on i18n_loc_disp_names_h objects.
- Since :
- 5.0
Enumeration Type Documentation
Function Documentation
int i18n_loc_disp_names_create | ( | const char * | locale, |
i18n_loc_disp_names_h * | loc_disp_names | ||
) |
Creates a default locale display names object.
- Since :
- 5.0
- Remarks:
- The created object should be released by the caller with the i18n_loc_disp_name_destroy() function.
- Parameters:
-
[in] locale The display locale [out] loc_disp_names The created locale display names object
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_create_from_context | ( | const char * | locale, |
i18n_udisplay_context_e * | contexts, | ||
int32_t | length, | ||
i18n_loc_disp_names_h * | loc_disp_names | ||
) |
Creates a locale display names object for given display contexts.
- Since :
- 5.0
- Remarks:
- The created object should be released by the caller with the i18n_loc_disp_name_destroy() function.
- Parameters:
-
[in] locale The display locale [in] contexts Display contexts [in] length Number of items in the context list [out] loc_disp_names The created locale display names object
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_create_from_dialect | ( | const char * | locale, |
i18n_udialect_handling_e | dialect, | ||
i18n_loc_disp_names_h * | loc_disp_names | ||
) |
Creates a locale display names object for the given dialect handling.
- Since :
- 5.0
- Remarks:
- The created object should be released by the caller with the i18n_loc_disp_name_destroy() function.
- Parameters:
-
[in] locale The display locale [in] dialect The dialect handling [out] loc_disp_names The created locale display names object
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_destroy | ( | i18n_loc_disp_names_h | loc_disp_names | ) |
Destroys the locale display names object.
- Since :
- 5.0
- Parameters:
-
[in] loc_disp_names The locale display names object to be destroyed
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_loc_disp_names_get_context | ( | i18n_loc_disp_names_h | loc_disp_names, |
i18n_udisplay_context_type_e | type, | ||
i18n_udisplay_context_e * | context | ||
) |
Gets the context from the given locale display names object.
- Since :
- 5.0
- Parameters:
-
[in] loc_disp_names The locale display names object [in] type The display context type [out] context The display context for the specific type
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_loc_disp_names_get_dialect_handling | ( | i18n_loc_disp_names_h | loc_disp_names, |
i18n_udialect_handling_e * | handling | ||
) |
Gets the dialect handling used by the given locale display names object.
- Since :
- 5.0
- Parameters:
-
[in] loc_disp_names The locale display names object [out] handling The dialect handling
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_loc_disp_names_get_key_disp_name | ( | i18n_loc_disp_names_h | loc_disp_names, |
const char * | key, | ||
char ** | name | ||
) |
Gets the display name of the provided locale key.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] key The locale key name [out] name The display name of the provided locale key
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_get_key_value_disp_name | ( | i18n_loc_disp_names_h | loc_disp_names, |
const char * | key, | ||
const char * | value, | ||
char ** | name | ||
) |
Gets the display name of the provided locale key-value.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] key The locale key name [in] value The locale key value [out] name The display name of the provided locale key
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_get_language_disp_name | ( | i18n_loc_disp_names_h | loc_disp_names, |
const char * | language, | ||
char ** | name | ||
) |
Gets the display name of the provided language code.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] language The language code [out] name The display name of the provided language code
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_get_loc_disp_name | ( | i18n_loc_disp_names_h | loc_disp_names, |
const char * | locale, | ||
char ** | name | ||
) |
Gets the display name of the provided locale.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] locale The locale whose display name is to be returned [out] name The display name of the provided locale
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_get_locale | ( | i18n_loc_disp_names_h | loc_disp_names, |
char ** | locale | ||
) |
Gets the locale used by the given locale display names object to determinate the display names.
- Since :
- 5.0
- Remarks:
- The returned locale should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [out] locale The display locale
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter
int i18n_loc_disp_names_get_region_disp_name | ( | i18n_loc_disp_names_h | loc_disp_names, |
const char * | region, | ||
char ** | name | ||
) |
Gets the display name of the provided region code.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] region The region code [out] name The display name of the provided region code
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_get_script_disp_name | ( | i18n_loc_disp_names_h | loc_disp_names, |
const char * | script, | ||
char ** | name | ||
) |
Gets the display name of the script code provided as string.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] script The script code string [out] name The display name of the provided script code
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_get_script_disp_name_with_script_code | ( | i18n_loc_disp_names_h | loc_disp_names, |
i18n_uscript_code_e | code, | ||
char ** | name | ||
) |
Gets the display name of the script code provided as enumeration.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] code The script code number [out] name The display name of the provided region code
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory
int i18n_loc_disp_names_get_variant_disp_name | ( | i18n_loc_disp_names_h | loc_disp_names, |
const char * | variant, | ||
char ** | name | ||
) |
Gets the display name of the provided variant.
- Since :
- 5.0
- Remarks:
- The returned name should be freed by the caller with free() function.
- Parameters:
-
[in] loc_disp_names The locale display names object [in] variant The variant [out] name The display name of the provided variant
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
I18N_ERROR_NONE Successful I18N_ERROR_INVALID_PARAMETER Invalid function parameter I18N_ERROR_OUT_OF_MEMORY Out of memory