Changeset 315 for trunk/Packages/Common/Languages.pas
- Timestamp:
- Jun 19, 2024, 11:15:44 PM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Languages.pas
r314 r315 1 unit ULanguages; 2 3 {$mode delphi}{$H+} 1 unit Languages; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, fgl;6 Classes, SysUtils, Generics.Collections; 9 7 10 8 type … … 17 15 { TLanguages } 18 16 19 TLanguages = class(T FPGObjectList<TLanguage>)17 TLanguages = class(TObjectList<TLanguage>) 20 18 function SearchByCode(ACode: string): TLanguage; 21 19 procedure AddNew(Code: string; Name: string); … … 218 216 SLang_za = 'Zhuang'; 219 217 SLang_zh = 'Chinese'; 218 SLang_zh_Hans = 'Simplified Chinese'; 219 SLang_zh_Hant = 'Traditional Chinese'; 220 220 SLang_zu = 'Zulu'; 221 221 222 222 223 implementation … … 230 231 begin 231 232 I := 0; 232 while (I < Count) and ( TLanguage(Items[I]).Code <ACode) do Inc(I);233 if I < Count then Result := TLanguage(Items[I])233 while (I < Count) and (Items[I].Code <> ACode) do Inc(I); 234 if I < Count then Result := Items[I] 234 235 else Result := nil; 235 236 end; … … 441 442 AddNew('za', SLang_za); 442 443 AddNew('zh', SLang_zh); 444 AddNew('zh-Hant', SLang_zh_Hant); 445 AddNew('zh-Hans', SLang_zh_Hans); 443 446 AddNew('zu', SLang_zu); 444 447 end; 445 448 446 449 end. 447
Note:
See TracChangeset
for help on using the changeset viewer.