Get current language setting

Get current language setting

BY 25 Jun 2015 Native Application Development

Hi,
Using :
system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale); 
the language locale is returned as :

en_US, de_DE, fr_FR. i.e. the encoding information is missing which according to the API documentation of elm_language_set is required.
“The lang passed must be the full name of the locale to use, for example “en_US.utf8” or “es_ES@euro”.”

Same behaviour from : 
runtime_info_get_value_string(RUNTIME_INFO_KEY_LANGUAGE, &locale);

I had to use char *lang = vconf_get_str(VCONFKEY_LANGSET);
to get the full name of the language locale (en_US.UTF-8, de_DE.UTF-8 etc.


 

Written by