Codepage and Locale ID operations.
More...
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
#include <locale.h>
#include <langinfo.h>
Codepage and Locale ID operations.
_PUBLIC_ uint32_t mapi_get_cpid_from_language |
( |
const char * |
language | ) |
|
Return codepage associated to specified language
- Parameters
-
language | The language string to lookup |
- Returns
- non-zero codepage on success, otherwise 0
_PUBLIC_ uint32_t mapi_get_cpid_from_lcid |
( |
uint32_t |
lcid | ) |
|
Returns codepage for a given LCID (Locale ID)
- Parameters
-
lcid | the locale ID to lookup |
- Returns
- non-zero codepage on success, otherwise 0 if only unicode is supported for this language
_PUBLIC_ uint32_t mapi_get_cpid_from_locale |
( |
const char * |
locale | ) |
|
Return codepage associated to specified locale
- Parameters
-
locale | The locale string to lookup |
- Returns
- non-zero codepage on success, otherwise 0
_PUBLIC_ char** mapi_get_language_from_group |
( |
TALLOC_CTX * |
mem_ctx, |
|
|
uint32_t |
group |
|
) |
| |
Returns List of languages for a given Language Group
- Parameters
-
mem_ctx | pointer to the memory context |
group | the locale group to lookup |
- Returns
- Array of languages string on success, otherwise NULL
_PUBLIC_ const char* mapi_get_language_from_lcid |
( |
uint32_t |
lcid | ) |
|
Returns Language for a given Locale ID
- Parameters
-
lcid | the locale ID to lookup |
- Returns
- language string on success, otherwise NULL
_PUBLIC_ const char* mapi_get_language_from_locale |
( |
const char * |
locale | ) |
|
Returns Language for a given Locale
- Parameters
-
locale | the language string to lookup |
- Returns
- Language string on success, otherwise NULL
_PUBLIC_ uint32_t mapi_get_lcid_from_language |
( |
const char * |
language | ) |
|
Returns LCID (Locale ID) for a given language
- Parameters
-
language | the language string to lookup |
- Returns
- non-zero LCID on success, otherwise 0
_PUBLIC_ uint32_t mapi_get_lcid_from_locale |
( |
const char * |
locale | ) |
|
Returns LCID (Locale ID) for a given locale
- Parameters
-
locale | the locale string to lookup |
- Returns
- non-zero LCID on success, otherwise 0
_PUBLIC_ const char* mapi_get_locale_from_language |
( |
const char * |
language | ) |
|
Returns Locale for a given language
- Parameters
-
language | the language string to lookup |
- Returns
- Locale string on success, otherwise NULL
_PUBLIC_ const char* mapi_get_locale_from_lcid |
( |
uint32_t |
lcid | ) |
|
Returns Locale for a given Locale ID
- Parameters
-
lcid | the locale ID to lookup |
- Returns
- locale string on success, otherwise NULL
_PUBLIC_ char* mapi_get_system_locale |
( |
void |
| ) |
|
Returns current locale used by the system
- Returns
- pointer to locale string on success, otherwise NULL
_PUBLIC_ bool mapi_verify_cpid |
( |
uint32_t |
cpid | ) |
|
Verify if the specified codepage is valid
- Parameters
-
cpid | the codepage to lookup |
- Returns
- 0 on success, otherwise 1