hedgewars/hwengine.pas
changeset 5111 d8856d98ce7d
parent 5109 6d2e8a24277e
parent 5110 d48230ef9447
child 5130 3602ede67ec5
equal deleted inserted replaced
5109:6d2e8a24277e 5111:d8856d98ce7d
   258 
   258 
   259     ControllerInit(); // has to happen before InitKbdKeyTable to map keys
   259     ControllerInit(); // has to happen before InitKbdKeyTable to map keys
   260     InitKbdKeyTable();
   260     InitKbdKeyTable();
   261 
   261 
   262     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
   262     LoadLocale(Pathz[ptLocale] + '/en.txt');  // Do an initial load with english
       
   263     if (Length(cLocaleFName) > 6) then cLocale := Copy(cLocaleFName,1,5)
       
   264     else cLocale := Copy(cLocaleFName,1,2);
   263     if cLocaleFName <> 'en.txt' then
   265     if cLocaleFName <> 'en.txt' then
   264         begin
   266         begin
   265         // Try two letter locale first before trying specific locale overrides
   267         // Try two letter locale first before trying specific locale overrides
   266         if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then
   268         if (Length(cLocale) > 2) and (Copy(cLocale,1,2) <> 'en') then
   267             LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt');
   269             LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocale,1,2)+'.txt');
   268         LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
   270         LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName);
   269         end;
   271         end
       
   272     else cLocale := 'en';
   270 
   273 
   271     WriteLnToConsole(msgGettingConfig);
   274     WriteLnToConsole(msgGettingConfig);
   272 
   275 
   273     if recordFileName = '' then
   276     if recordFileName = '' then
   274         begin
   277         begin