hedgewars/hwengine.pas
changeset 2719 0efcaa69d30c
parent 2717 2b75ef82676d
child 2722 d891285e500f
--- a/hedgewars/hwengine.pas	Tue Jan 26 23:04:19 2010 +0000
+++ b/hedgewars/hwengine.pas	Wed Jan 27 00:11:52 2010 +0000
@@ -276,10 +276,13 @@
 		InitIPC;
 	WriteLnToConsole(msgGettingConfig);
 
+	LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
 	if cLocaleFName <> 'en.txt' then
-		LoadLocale(Pathz[ptLocale] + '/en.txt');
-	LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
-	LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
+        begin
+        // Try two letter locale first before trying specific locale overrides
+        if Length(cLocaleFName) <> 6 then LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
+	    LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
+        end;
 
 	if recordFileName = '' then
 		SendIPCAndWaitReply('C')        // ask for game config