mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Add British English language option (#14504)
This commit is contained in:
parent
a153738bbd
commit
254ac65549
@ -474,7 +474,8 @@ ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
intl/msg_hash_uk.o \
|
||||
intl/msg_hash_cs.o \
|
||||
intl/msg_hash_val.o \
|
||||
intl/msg_hash_ca.o
|
||||
intl/msg_hash_ca.o \
|
||||
intl/msg_hash_en.o
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_GETOPT_LONG), 1)
|
||||
|
@ -1272,6 +1272,7 @@ RETROARCH
|
||||
#include "../intl/msg_hash_cs.c"
|
||||
#include "../intl/msg_hash_val.c"
|
||||
#include "../intl/msg_hash_ca.c"
|
||||
#include "../intl/msg_hash_en.c"
|
||||
#endif
|
||||
|
||||
#include "../intl/msg_hash_us.c"
|
||||
|
60
intl/msg_hash_en.c
Normal file
60
intl/msg_hash_en.c
Normal file
@ -0,0 +1,60 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../msg_hash.h"
|
||||
#include "../configuration.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_XBOX) && (_MSC_VER >= 1500 && _MSC_VER < 1900)
|
||||
#if (_MSC_VER >= 1700)
|
||||
/* https://support.microsoft.com/en-us/kb/980263 */
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
#pragma warning(disable:4566)
|
||||
#endif
|
||||
|
||||
int msg_hash_get_help_en_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case MSG_UNKNOWN:
|
||||
default:
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char *msg_hash_to_str_en(enum msg_hash_enums msg)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
#include "msg_hash_en.h"
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
@ -8364,6 +8364,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_LANG_ENGLISH,
|
||||
"English"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_LANG_BRITISH_ENGLISH,
|
||||
"English (United Kingdom)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_LANG_ESPERANTO,
|
||||
"Esperanto - Esperanto"
|
||||
|
@ -289,6 +289,7 @@ enum retro_language
|
||||
RETRO_LANGUAGE_CZECH = 27,
|
||||
RETRO_LANGUAGE_CATALAN_VALENCIA = 28,
|
||||
RETRO_LANGUAGE_CATALAN = 29,
|
||||
RETRO_LANGUAGE_BRITISH_ENGLISH = 30,
|
||||
RETRO_LANGUAGE_LAST,
|
||||
|
||||
/* Ensure sizeof(enum) == sizeof(int) */
|
||||
|
@ -1458,6 +1458,7 @@ static bool rgui_fonts_init(rgui_t *rgui)
|
||||
switch (language)
|
||||
{
|
||||
case RETRO_LANGUAGE_ENGLISH:
|
||||
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
||||
goto english;
|
||||
|
||||
case RETRO_LANGUAGE_FRENCH:
|
||||
|
@ -6844,6 +6844,7 @@ static void setting_get_string_representation_uint_user_language(
|
||||
modes[RETRO_LANGUAGE_CZECH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CZECH);
|
||||
modes[RETRO_LANGUAGE_CATALAN_VALENCIA] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CATALAN_VALENCIA);
|
||||
modes[RETRO_LANGUAGE_CATALAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CATALAN);
|
||||
modes[RETRO_LANGUAGE_BRITISH_ENGLISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_BRITISH_ENGLISH);
|
||||
strlcpy(s, modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)], len);
|
||||
}
|
||||
#endif
|
||||
|
14
msg_hash.c
14
msg_hash.c
@ -121,6 +121,9 @@ int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case RETRO_LANGUAGE_CATALAN:
|
||||
ret = msg_hash_get_help_ca_enum(msg, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
||||
ret = msg_hash_get_help_en_enum(msg, s, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -199,9 +202,15 @@ const char *get_user_language_iso639_1(bool limit)
|
||||
case RETRO_LANGUAGE_CZECH:
|
||||
return "cs";
|
||||
case RETRO_LANGUAGE_CATALAN_VALENCIA:
|
||||
return "val";
|
||||
if (limit)
|
||||
return "ca";
|
||||
return "ca_valencia";
|
||||
case RETRO_LANGUAGE_CATALAN:
|
||||
return "ca";
|
||||
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
||||
if (limit)
|
||||
return "en";
|
||||
return "en_gb";
|
||||
}
|
||||
return "en";
|
||||
}
|
||||
@ -300,6 +309,9 @@ const char *msg_hash_to_str(enum msg_hash_enums msg)
|
||||
case RETRO_LANGUAGE_CATALAN:
|
||||
ret = msg_hash_to_str_ca(msg);
|
||||
break;
|
||||
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
||||
ret = msg_hash_to_str_en(msg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2919,6 +2919,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_LANG_TURKISH,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_LANG_ASTURIAN,
|
||||
MENU_ENUM_LABEL_VALUE_LANG_BRITISH_ENGLISH,
|
||||
MENU_ENUM_LABEL_VALUE_LANG_CZECH,
|
||||
MENU_ENUM_LABEL_VALUE_LANG_DANISH,
|
||||
MENU_ENUM_LABEL_VALUE_LANG_SWEDISH,
|
||||
@ -3637,6 +3638,9 @@ int msg_hash_get_help_val_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
const char *msg_hash_to_str_ca(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_ca_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
const char *msg_hash_to_str_en(enum msg_hash_enums msg);
|
||||
int msg_hash_get_help_en_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);
|
||||
|
@ -6272,8 +6272,9 @@ enum retro_language rarch_get_language_from_iso(const char *iso639)
|
||||
{"sv", RETRO_LANGUAGE_SWEDISH},
|
||||
{"uk", RETRO_LANGUAGE_UKRAINIAN},
|
||||
{"cs", RETRO_LANGUAGE_CZECH},
|
||||
{"val", RETRO_LANGUAGE_CATALAN_VALENCIA},
|
||||
{"ca_valencia", RETRO_LANGUAGE_CATALAN_VALENCIA},
|
||||
{"ca", RETRO_LANGUAGE_CATALAN},
|
||||
{"en_GB", RETRO_LANGUAGE_BRITISH_ENGLISH},
|
||||
};
|
||||
|
||||
if (string_is_empty(iso639))
|
||||
|
Loading…
x
Reference in New Issue
Block a user