Changeset 64 for trunk/Directories.pas


Ignore:
Timestamp:
Jan 14, 2017, 12:52:41 AM (7 years ago)
Author:
chronos
Message:
  • Added: New configuration dialog for selecting interface language.
  • Added: Czech and Deutch language recoded to UTF-8.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Directories.pas

    r38 r64  
    66var
    77  HomeDir, DataDir: string;
     8  LocaleCode: string;
    89
    9 function LocalizedFilePath(path: string): string;
     10function LocalizedFilePath(const Path: string): string;
    1011
    1112
     
    2627end;
    2728
    28 function LocalizedFilePath(path: string): string;
     29function LocalizedFilePath(const Path: string): string;
    2930begin
    30   result := DataDir + 'Localization' + DirectorySeparator + path;
    31   if not FileExists(result) then
    32     result := HomeDir + path
     31  if LocaleCode <> '' then begin
     32    Result := HomeDir + 'Localization' + DirectorySeparator + LocaleCode + DirectorySeparator + Path;
     33    if not FileExists(Result) then
     34      Result := HomeDir + Path;
     35  end else Result := HomeDir + Path;
    3336end;
    3437
    3538procedure InitUnit;
    3639begin
     40  LocaleCode := '';
    3741  HomeDir := ExtractFilePath(ParamStr(0));
    3842
Note: See TracChangeset for help on using the changeset viewer.