summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-19 06:48:12 +0000
committertron <tron@openttd.org>2005-07-19 06:48:12 +0000
commitbbc4c5fc3441237668fdcf61a3ff8189a803dd33 (patch)
tree41f654a5d14d2970940ed37e9acd73cd5550acc3
parent28a6e10a637e5191d292395b75542cb2cc5da647 (diff)
downloadopenttd-bbc4c5fc3441237668fdcf61a3ff8189a803dd33.tar.xz
(svn r2632) Revert accidently commited change
-rw-r--r--strings.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/strings.c b/strings.c
index 86b47824a..dba6f79f4 100644
--- a/strings.c
+++ b/strings.c
@@ -1078,32 +1078,13 @@ void InitializeLanguagePacks(void)
int n;
int m;
int def;
- int fallback;
LanguagePack hdr;
FILE *in;
char *files[32];
- uint j;
-
- char lang[] = "en";
- static const char* env[] = {
- "LANGUAGE",
- "LC_ALL",
- "LC_MESSAGES",
- "LANG"
- };
-
- for (j = 0; j < lengthof(env); j++) {
- const char* envlang = getenv(env[j]);
- if (envlang != NULL) {
- snprintf(lang, lengthof(lang), "%.2s", envlang);
- break;
- }
- }
n = GetLanguageList(files, lengthof(files));
- def = -1;
- fallback = 0;
+ def = 0; // default language file
// go through the language files and make sure that they are valid.
for (i = m = 0; i != n; i++) {
@@ -1123,12 +1104,10 @@ void InitializeLanguagePacks(void)
dl->ent[m].file = files[i];
dl->ent[m].name = strdup(hdr.name);
- if (strcmp(hdr.name, "English") == 0) fallback = m;
- if (strcmp(hdr.isocode, lang) == 0) def = m;
+ if (strcmp(hdr.name, "English") == 0) def = m;
m++;
}
- if (def == -1) def = fallback;
if (m == 0)
error(n == 0 ? "No available language packs" : "Invalid version of language packs");