hedgewars/hwengine.pas
changeset 2719 0efcaa69d30c
parent 2717 2b75ef82676d
child 2722 d891285e500f
equal deleted inserted replaced
2718:666afa2de3b5 2719:0efcaa69d30c
   274 
   274 
   275 	if recordFileName = '' then
   275 	if recordFileName = '' then
   276 		InitIPC;
   276 		InitIPC;
   277 	WriteLnToConsole(msgGettingConfig);
   277 	WriteLnToConsole(msgGettingConfig);
   278 
   278 
       
   279 	LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   279 	if cLocaleFName <> 'en.txt' then
   280 	if cLocaleFName <> 'en.txt' then
   280 		LoadLocale(Pathz[ptLocale] + '/en.txt');
   281         begin
   281 	LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
   282         // Try two letter locale first before trying specific locale overrides
   282 	LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
   283         if Length(cLocaleFName) <> 6 then LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
       
   284 	    LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
       
   285         end;
   283 
   286 
   284 	if recordFileName = '' then
   287 	if recordFileName = '' then
   285 		SendIPCAndWaitReply('C')        // ask for game config
   288 		SendIPCAndWaitReply('C')        // ask for game config
   286 	else
   289 	else
   287 		LoadRecordFromFile(recordFileName);
   290 		LoadRecordFromFile(recordFileName);