Added code returning to locale get function #69

Merged
asmeron merged 1 commits from YanTheKaller/libublsettings:master into master 2 weeks ago

@ -32,7 +32,7 @@ void yon_locale_set(struct yon_locale *target,char *locale_name){
int size;
char *path = yon_char_unite(locales_path,locale_name,NULL);
config_str locale_string = yon_file_open(path,&size);
target->code = yon_char_new(locale_name);
target->code = yon_char_unite(locale_name,".UTF-8",NULL);
target->lang_ab = yon_char_new(locale_name);
target->territory = yon_char_parsed_check_exist_begins_with(locale_string,size,"territory");
target->language = yon_char_parsed_check_exist_begins_with(locale_string,size,"language");
@ -113,6 +113,9 @@ char *yon_locale_get_parameter(char *code,enum YON_LOCALE_PARAMETER type){
case YON_LOCALE_TITLE:{
return cur_locale->title;
}break;
case YON_LOCALE_CODE:{
return cur_locale->code;
}break;
}
}

@ -1500,7 +1500,8 @@ enum YON_LOCALE_PARAMETER{
YON_LOCALE_LANG_NAME,
YON_LOCALE_TERRITORY,
YON_LOCALE_LANG_AB,
YON_LOCALE_TITLE
YON_LOCALE_TITLE,
YON_LOCALE_CODE
};
typedef struct yon_hash_element{

Loading…
Cancel
Save