mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Add Indonesian, Swedish and Ukrainian language options (#13490)
* Add Indonesian, Swedish and Ukrainian language options * Enable Indonesian and Swedish localisations for RGUI
This commit is contained in:
parent
cc756e4126
commit
311fec15d9
@ -469,7 +469,10 @@ ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
intl/msg_hash_fa.o \
|
||||
intl/msg_hash_he.o \
|
||||
intl/msg_hash_ast.o \
|
||||
intl/msg_hash_fi.o
|
||||
intl/msg_hash_fi.o \
|
||||
intl/msg_hash_id.o \
|
||||
intl/msg_hash_sv.o \
|
||||
intl/msg_hash_uk.o
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_GETOPT_LONG), 1)
|
||||
|
@ -1251,6 +1251,9 @@ RETROARCH
|
||||
#include "../intl/msg_hash_he.c"
|
||||
#include "../intl/msg_hash_ast.c"
|
||||
#include "../intl/msg_hash_fi.c"
|
||||
#include "../intl/msg_hash_id.c"
|
||||
#include "../intl/msg_hash_sv.c"
|
||||
#include "../intl/msg_hash_uk.c"
|
||||
#endif
|
||||
|
||||
#include "../intl/msg_hash_us.c"
|
||||
|
2461
intl/msg_hash_id.c
Normal file
2461
intl/msg_hash_id.c
Normal file
File diff suppressed because it is too large
Load Diff
2461
intl/msg_hash_sv.c
Normal file
2461
intl/msg_hash_sv.c
Normal file
File diff suppressed because it is too large
Load Diff
2461
intl/msg_hash_uk.c
Normal file
2461
intl/msg_hash_uk.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -283,6 +283,9 @@ enum retro_language
|
||||
RETRO_LANGUAGE_HEBREW = 21,
|
||||
RETRO_LANGUAGE_ASTURIAN = 22,
|
||||
RETRO_LANGUAGE_FINNISH = 23,
|
||||
RETRO_LANGUAGE_INDONESIAN = 24,
|
||||
RETRO_LANGUAGE_SWEDISH = 25,
|
||||
RETRO_LANGUAGE_UKRAINIAN = 26,
|
||||
RETRO_LANGUAGE_LAST,
|
||||
|
||||
/* Ensure sizeof(enum) == sizeof(int) */
|
||||
|
@ -163,6 +163,9 @@ struct retro_core_options_v2 *options_intl[RETRO_LANGUAGE_LAST] = {
|
||||
NULL, /* RETRO_LANGUAGE_HEBREW */
|
||||
NULL, /* RETRO_LANGUAGE_ASTURIAN */
|
||||
NULL, /* RETRO_LANGUAGE_FINNISH */
|
||||
NULL, /* RETRO_LANGUAGE_INDONESIAN */
|
||||
NULL, /* RETRO_LANGUAGE_SWEDISH */
|
||||
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -121,6 +121,9 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
|
||||
NULL, /* RETRO_LANGUAGE_HEBREW */
|
||||
NULL, /* RETRO_LANGUAGE_ASTURIAN */
|
||||
NULL, /* RETRO_LANGUAGE_FINNISH */
|
||||
NULL, /* RETRO_LANGUAGE_INDONESIAN */
|
||||
NULL, /* RETRO_LANGUAGE_SWEDISH */
|
||||
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -136,6 +136,9 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
|
||||
NULL, /* RETRO_LANGUAGE_HEBREW */
|
||||
NULL, /* RETRO_LANGUAGE_ASTURIAN */
|
||||
NULL, /* RETRO_LANGUAGE_FINNISH */
|
||||
NULL, /* RETRO_LANGUAGE_INDONESIAN */
|
||||
NULL, /* RETRO_LANGUAGE_SWEDISH */
|
||||
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -121,6 +121,9 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = {
|
||||
NULL, /* RETRO_LANGUAGE_HEBREW */
|
||||
NULL, /* RETRO_LANGUAGE_ASTURIAN */
|
||||
NULL, /* RETRO_LANGUAGE_FINNISH */
|
||||
NULL, /* RETRO_LANGUAGE_INDONESIAN */
|
||||
NULL, /* RETRO_LANGUAGE_SWEDISH */
|
||||
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -1612,6 +1612,8 @@ static bool rgui_fonts_init(rgui_t *rgui)
|
||||
case RETRO_LANGUAGE_SLOVAK:
|
||||
case RETRO_LANGUAGE_ASTURIAN:
|
||||
case RETRO_LANGUAGE_FINNISH:
|
||||
case RETRO_LANGUAGE_INDONESIAN:
|
||||
case RETRO_LANGUAGE_SWEDISH:
|
||||
/* We have at least partial support for
|
||||
* these languages, but extended ASCII
|
||||
* is required */
|
||||
|
@ -6665,6 +6665,9 @@ static void setting_get_string_representation_uint_user_language(
|
||||
modes[RETRO_LANGUAGE_HEBREW] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_HEBREW);
|
||||
modes[RETRO_LANGUAGE_ASTURIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_ASTURIAN);
|
||||
modes[RETRO_LANGUAGE_FINNISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_FINNISH);
|
||||
modes[RETRO_LANGUAGE_INDONESIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_INDONESIAN);
|
||||
modes[RETRO_LANGUAGE_SWEDISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_SWEDISH);
|
||||
modes[RETRO_LANGUAGE_UKRAINIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_UKRAINIAN);
|
||||
strlcpy(s, modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)], len);
|
||||
}
|
||||
#endif
|
||||
|
25
msg_hash.c
25
msg_hash.c
@ -102,6 +102,16 @@ int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case RETRO_LANGUAGE_FINNISH:
|
||||
ret = msg_hash_get_help_fi_enum(msg, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_INDONESIAN:
|
||||
ret = msg_hash_get_help_id_enum(msg, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_SWEDISH:
|
||||
ret = msg_hash_get_help_sv_enum(msg, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_UKRAINIAN:
|
||||
ret = msg_hash_get_help_uk_enum(msg, s, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -171,6 +181,12 @@ const char *get_user_language_iso639_1(bool limit)
|
||||
return "ast";
|
||||
case RETRO_LANGUAGE_FINNISH:
|
||||
return "fi";
|
||||
case RETRO_LANGUAGE_INDONESIAN:
|
||||
return "id";
|
||||
case RETRO_LANGUAGE_SWEDISH:
|
||||
return "sv";
|
||||
case RETRO_LANGUAGE_UKRAINIAN:
|
||||
return "uk";
|
||||
}
|
||||
return "en";
|
||||
}
|
||||
@ -251,6 +267,15 @@ const char *msg_hash_to_str(enum msg_hash_enums msg)
|
||||
case RETRO_LANGUAGE_FINNISH:
|
||||
ret = msg_hash_to_str_fi(msg);
|
||||
break;
|
||||
case RETRO_LANGUAGE_INDONESIAN:
|
||||
ret = msg_hash_to_str_id(msg);
|
||||
break;
|
||||
case RETRO_LANGUAGE_SWEDISH:
|
||||
ret = msg_hash_to_str_sv(msg);
|
||||
break;
|
||||
case RETRO_LANGUAGE_UKRAINIAN:
|
||||
ret = msg_hash_to_str_uk(msg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3387,6 +3387,15 @@ int msg_hash_get_help_ast_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
const char *msg_hash_to_str_fi(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_fi_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
const char *msg_hash_to_str_id(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_id_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
const char *msg_hash_to_str_sv(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_sv_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
const char *msg_hash_to_str_uk(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_uk_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
enum msg_file_type msg_hash_to_file_type(uint32_t hash);
|
||||
|
@ -6028,6 +6028,9 @@ enum retro_language rarch_get_language_from_iso(const char *iso639)
|
||||
{"he", RETRO_LANGUAGE_HEBREW},
|
||||
{"ast", RETRO_LANGUAGE_ASTURIAN},
|
||||
{"fi", RETRO_LANGUAGE_FINNISH},
|
||||
{"id", RETRO_LANGUAGE_INDONESIAN},
|
||||
{"sv", RETRO_LANGUAGE_SWEDISH},
|
||||
{"uk", RETRO_LANGUAGE_UKRAINIAN},
|
||||
};
|
||||
|
||||
if (string_is_empty(iso639))
|
||||
|
Loading…
Reference in New Issue
Block a user