locale_get_locale()

Get the current locale string.

Synopsis:

#include <bps/locale.h>
 
BPS_API int locale_get_locale(char **locale)

Since:

BlackBerry 10.0.0

Arguments:

locale

Upon success, the current locale.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The locale_get_locale() function extracts the locale string without any processing (e.g., en_US, fr_FR, en_GR, zh_TW, zh_Hant_TW, etc.) that is set on the device. Upon success, the caller is responsible for freeing the returned buffer using bps_free().

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.