343 nameStart:= name; |
343 nameStart:= name; |
344 i:= 0; |
344 i:= 0; |
345 |
345 |
346 { Adjust for language suffix: Voicepacks can have an optional language suffix. |
346 { Adjust for language suffix: Voicepacks can have an optional language suffix. |
347 It's an underscore followed by an ISO 639-1 or ISO 639-2 language code. |
347 It's an underscore followed by an ISO 639-1 or ISO 639-2 language code. |
348 The suffix “_qau” is special, it will enable automatic language selection |
348 The suffix "_qau" is special, it will enable automatic language selection |
349 of this voicepack. For example, if team has set Default_qau as voicepack, |
349 of this voicepack. For example, if team has set Default_qau as voicepack, |
350 and the player language is Russian, the actual voicepack will be Default_ru, |
350 and the player language is Russian, the actual voicepack will be Default_ru, |
351 provided it can be found on the disk. |
351 provided it can be found on the disk. |
352 “qau” is a valid ISO 639-2 language code reserved for local use. } |
352 "qau" is a valid ISO 639-2 language code reserved for local use. } |
353 tmp:= Copy(name, Length(name) - 3, 4); |
353 tmp:= Copy(name, Length(name) - 3, 4); |
354 if (tmp = '_qau') then |
354 if (tmp = '_qau') then |
355 name:= Copy(name, 1, Length(name) - 4); |
355 name:= Copy(name, 1, Length(name) - 4); |
356 if (cLanguage <> 'en') and (tmp = '_qau') then |
356 if (cLanguage <> 'en') and (tmp = '_qau') then |
357 begin |
357 begin |