hedgewars/hwengine.pas
changeset 5107 d7fc678d78f4
parent 5066 d2684b6f02ce
child 5110 d48230ef9447
equal deleted inserted replaced
5104:e31409482740 5107:d7fc678d78f4
   264     InitKbdKeyTable();
   264     InitKbdKeyTable();
   265 
   265 
   266     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   266     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   267     if cLocaleFName <> 'en.txt' then
   267     if cLocaleFName <> 'en.txt' then
   268         begin
   268         begin
       
   269         if (Length(cLocaleFName) > 6) then cLocale := Copy(cLocaleFName,1,5)
       
   270         else cLocale := Copy(cLocaleFName,1,2);
   269         // Try two letter locale first before trying specific locale overrides
   271         // Try two letter locale first before trying specific locale overrides
   270         if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then
   272         if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then
   271             LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
   273             LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
   272         LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
   274         LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
   273         end;
   275         end
       
   276     else cLocale := 'en';
   274 
   277 
   275     WriteLnToConsole(msgGettingConfig);
   278     WriteLnToConsole(msgGettingConfig);
   276 
   279 
   277     if recordFileName = '' then
   280     if recordFileName = '' then
   278         begin
   281         begin