From 473ab1673921efa011920e7979cc7e9b7a08f304 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Sat, 8 Jun 2013 02:34:01 +0100 Subject: Now the default configuration tries to set the language from the system locale, and defaults to english if no language match. This closes #473. --- src/common/hexchat.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/common/hexchat.c') diff --git a/src/common/hexchat.c b/src/common/hexchat.c index fb9dde5c..aece9ff3 100644 --- a/src/common/hexchat.c +++ b/src/common/hexchat.c @@ -1017,20 +1017,12 @@ static void set_locale (void) { #ifdef WIN32 - const char const *langs[]={ - "af", "sq", "am", "ast", "az", "eu", "be", "bg", "ca", "zh_CN", /* 0 .. 9 */ - "zh_TW", "cs", "da", "nl", "en_GB", "en", "et", "fi", "fr", "gl", /* 10 .. 19 */ - "de", "el", "gu", "hi", "hu", "id", "it", "ja", "kn", "rw", /* 20 .. 29 */ - "ko", "lv", "lt", "mk", "ml", "ms", "nb", "no", "pl", "pt", /* 30 .. 39 */ - "pt_BR", "pa", "ru", "sr", "sk", "sl", "es", "sv", "th", "uk", /* 40 .. 49 */ - "vi", "wa" /* 50 .. */ - }; char hexchat_lang[13]; /* LC_ALL= plus 5 chars of hex_gui_lang and trailing \0 */ strcpy (hexchat_lang, "LC_ALL="); - if (0 <= prefs.hex_gui_lang && prefs.hex_gui_lang < sizeof(langs)/sizeof(*langs)) - strcat (hexchat_lang, langs[prefs.hex_gui_lang]); + if (0 <= prefs.hex_gui_lang && prefs.hex_gui_lang < LANGUAGES_LENGTH) + strcat (hexchat_lang, languages[prefs.hex_gui_lang]); else strcat (hexchat_lang, "en"); -- cgit 1.4.1