hedgewars/uSound.pas
changeset 8678 fb62d23c70f8
parent 8471 7681d14b9f01
child 8833 c13ebed437cb
child 8968 10a899fd9ac5
equal deleted inserted replaced
8677:afb2b467f801 8678:fb62d23c70f8
   261     // First, attempt to locate a localised version of the voice
   261     // First, attempt to locate a localised version of the voice
   262     if cLocale <> 'en' then
   262     if cLocale <> 'en' then
   263         begin
   263         begin
   264         locName:= name+'_'+cLocale;
   264         locName:= name+'_'+cLocale;
   265         path:= cPathz[ptVoices] + '/' + locName;
   265         path:= cPathz[ptVoices] + '/' + locName;
   266         if DirectoryExists(path) then
   266         if pfsExists(path) then
   267             name:= locName
   267             name:= locName
   268         else
   268         else
   269             if Length(cLocale) > 3 then
   269             if Length(cLocale) > 3 then
   270                 begin
   270                 begin
   271                 locName:= name+'_'+Copy(cLocale,1,2);
   271                 locName:= name+'_'+Copy(cLocale,1,2);
   272                 path:= cPathz[ptVoices] + '/' + locName;
   272                 path:= cPathz[ptVoices] + '/' + locName;
   273                 if DirectoryExists(path) then
   273                 if pfsExists(path) then
   274                     name:= locName
   274                     name:= locName
   275                 end
   275                 end
   276         end;
   276         end;
   277 
   277 
   278     // If that fails, use the unmodified one
   278     // If that fails, use the unmodified one