|
|
|
@ -32,7 +32,7 @@ void yon_locale_set(struct yon_locale *target,char *locale_name){
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
char *path = yon_char_unite(locales_path,locale_name,NULL);
|
|
|
|
char *path = yon_char_unite(locales_path,locale_name,NULL);
|
|
|
|
config_str locale_string = yon_file_open(path,&size);
|
|
|
|
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->lang_ab = yon_char_new(locale_name);
|
|
|
|
target->territory = yon_char_parsed_check_exist_begins_with(locale_string,size,"territory");
|
|
|
|
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");
|
|
|
|
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:{
|
|
|
|
case YON_LOCALE_TITLE:{
|
|
|
|
return cur_locale->title;
|
|
|
|
return cur_locale->title;
|
|
|
|
}break;
|
|
|
|
}break;
|
|
|
|
|
|
|
|
case YON_LOCALE_CODE:{
|
|
|
|
|
|
|
|
return cur_locale->code;
|
|
|
|
|
|
|
|
}break;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|