equal
deleted
inserted
replaced
333 ); |
333 ); |
334 |
334 |
335 |
335 |
336 function AskForVoicepack(name: shortstring): Pointer; |
336 function AskForVoicepack(name: shortstring): Pointer; |
337 var i: Longword; |
337 var i: Longword; |
338 locName, path: shortstring; |
338 langName, path: shortstring; |
339 begin |
339 begin |
340 i:= 0; |
340 i:= 0; |
341 |
341 |
342 // Adjust voicepack name if there's a localised version version of the voice |
342 // Adjust voicepack name if there's a localised version version of the voice |
343 if cLocale <> 'en' then |
343 if cLanguage <> 'en' then |
344 begin |
344 begin |
345 locName:= name+'_'+cLocale; |
345 langName:= name+'_'+cLanguage; |
346 path:= cPathz[ptVoices] + '/' + locName; |
346 path:= cPathz[ptVoices] + '/' + langName; |
347 if pfsExists(path) then |
347 if pfsExists(path) then |
348 name:= locName |
348 name:= langName |
349 else |
349 else |
350 if Length(cLocale) > 3 then |
350 if Length(cLanguage) > 3 then |
351 begin |
351 begin |
352 locName:= name+'_'+Copy(cLocale,1,2); |
352 langName:= name+'_'+Copy(cLanguage,1,2); |
353 path:= cPathz[ptVoices] + '/' + locName; |
353 path:= cPathz[ptVoices] + '/' + langName; |
354 if pfsExists(path) then |
354 if pfsExists(path) then |
355 name:= locName |
355 name:= langName |
356 end |
356 end |
357 end; |
357 end; |
358 |
358 |
359 path:= cPathz[ptVoices] + '/' + name; |
359 path:= cPathz[ptVoices] + '/' + name; |
360 |
360 |