diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..55f3304 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +*.bak +*.dcu +*.dcp +*.ddp +*.dll +*.drc +*.dsk +*.exe +*.identcache +*.local +*.map +*.~*~ +__history +bin/*.zip +/Packages/dklangXXX.dpk +/Packages/dcldklangXXX.dpk +/Packages/__oldpackages +dklang220.res +dklang220.stat +dcldklang220.stat +dklang220.dproj +dcldklang220.otares +dcldklang220.res diff --git a/Converter_v2/DKLang_Converter_v2.cfg b/Converter_v2/DKLang_Converter_v2.cfg deleted file mode 100644 index 45f0861..0000000 --- a/Converter_v2/DKLang_Converter_v2.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Converter_v2/DKLang_Converter_v2.dof b/Converter_v2/DKLang_Converter_v2.dof deleted file mode 100644 index a40531a..0000000 --- a/Converter_v2/DKLang_Converter_v2.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;visualclx;dklang7;RxCtl7;synedhilite7;syned7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Converter_v2/DKLang_Converter_v2.res b/Converter_v2/DKLang_Converter_v2.res deleted file mode 100644 index 1228533..0000000 Binary files a/Converter_v2/DKLang_Converter_v2.res and /dev/null differ diff --git a/Converter_v2/Main.dfm b/Converter_v2/Main.dfm deleted file mode 100644 index 062b74c..0000000 --- a/Converter_v2/Main.dfm +++ /dev/null @@ -1,155 +0,0 @@ -object fMain: TfMain - Left = 495 - Top = 318 - Width = 620 - Height = 464 - ActiveControl = eProjectFile - Caption = 'DKLang Project Resource Converter' - Color = clBtnFace - Constraints.MinHeight = 300 - Constraints.MinWidth = 480 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Shell Dlg 2' - Font.Style = [] - OldCreateOrder = False - Position = poScreenCenter - DesignSize = ( - 612 - 435) - PixelsPerInch = 96 - TextHeight = 13 - object lConversionLog: TLabel - Left = 8 - Top = 196 - Width = 75 - Height = 13 - Caption = 'Conversion &log:' - FocusControl = mConversionLog - end - object pMain: TPanel - Left = 8 - Top = 8 - Width = 595 - Height = 185 - Anchors = [akLeft, akTop, akRight] - BevelInner = bvRaised - BevelOuter = bvLowered - TabOrder = 0 - DesignSize = ( - 595 - 185) - object lInfo: TLabel - Left = 12 - Top = 12 - Width = 439 - Height = 39 - Caption = - 'This program converts DKLang constant resources from library ver' + - 'sion 2.x:'#13#10' - Version 2.x constants were stored inside project'#39 + - 's resource file .res'#13#10' - Version 3.0+ stores cons' + - 'tants in a separate resource file .dkl_const.res' - end - object lProjectFile: TLabel - Left = 12 - Top = 64 - Width = 100 - Height = 13 - Caption = '&Project resource file:' - FocusControl = eProjectFile - end - object lOutputFile: TLabel - Left = 12 - Top = 104 - Width = 100 - Height = 13 - Caption = 'O&utput resource file:' - FocusControl = eOutputFile - end - object eProjectFile: TEdit - Left = 12 - Top = 80 - Width = 491 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - OnChange = eProjectFileChange - end - object bProjectFileBrowse: TButton - Left = 506 - Top = 80 - Width = 75 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Browse...' - TabOrder = 1 - OnClick = bProjectFileBrowseClick - end - object eOutputFile: TEdit - Left = 12 - Top = 120 - Width = 491 - Height = 21 - Anchors = [akLeft, akTop, akRight] - TabOrder = 2 - OnChange = eOutputFileChange - end - object bBrowseOutputFile: TButton - Left = 506 - Top = 120 - Width = 75 - Height = 23 - Anchors = [akTop, akRight] - Caption = 'Bro&wse...' - TabOrder = 3 - OnClick = bBrowseOutputFileClick - end - object bGo: TButton - Left = 508 - Top = 152 - Width = 72 - Height = 23 - Anchors = [akTop, akRight] - Caption = '&Go' - TabOrder = 5 - OnClick = bGoClick - end - object cbRemoveFromProject: TCheckBox - Left = 12 - Top = 152 - Width = 253 - Height = 17 - Caption = '&Remove constant resource from the project file' - Checked = True - State = cbChecked - TabOrder = 4 - end - end - object mConversionLog: TMemo - Left = 8 - Top = 212 - Width = 595 - Height = 213 - Anchors = [akLeft, akTop, akRight, akBottom] - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 1 - end - object odProjectFile: TOpenDialog - DefaultExt = 'res' - Filter = 'Resource files (*.res)|*.res' - Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing] - Title = 'Select project resource file' - Left = 472 - Top = 28 - end - object sdOutputFile: TSaveDialog - DefaultExt = 'dkl_const.res' - Filter = 'DKLang constant resource files (*.dkl_const.res)|*.dkl_const.res' - Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing] - Title = 'Select target resource file' - Left = 540 - Top = 28 - end -end diff --git a/Converter_v2/Main.pas b/Converter_v2/Main.pas deleted file mode 100644 index afe80fd..0000000 --- a/Converter_v2/Main.pas +++ /dev/null @@ -1,140 +0,0 @@ -unit Main; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls, ExtCtrls; - -type - TfMain = class(TForm) - bBrowseOutputFile: TButton; - bGo: TButton; - bProjectFileBrowse: TButton; - cbRemoveFromProject: TCheckBox; - eOutputFile: TEdit; - eProjectFile: TEdit; - lConversionLog: TLabel; - lInfo: TLabel; - lOutputFile: TLabel; - lProjectFile: TLabel; - mConversionLog: TMemo; - odProjectFile: TOpenDialog; - pMain: TPanel; - sdOutputFile: TSaveDialog; - procedure bBrowseOutputFileClick(Sender: TObject); - procedure bGoClick(Sender: TObject); - procedure bProjectFileBrowseClick(Sender: TObject); - procedure eOutputFileChange(Sender: TObject); - procedure eProjectFileChange(Sender: TObject); - private - procedure UpdateState; - end; - -var - fMain: TfMain; - -implementation -{$R *.dfm} -uses DKLang, DKL_ResFile; - - procedure TfMain.bBrowseOutputFileClick(Sender: TObject); - begin - sdOutputFile.FileName := eOutputFile.Text; - if sdOutputFile.Execute then eOutputFile.Text := sdOutputFile.FileName; - end; - - procedure TfMain.bGoClick(Sender: TObject); - var - sProjectFile, sOutputFile: String; - ResFileIn, ResFileOut: TDKLang_ResFile; - ConstEntryIn, ConstEntryOut: TDKLang_ResEntry; - - procedure LogString(const s: String); overload; - begin - mConversionLog.Lines.Add(s); - end; - - procedure LogString(const s: String; const aParams: Array of const); overload; - begin - LogString(Format(s, aParams)); - end; - - begin - try - // Check prerequisites - sProjectFile := Trim(eProjectFile.Text); - sOutputFile := Trim(eOutputFile.Text); - LogString('Project file: %s', [sProjectFile]); - LogString('Output file: %s', [sOutputFile]); - if AnsiSameText(sProjectFile, sOutputFile) then raise Exception.Create('You shoudn''t specify the same file for both project and output files'); - // Try to load the file - ResFileIn := TDKLang_ResFile.Create; - try - ResFileIn.LoadFromFile(sProjectFile); - LogString('Project file loaded successfully.'); - // Look for constant resource - ConstEntryIn := ResFileIn.FindEntry(IntToStr(Integer(RT_RCDATA)), SDKLang_ConstResourceName); - if ConstEntryIn=nil then - LogString('The file doesn''t contain constant resource ("%s"), no need to convert it.', [SDKLang_ConstResourceName]) - else begin - LogString('Constant resource "%s" found (%d bytes data).', [SDKLang_ConstResourceName, Length(ConstEntryIn.RawData)]); - // Create output file - ResFileOut := TDKLang_ResFile.Create; - try - // Copy the resource - ConstEntryOut := ConstEntryIn.Clone; - ResFileOut.AddEntry(ConstEntryOut); - LogString('Constant entry cloned.'); - // Save the file - ResFileOut.SaveToFile(sOutputFile); - LogString('Output resource file saved successfully.'); - finally - ResFileOut.Free; - end; - // Remove the entry from the input file, if needed - if cbRemoveFromProject.Checked then begin - ResFileIn.RemoveEntry(ConstEntryIn); - LogString('Constant entry removed from the project file.'); - // Save the project resource file - ResFileIn.SaveToFile(sProjectFile); - LogString('Project resource file saved successfully.'); - end; - end; - finally - ResFileIn.Free; - end; - LogString('Finished.'); - LogString('----------------------------------------'); - except - on e: Exception do begin - LogString('Exception class: %s', [e.ClassName]); - LogString('Exception message: %s', [e.Message]); - raise; - end; - end; - end; - - procedure TfMain.bProjectFileBrowseClick(Sender: TObject); - begin - odProjectFile.FileName := eProjectFile.Text; - if odProjectFile.Execute then eProjectFile.Text := odProjectFile.FileName; - end; - - procedure TfMain.eOutputFileChange(Sender: TObject); - begin - UpdateState; - end; - - procedure TfMain.eProjectFileChange(Sender: TObject); - begin - eOutputFile.Text := ChangeFileExt(eProjectFile.Text, '.dkl_const.res'); - UpdateState; - end; - - procedure TfMain.UpdateState; - begin - bGo.Enabled := (eProjectFile.Text<>'') and (eOutputFile.Text<>''); - end; - -end. diff --git a/DKL_ConstEditor.dfm b/DKL_ConstEditor.dfm deleted file mode 100755 index 37b8f40..0000000 --- a/DKL_ConstEditor.dfm +++ /dev/null @@ -1,124 +0,0 @@ -object dDKL_ConstEditor: TdDKL_ConstEditor - Left = 357 - Top = 191 - ActiveControl = gMain - AutoScroll = False - BorderIcons = [biSystemMenu, biMaximize] - Caption = 'DKLang Constant Editor' - ClientHeight = 435 - ClientWidth = 592 - Color = clBtnFace - Constraints.MinHeight = 300 - Constraints.MinWidth = 600 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Shell Dlg 2' - Font.Style = [] - OldCreateOrder = False - Position = poScreenCenter - DesignSize = ( - 592 - 435) - PixelsPerInch = 96 - TextHeight = 13 - object lCount: TLabel - Left = 8 - Top = 408 - Width = 43 - Height = 13 - Anchors = [akLeft, akBottom] - Caption = '' - end - object lDeleteHint: TLabel - Left = 8 - Top = 368 - Width = 213 - Height = 13 - Anchors = [akLeft, akBottom] - Caption = 'Use Ctrl+Delete to delete the current entry.' - end - object gMain: TTntStringGrid - Left = 8 - Top = 8 - Width = 577 - Height = 357 - Anchors = [akLeft, akTop, akRight, akBottom] - ColCount = 2 - DefaultRowHeight = 18 - FixedCols = 0 - RowCount = 2 - Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing, goEditing, goAlwaysShowEditor, goThumbTracking] - ScrollBars = ssVertical - TabOrder = 0 - OnKeyDown = gMainKeyDown - OnMouseUp = gMainMouseUp - OnSelectCell = gMainSelectCell - ColWidths = ( - 286 - 284) - end - object bOK: TButton - Left = 188 - Top = 404 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&OK' - Default = True - TabOrder = 2 - OnClick = bOKClick - end - object bCancel: TButton - Left = 268 - Top = 404 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Cancel = True - Caption = '&Cancel' - ModalResult = 2 - TabOrder = 3 - end - object bLoad: TButton - Left = 428 - Top = 404 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Load...' - TabOrder = 5 - OnClick = bLoadClick - end - object bSave: TButton - Left = 508 - Top = 404 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Save...' - TabOrder = 6 - OnClick = bSaveClick - end - object cbSaveToLangSource: TCheckBox - Left = 8 - Top = 384 - Width = 573 - Height = 17 - Anchors = [akLeft, akRight, akBottom] - Caption = - '&Also save the constants into the project language source file (' + - '*.dklang)' - TabOrder = 1 - end - object bErase: TButton - Left = 348 - Top = 404 - Width = 75 - Height = 23 - Anchors = [akRight, akBottom] - Caption = '&Erase' - TabOrder = 4 - OnClick = bEraseClick - end -end diff --git a/DKLang.pas b/DKLang.pas deleted file mode 100644 index b33b3ba..0000000 --- a/DKLang.pas +++ /dev/null @@ -1,2773 +0,0 @@ -///********************************************************************************************************************* -/// $Id: DKLang.pas,v 1.37 2006-08-22 13:17:35 dale Exp $ -///--------------------------------------------------------------------------------------------------------------------- -/// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org/ -///********************************************************************************************************************* -/// -/// The contents of this package are subject to the Mozilla Public License -/// Version 1.1 (the "License"); you may not use this file except in compliance -/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ -/// -/// Alternatively, you may redistribute this library, use and/or modify it under the -/// terms of the GNU Lesser General Public License as published by the Free Software -/// Foundation; either version 2.1 of the License, or (at your option) any later -/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ -/// -/// Software distributed under the License is distributed on an "AS IS" basis, -/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -/// specific language governing rights and limitations under the License. -/// -/// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ -/// Unicode support was initially developed by Bruce J. Miller -/// -///********************************************************************************************************************* -// The main unit (and the only required runtime unit) of the package. Contains all the -// basic class and component declarations -// -unit DKLang; - -{$INCLUDE TntCompilers.inc} - -interface -uses - Windows, SysUtils, Classes, Contnrs, Masks, TntClasses, - // TntWideStrings shouldn't be used in BDS 2006+ as those IDEs correctly implement default WideStrings - {$IFDEF COMPILER_10_UP} - WideStrings - {$ELSE} - TntWideStrings - {$ENDIF} - ; - -type - // Error - EDKLangError = class(Exception); - - TDKLang_Constants = class; - - // A translation state - TDKLang_TranslationState = ( - dktsUntranslated, // The value is still untranslated - dktsAutotranslated); // The value was translated using the Translation Repository and hence the result needs checking - TDKLang_TranslationStates = set of TDKLang_TranslationState; - - //------------------------------------------------------------------------------------------------------------------- - // An interface to an object capable of storing its data as a language source strings - //------------------------------------------------------------------------------------------------------------------- - - IDKLang_LanguageSourceObject = interface(IInterface) - ['{41861692-AF49-4973-BDA1-0B1375407D29}'] - // Is called just before storing begins. Must return True to allow the storing or False otherwise - function CanStore: Boolean; - // Must append the language source lines (Strings) with its own data. If an entry states intersect with - // StateFilter, the entry should be skipped - procedure StoreLangSource(Strings: TWideStrings; StateFilter: TDKLang_TranslationStates); - // Prop handlers - function GetSectionName: WideString; - // Props - // -- The name of the section corresponding to object language source data (without square brackets) - property SectionName: WideString read GetSectionName; - end; - - //------------------------------------------------------------------------------------------------------------------- - // A list of masks capable of testing an arbitrary string for matching. A string is considered matching when it - // matches any mask from the list - //------------------------------------------------------------------------------------------------------------------- - - TDKLang_MaskList = class(TObjectList) - private - function GetItems(Index: Integer): TMask; - public - // Creates and fills the list from Strings - constructor Create(MaskStrings: TStrings); - // Returns True if s matches any mask from the list - function Matches(const s: String): Boolean; - // Props - // -- Masks by index - property Items[Index: Integer]: TMask read GetItems; default; - end; - - //------------------------------------------------------------------------------------------------------------------- - // A single component property value translation, referred to by ID - //------------------------------------------------------------------------------------------------------------------- - - PDKLang_PropValueTranslation = ^TDKLang_PropValueTranslation; - TDKLang_PropValueTranslation = record - iID: Integer; // An entry ID, form-wide unique and permanent - wsValue: WideString; // The property value translation - TranStates: TDKLang_TranslationStates; // Translation states - end; - - //------------------------------------------------------------------------------------------------------------------- - // List of property value translations for the whole component hierarchy (usually for a single form); a plain list - // indexed (and sorted) by ID - //------------------------------------------------------------------------------------------------------------------- - - TDKLang_CompTranslation = class(TList) - private - // Prop storage - FComponentName: String; - // Prop handlers - function GetItems(Index: Integer): PDKLang_PropValueTranslation; - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - public - constructor Create(const sComponentName: String); - // Adds an entry into the list and returns the index of the newly added entry - function Add(iID: Integer; const wsValue: WideString; TranStates: TDKLang_TranslationStates): Integer; - // Returns index of entry by its ID; -1 if not found - function IndexOfID(iID: Integer): Integer; - // Tries to find the entry by property ID; returns True, if succeeded, and its index in iIndex; otherwise returns - // False and its adviced insertion-point index in iIndex - function FindID(iID: Integer; out iIndex: Integer): Boolean; - // Returns the property entry for given ID, or nil if not found - function FindPropByID(iID: Integer): PDKLang_PropValueTranslation; - // Props - // -- Root component's name for which the translations in the list are (form, frame, datamodule etc) - property ComponentName: String read FComponentName; - // -- Translations by index - property Items[Index: Integer]: PDKLang_PropValueTranslation read GetItems; default; - end; - - //------------------------------------------------------------------------------------------------------------------- - // List of component translations - //------------------------------------------------------------------------------------------------------------------- - - TDKLang_CompTranslations = class(TList) - private - // Prop storage - FConstants: TDKLang_Constants; - FIsStreamUnicode: Boolean; - FParams: TWideStrings; - // Callback function for obtaining current language ID - function GetLangIDCallback: LANGID; - // Prop handlers - function GetItems(Index: Integer): TDKLang_CompTranslation; - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - public - constructor Create; - destructor Destroy; override; - procedure Clear; override; - // Adds an item to the list and returns the index of the newly added entry - function Add(Item: TDKLang_CompTranslation): Integer; - // Returns index of entry by component name; -1 if not found - function IndexOfComponentName(const sComponentName: String): Integer; - // Returns component translation entry by component name; nil if not found - function FindComponentName(const sComponentName: String): TDKLang_CompTranslation; - // Stream loading and storing in plaintext (ini-file-like) format. bParamsOnly tells the object to load only the - // sectionless parameters and not to load components nor constants. This may be used to evaluate the translation - // parameters only (eg. its language) - procedure Text_LoadFromStream(Stream: TStream; bParamsOnly: Boolean = False); - procedure Text_SaveToStream(Stream: TStream; bUnicode, bSkipUntranslated: Boolean); - // File loading in plaintext (ini-file-like) format - procedure Text_LoadFromFile(const wsFileName: WideString; bParamsOnly: Boolean = False); - // File storing in plaintext (ini-file-like) format: - // bUnicode - if False, stores the data in ANSI encoding; if True, stores them in Unicode - // bSkipUntranslated - if True, untranslated values are eliminated from the file - procedure Text_SaveToFile(const wsFileName: WideString; bUnicode, bSkipUntranslated: Boolean); - // Resource loading - procedure Text_LoadFromResource(Instance: HINST; const wsResName: WideString; bParamsOnly: Boolean = False); overload; - procedure Text_LoadFromResource(Instance: HINST; iResID: Integer; bParamsOnly: Boolean = False); overload; - // Props - // -- Constant entries - property Constants: TDKLang_Constants read FConstants; - // -- True if last loading from text file/stream detected that it used Unicode encoding; False if it was ANSI - property IsStreamUnicode: Boolean read FIsStreamUnicode; - // -- Component translations by index - property Items[Index: Integer]: TDKLang_CompTranslation read GetItems; default; - // -- Simple parameters stored in a translation file BEFORE the first section (ie. sectionless) - property Params: TWideStrings read FParams; - end; - - //------------------------------------------------------------------------------------------------------------------- - // A single component property entry - //------------------------------------------------------------------------------------------------------------------- - - PDKLang_PropEntry = ^TDKLang_PropEntry; - TDKLang_PropEntry = record - iID: Integer; // An entry ID, form-wide unique and permanent - sPropName: String; // Component's property name to which the entry is applied - wsDefLangValue: WideString; // The property's value for the default language, represented as a widestring - bValidated: Boolean; // Validation flag, used internally in TDKLang_CompEntry.UpdateEntries - end; - - //------------------------------------------------------------------------------------------------------------------- - // List of property entries (sorted by property name, case-insensitively) - //------------------------------------------------------------------------------------------------------------------- - - TDKLang_PropEntries = class(TList) - private - // Prop handlers - function GetItems(Index: Integer): PDKLang_PropEntry; - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - // Resets bValidated flag for each entry - procedure Invalidate; - // Deletes all invalid entries - procedure DeleteInvalidEntries; - // Returns max property entry ID over the list; 0 if list is empty - function GetMaxID: Integer; - public - // Add an entry into the list (returns True) or replaces the property value with sDefLangValue if property with - // this name already exists (and returns False). Also sets bValidated to True - function Add(iID: Integer; const sPropName: String; const wsDefLangValue: WideString): Boolean; - // Returns index of entry by its ID; -1 if not found - function IndexOfID(iID: Integer): Integer; - // Returns index of entry by property name; -1 if not found - function IndexOfPropName(const sPropName: String): Integer; - // Tries to find the entry by property name; returns True, if succeeded, and its index in iIndex; otherwise returns - // False and its adviced insertion-point index in iIndex - function FindPropName(const sPropName: String; out iIndex: Integer): Boolean; - // Returns entry by property name; nil if not found - function FindPropByName(const sPropName: String): PDKLang_PropEntry; - // Stream loading and storing - procedure LoadFromDFMResource(Stream: TStream); - procedure SaveToDFMResource(Stream: TStream); - // Props - // -- Entries by index - property Items[Index: Integer]: PDKLang_PropEntry read GetItems; default; - end; - - //------------------------------------------------------------------------------------------------------------------- - // Single component entry - //------------------------------------------------------------------------------------------------------------------- - - TDKLang_CompEntries = class; - - TDKLang_CompEntry = class(TObject) - private - // Component property entries - FPropEntries: TDKLang_PropEntries; - // Owned component entries - FOwnedCompEntries: TDKLang_CompEntries; - // Prop storage - FName: String; - FComponent: TComponent; - FOwner: TDKLang_CompEntry; - // Recursively calls PropEntries.Invalidate for each component - procedure InvalidateProps; - // Returns max property entry ID across all owned components; 0 if list is empty - function GetMaxPropEntryID: Integer; - // Internal recursive update routine - procedure InternalUpdateEntries(var iFreePropEntryID: Integer; bModifyList, bIgnoreEmptyProps, bIgnoreNonAlphaProps, bIgnoreFontProps: Boolean; IgnoreMasks, StoreMasks: TDKLang_MaskList); - // Recursively establishes links to components by filling FComponent field with the component reference found by - // its Name. Also removes components whose names no longer associated with actually instantiated components. - // Required to be called after loading from the stream - procedure BindComponents(CurComponent: TComponent); - // Recursively appends property data as a language source format into Strings - procedure StoreLangSource(Strings: TWideStrings); - // Prop handlers - function GetName: String; - function GetComponentNamePath(bIncludeRoot: Boolean): String; - public - constructor Create(AOwner: TDKLang_CompEntry); - destructor Destroy; override; - // If bModifyList=True, recursively updates (or creates) component hierarchy and component property values, - // creating and deleting entries as appropriate. If bModifyList=False, only refreshes the [current=default] - // property values - procedure UpdateEntries(bModifyList, bIgnoreEmptyProps, bIgnoreNonAlphaProps, bIgnoreFontProps: Boolean; IgnoreMasks, StoreMasks: TDKLang_MaskList); - // Recursively replaces the property values with ones found in Translation; if Translation=nil, applies the default - // property values - procedure ApplyTranslation(Translation: TDKLang_CompTranslation; cCodePage: Cardinal); - // Stream loading/storing - procedure LoadFromDFMResource(Stream: TStream); - procedure SaveToDFMResource(Stream: TStream); - // Removes the given component by reference, if any; if bRecursive=True, acts recursively - procedure RemoveComponent(AComponent: TComponent; bRecursive: Boolean); - // Props - // -- Reference to the component (nil while loading from the stream) - property Component: TComponent read FComponent; - // -- Returns component name path in the form 'owner1.owner2.name'. If bIncludeRoot=False, excludes the top-level - // owner name - property ComponentNamePath[bIncludeRoot: Boolean]: String read GetComponentNamePath; - // -- Component name in the IDE - property Name: String read GetName; - // -- Owner entry, can be nil - property Owner: TDKLang_CompEntry read FOwner; - end; - - //------------------------------------------------------------------------------------------------------------------- - // List of component entries - //------------------------------------------------------------------------------------------------------------------- - - TDKLang_CompEntries = class(TList) - private - // Prop storage - FOwner: TDKLang_CompEntry; - // Prop handlers - function GetItems(Index: Integer): TDKLang_CompEntry; - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - public - constructor Create(AOwner: TDKLang_CompEntry); - // Add an entry into the list; returns the index of the newly added entry - function Add(Item: TDKLang_CompEntry): Integer; - // Returns index of entry by component name; -1 if not found - function IndexOfCompName(const sCompName: String): Integer; - // Returns index of entry by component reference; -1 if not found - function IndexOfComponent(CompReference: TComponent): Integer; - // Returns entry for given component reference; nil if not found - function FindComponent(CompReference: TComponent): TDKLang_CompEntry; - // Stream loading and storing - procedure LoadFromDFMResource(Stream: TStream); - procedure SaveToDFMResource(Stream: TStream); - // Props - // -- Items by index - property Items[Index: Integer]: TDKLang_CompEntry read GetItems; default; - // -- Owner component entry - property Owner: TDKLang_CompEntry read FOwner; - end; - - //------------------------------------------------------------------------------------------------------------------- - // A constant - //------------------------------------------------------------------------------------------------------------------- - - PDKLang_Constant = ^TDKLang_Constant; - TDKLang_Constant = record - sName: String; // Constant name, written obeying standard rules for identifier naming - wsValue: WideString; // Constant value - wsDefValue: WideString; // Default constant value (in the default language; initially the same as wsValue) - TranStates: TDKLang_TranslationStates; // Translation states - end; - - //------------------------------------------------------------------------------------------------------------------- - // List of constants (sorted by name, case-insensitively) - //------------------------------------------------------------------------------------------------------------------- - - // Callback function called when there's a need to determine language of constants being converted from ANSI to - // Unicode - TDKLang_GetLangIDCallback = function: LANGID of object; - - TDKLang_Constants = class(TList, IInterface, IDKLang_LanguageSourceObject) - private - // Get language ID callback - FGetLangIDCallback: TDKLang_GetLangIDCallback; - // Prop storage - FAutoSaveLangSource: Boolean; - // IInterface - function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; - function _AddRef: Integer; stdcall; - function _Release: Integer; stdcall; - // IDKLang_LanguageSourceObject - function IDKLang_LanguageSourceObject.CanStore = LSO_CanStore; - procedure IDKLang_LanguageSourceObject.StoreLangSource = LSO_StoreLangSource; - function IDKLang_LanguageSourceObject.GetSectionName = LSO_GetSectionName; - function LSO_CanStore: Boolean; - procedure LSO_StoreLangSource(Strings: TWideStrings; StateFilter: TDKLang_TranslationStates); - function LSO_GetSectionName: WideString; - // Prop handlers - function GetAsRawString: String; - function GetItems(Index: Integer): PDKLang_Constant; - function GetItemsByName(const sName: String): PDKLang_Constant; - function GetValues(const sName: String): WideString; - procedure SetAsRawString(const Value: String); - procedure SetValues(const sName: String; const wsValue: WideString); - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - public - constructor Create(AGetLangIDCallback: TDKLang_GetLangIDCallback); - // Add an entry into the list; returns the index of the newly inserted entry - function Add(const sName: String; const wsValue: WideString; TranStates: TDKLang_TranslationStates): Integer; - // Returns index of entry by name; -1 if not found - function IndexOfName(const sName: String): Integer; - // Tries to find the entry by name; returns True, if succeeded, and its index in iIndex; otherwise returns False - // and its adviced insertion-point index in iIndex - function FindName(const sName: String; out iIndex: Integer): Boolean; - // Finds the constant by name; returns nil if not found - function FindConstName(const sName: String): PDKLang_Constant; - // Stream loading/storing - procedure LoadFromStream(Stream: TStream); - procedure SaveToStream(Stream: TStream); - // Loads the constants from binary resource with the specified name. Returns True if resource existed, False - // otherwise - function LoadFromResource(Instance: HINST; const wsResName: WideString): Boolean; - // Updates the values for existing names from Constants. If Constants=nil, reverts the values to their defaults - // (wsDefValue) - procedure TranslateFrom(Constants: TDKLang_Constants); - // Props - // -- Binary list representation as raw data - property AsRawString: String read GetAsRawString write SetAsRawString; - // -- If True (default), the list will be automatically saved into the Project's language resource file (*.dklang) - property AutoSaveLangSource: Boolean read FAutoSaveLangSource write FAutoSaveLangSource; - // -- Constants by index - property Items[Index: Integer]: PDKLang_Constant read GetItems; default; - // -- Constants by name. If no constant of that name exists, an Exception is raised - property ItemsByName[const sName: String]: PDKLang_Constant read GetItemsByName; - // -- Constant values, by name. If no constant of that name exists, an Exception is raised - property Values[const sName: String]: WideString read GetValues write SetValues; - end; - - //------------------------------------------------------------------------------------------------------------------- - // Non-visual language controller component - //------------------------------------------------------------------------------------------------------------------- - - // TDKLanguageController options - TDKLanguageControllerOption = ( - dklcoAutoSaveLangSource, // If on, the component will automatically save itself into the Project's language resource file (*.dklang) - dklcoIgnoreEmptyProps, // Ignore all properties having no string assigned - dklcoIgnoreNonAlphaProps, // Ignore all properties with no alpha characters (e.g. with numbers or symbols only); includes dklcoIgnoreEmptyProps behavior - dklcoIgnoreFontProps); // Ignore all TFont properties - TDKLanguageControllerOptions = set of TDKLanguageControllerOption; -const - DKLang_DefaultControllerOptions = [dklcoAutoSaveLangSource, dklcoIgnoreEmptyProps, dklcoIgnoreNonAlphaProps, dklcoIgnoreFontProps]; - -type - TDKLanguageController = class(TComponent, IDKLang_LanguageSourceObject) - private - // Prop storage - FIgnoreList: TStrings; - FOnLanguageChanged: TNotifyEvent; - FOnLanguageChanging: TNotifyEvent; - FOptions: TDKLanguageControllerOptions; - FRootCompEntry: TDKLang_CompEntry; - FSectionName: WideString; - FStoreList: TStrings; - // Methods for LangData custom property support - procedure LangData_Load(Stream: TStream); - procedure LangData_Store(Stream: TStream); - // IDKLang_LanguageSourceObject - function IDKLang_LanguageSourceObject.CanStore = LSO_CanStore; - procedure IDKLang_LanguageSourceObject.StoreLangSource = LSO_StoreLangSource; - function IDKLang_LanguageSourceObject.GetSectionName = GetActualSectionName; - function LSO_CanStore: Boolean; - procedure LSO_StoreLangSource(Strings: TWideStrings; StateFilter: TDKLang_TranslationStates); - // Forces component entries to update their entries. If bModifyList=False, only default property values are - // initialized, no entry additions/removes are allowed - procedure UpdateComponents(bModifyList: Boolean); - // Prop handlers - function GetActualSectionName: WideString; - procedure SetIgnoreList(Value: TStrings); - procedure SetStoreList(Value: TStrings); - protected - procedure DefineProperties(Filer: TFiler); override; - procedure Notification(AComponent: TComponent; Operation: TOperation); override; - // Fires the OnLanguageChanging event - procedure DoLanguageChanging; - // Fires the OnLanguageChanged event - procedure DoLanguageChanged; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Loaded; override; - // Props - // -- Name of a section that is actually used to store and read language data - property ActualSectionName: WideString read GetActualSectionName; - // -- The root entry, corresponding to the instance's owner - property RootCompEntry: TDKLang_CompEntry read FRootCompEntry; - published - // -- List of ignored properties - property IgnoreList: TStrings read FIgnoreList write SetIgnoreList; - // -- Language controller options - property Options: TDKLanguageControllerOptions read FOptions write FOptions default DKLang_DefaultControllerOptions; - // -- Name of a section corresponding to the form or frame served by the controller. If empty (default), Owner's - // name is used as section name - property SectionName: WideString read FSectionName write FSectionName; - // -- List of forcibly stored properties - property StoreList: TStrings read FStoreList write SetStoreList; - // Events - // -- Fires when language is changed through the LangManager - property OnLanguageChanging: TNotifyEvent read FOnLanguageChanging write FOnLanguageChanging; - // -- Fires when language is changed through the LangManager - property OnLanguageChanged: TNotifyEvent read FOnLanguageChanged write FOnLanguageChanged; - end; - - //------------------------------------------------------------------------------------------------------------------- - // A helper language resource list - //------------------------------------------------------------------------------------------------------------------- - - // Language resource entry kind - TDKLang_LangResourceKind = ( - dklrkResName, // The entry is a resource addressed by name - dklrkResID, // The entry is a resource addressed by ID - dklrkFile); // The entry is a translation file - - PDKLang_LangResource = ^TDKLang_LangResource; - TDKLang_LangResource = record - Kind: TDKLang_LangResourceKind; // Entry kind - Instance: HINST; // Instance containing the resource (Kind=[dklrkResName, dklrkResID]) - wsName: WideString; // File (Kind=dklrkFile) or resource (Kind=dklrkResName) name - iResID: Integer; // Resource ID (Kind=dklrkResID) - wLangID: LANGID; // Language contained in the resource - end; - - TDKLang_LangResources = class(TList) - private - function GetItems(Index: Integer): PDKLang_LangResource; - protected - procedure Notify(Ptr: Pointer; Action: TListNotification); override; - public - function Add(Kind: TDKLang_LangResourceKind; Instance: HINST; const wsName: WideString; iResID: Integer; wLangID: LANGID): Integer; - // Returns the index of entry having the specified LangID; -1 if no such entry - function IndexOfLangID(wLangID: LANGID): Integer; - // Returns the entry having the specified LangID; nil if no such entry - function FindLangID(wLangID: LANGID): PDKLang_LangResource; - // Props - // -- Items by index - property Items[Index: Integer]: PDKLang_LangResource read GetItems; default; - end; - - //------------------------------------------------------------------------------------------------------------------- - // Global thread-safe language manager class - //------------------------------------------------------------------------------------------------------------------- - - TDKLanguageManager = class(TObject) - private - // Synchronizer object to ensure the thread safety - FSynchronizer: TMultiReadExclusiveWriteSynchronizer; - // Internal constants object - FConstants: TDKLang_Constants; - // Internal list of language controllers have been created (runtime only) - FLangControllers: TList; - // Language resources registered (runtime only) - FLangResources: TDKLang_LangResources; - // Prop storage - FCodePage: Cardinal; - FDefaultLanguageID: LANGID; - FLanguageID: LANGID; - // Applies the specified translation to controllers and constants. Translations=nil means the default language to - // be applied - procedure ApplyTran(Translations: TDKLang_CompTranslations); - // Applies the specified translation to a single controller. Not a thread-safe method - procedure ApplyTranToController(Translations: TDKLang_CompTranslations; Controller: TDKLanguageController); - // Creates and returns the translations object, or nil if wLangID=DefaultLangID or creation failed. Not a - // thread-safe method - function GetTranslationsForLang(wLangID: LANGID): TDKLang_CompTranslations; - // Updates CodePage in order to match current LanguageID. Not a thread-safe method - procedure UpdateCodePage; - // Prop handlers - function GetConstantValue(const sName: String): WideString; - function GetConstantValueA(const sName: String): String; - function GetDefaultLanguageID: LANGID; - function GetLanguageCount: Integer; - function GetLanguageID: LANGID; - function GetLanguageIDs(Index: Integer): LANGID; - function GetLanguageIndex: Integer; - function GetLanguageNames(Index: Integer): WideString; - function GetLanguageResources(Index: Integer): PDKLang_LangResource; - procedure SetDefaultLanguageID(Value: LANGID); - procedure SetLanguageID(Value: LANGID); - procedure SetLanguageIndex(Value: Integer); - protected - // Internal language controller registration procedures (allowed at runtime only) - procedure AddLangController(Controller: TDKLanguageController); - procedure RemoveLangController(Controller: TDKLanguageController); - // Called by controllers when they are initialized and ready. Applies the currently selected language to the - // controller - procedure TranslateController(Controller: TDKLanguageController); - public - constructor Create; - destructor Destroy; override; - // Registers a translation file for specified language. Returns True if the file was a valid translation file with - // language specified. The file replaces any language resource for that language registered before. You can never - // replace the DefaultLanguage though - function RegisterLangFile(const wsFileName: WideString): Boolean; - // Register a resource as containing translation data for specified language. The resource replaces any language - // resource for that language registered before. You can never replace the DefaultLanguage though - procedure RegisterLangResource(Instance: HINST; const wsResourceName: WideString; wLangID: LANGID); overload; - procedure RegisterLangResource(Instance: HINST; iResID: Integer; wLangID: LANGID); overload; - // Removes language with the specified LangID from the registered language resources list. You cannot remove the - // DefaultLanguage - procedure UnregisterLangResource(wLangID: LANGID); - // Scans the specified directory for language files using given file mask. If bRecursive=True, also searches in the - // subdirectories of sDir. Returns the number of files successfully registered. Examples that scan the - // application directory for files with '.lng' extension: - // ScanForLangFiles(ExtractFileDir(ParamStr(0)), '*.lng', False); // ANSI version, not always correct - // ScanForLangFiles(WideExtractFileDir(WideParamStr(0)), '*.lng', False); // Unicode version, requires Tnt - // // Unicode Controls - function ScanForLangFiles(const wsDir, wsMask: WideString; bRecursive: Boolean): Integer; - // Returns the index of specified LangID, or -1 if not found - function IndexOfLanguageID(wLangID: LANGID): Integer; - // Props - // -- Code page corresponding to the current value of LanguageID - property CodePage: Cardinal read FCodePage; - // -- Constant values by name, Unicode version - property ConstantValue[const sName: String]: WideString read GetConstantValue; - // -- Constant values by name, ANSI version - property ConstantValueA[const sName: String]: String read GetConstantValueA; - // -- Constant values by name, Unicode version; the same as ConstantValue[] - property ConstantValueW[const sName: String]: WideString read GetConstantValue; - // -- Default language ID. The default value is US English ($409) - property DefaultLanguageID: LANGID read GetDefaultLanguageID write SetDefaultLanguageID; - // -- Current language ID. Initially equals to DefaultLanguageID. When being changed, affects all the registered - // language controllers as well as constants - property LanguageID: LANGID read GetLanguageID write SetLanguageID; - // -- Current language index - property LanguageIndex: Integer read GetLanguageIndex write SetLanguageIndex; - // -- Number of languages (language resources) registered, including the default language - property LanguageCount: Integer read GetLanguageCount; - // -- LangIDs of languages (language resources) registered, index ranged 0 to LanguageCount-1 - property LanguageIDs[Index: Integer]: LANGID read GetLanguageIDs; - // -- Names of languages (language resources) registered, index ranged 0 to LanguageCount-1, Unicode version only - property LanguageNames[Index: Integer]: WideString read GetLanguageNames; - // -- Language resources registered, index ranged 0 to LanguageCount-1. Always nil for Index=0, ie. for default - // language - property LanguageResources[Index: Integer]: PDKLang_LangResource read GetLanguageResources; - end; - - // Returns the global language manager instance (allowed at runtime only) - function LangManager: TDKLanguageManager; - - // Encoding/decoding of control characters in backslashed (escaped) form (CRLF -> \n, TAB -> \t, \ -> \\ etc) - function EncodeControlChars(const ws: WideString): WideString; // Raw string -> Escaped string - function DecodeControlChars(const ws: WideString): WideString; // Escaped string -> Raw string - // Finds and updates the corresponding section in Strings (which appear as language source file). If no appropriate - // section found, appends the lines to the end of Strings - procedure UpdateLangSourceStrings(Strings: TWideStrings; LSObject: IDKLang_LanguageSourceObject; StateFilter: TDKLang_TranslationStates); - // The same as UpdateLangSourceStrings() but operates directly on a language source file. If no such file, a new file - // is created - procedure UpdateLangSourceFile(const wsFileName: WideString; LSObject: IDKLang_LanguageSourceObject; StateFilter: TDKLang_TranslationStates); - // Raises exception EDKLangError - procedure DKLangError(const sMsg: String); overload; - procedure DKLangError(const sMsg: String; const aParams: Array of const); overload; - - // Shortcut to LangManager.ConstantValueW[] - function DKLangConstW(const sName: String): WideString; overload; - // The same, but formats constant value using aParams - function DKLangConstW(const sName: String; const aParams: Array of const): WideString; overload; - // Shortcut to LangManager.ConstantValueA[] - function DKLangConstA(const sName: String): String; overload; - // The same, but formats constant value using aParams - function DKLangConstA(const sName: String; const aParams: Array of const): String; overload; - -const - // Version used for saving binary data into streams - IDKLang_StreamVersion = 2; - - // Resource name for constant entries in the .res file and executable resources - SDKLang_ConstResourceName = 'DKLANG_CONSTS'; - - // Section name for constant entries in the language source or translation files - SDKLang_ConstSectionName = '$CONSTANTS'; - - // Component translations parameter names - SDKLang_TranParam_LangID = 'LANGID'; - SDKLang_TranParam_SourceLangID = 'SourceLANGID'; - SDKLang_TranParam_Author = 'Author'; - SDKLang_TranParam_Generator = 'Generator'; - SDKLang_TranParam_LastModified = 'LastModified'; - SDKLang_TranParam_TargetApplication = 'TargetApplication'; - - // Default language source file extension - SDKLang_LangSourceExtension = 'dklang'; - - ILangID_USEnglish = $0409; - -var - // Set to True by DKLang expert to indicate the design time execution - IsDesignTime: Boolean = False; - -resourcestring - SDKLangErrMsg_DuplicatePropValueID = 'Duplicate property value translation ID (%d)'; - SDKLangErrMsg_ErrorLoadingTran = 'Loading translations failed.'#13#10'Line %d: %s'; - SDKLangErrMsg_InvalidConstName = 'Invalid constant name ("%s")'; - SDKLangErrMsg_DuplicateConstName = 'Duplicate constant name ("%s")'; - SDKLangErrMsg_ConstantNotFound = 'Constant "%s" not found'; - SDKLangErrMsg_LangManagerCalledAtDT = 'Call to LangManager() is allowed at runtime only'; - SDKLangErrMsg_StreamVersionTooHigh = 'Stream version (%d) is greater than the current one (%d)'; - -implementation -uses TypInfo, Math, TntSysUtils, TntSystem; - -var - _LangManager: TDKLanguageManager = nil; - - function LangManager: TDKLanguageManager; - begin - // Check that it's a runtime call - if IsDesignTime then DKLangError(SDKLangErrMsg_LangManagerCalledAtDT); - // Create _LangManager if needed - if _LangManager=nil then _LangManager := TDKLanguageManager.Create; - Result := _LangManager; - end; - - function EncodeControlChars(const ws: WideString): WideString; - var - i, iLen: Integer; - wc: WideChar; - begin - Result := ''; - iLen := Length(ws); - i := 1; - while i<=iLen do begin - wc := ws[i]; - case wc of - // Tab character - #9: Result := Result+'\t'; - // Linefeed character. Skip subsequent Carriage Return char, if any - #10: begin - Result := Result+'\n'; - if (i=0 then begin - // Remove all the lines up to the next section - repeat Strings.Delete(idx) until (idx=Strings.Count) or (Copy(Strings[idx], 1, 1)='['); - // Insert language source lines into Strings - for i := 0 to SLLangSrc.Count-1 do begin - Strings.Insert(idx, SLLangSrc[i]); - Inc(idx); - end; - // Else simply append the language source - end else - Strings.AddStrings(SLLangSrc); - finally - Strings.EndUpdate; - end; - finally - SLLangSrc.Free; - end; - end; - - procedure UpdateLangSourceFile(const wsFileName: WideString; LSObject: IDKLang_LanguageSourceObject; StateFilter: TDKLang_TranslationStates); - var SLLangSrc: TTntStringList; - begin - SLLangSrc := TTntStringList.Create; - try - // Load language file source, if any - if WideFileExists(wsFileName) then SLLangSrc.LoadFromFile(wsFileName); - // Store the data - UpdateLangSourceStrings(SLLangSrc, LSObject, StateFilter); - // Save the language source back into file - SLLangSrc.SaveToFile(wsFileName); - finally - SLLangSrc.Free; - end; - end; - - procedure DKLangError(const sMsg: String); overload; - - function RetAddr: Pointer; - asm - mov eax, [ebp+4] - end; - - begin - raise EDKLangError.Create(sMsg) at RetAddr; - end; - - procedure DKLangError(const sMsg: String; const aParams: Array of const); overload; - - function RetAddr: Pointer; - asm - mov eax, [ebp+4] - end; - - begin - raise EDKLangError.CreateFmt(sMsg, aParams) at RetAddr; - end; - - function DKLangConstW(const sName: String): WideString; - begin - Result := LangManager.ConstantValueW[sName]; - end; - - function DKLangConstW(const sName: String; const aParams: Array of const): WideString; - begin - Result := WideFormat(DKLangConstW(sName), aParams); - end; - - function DKLangConstA(const sName: String): String; - begin - Result := LangManager.ConstantValueA[sName]; - end; - - function DKLangConstA(const sName: String; const aParams: Array of const): String; - begin - Result := Format(DKLangConstA(sName), aParams); - end; - - //=================================================================================================================== - // Stream I/O - //=================================================================================================================== - // Writing - - procedure StreamWriteByte(Stream: TStream; b: Byte); - begin - Stream.WriteBuffer(b, 1); - end; - - procedure StreamWriteWord(Stream: TStream; w: Word); - begin - Stream.WriteBuffer(w, 2); - end; - - procedure StreamWriteInt(Stream: TStream; i: Integer); - begin - Stream.WriteBuffer(i, 4); - end; - - procedure StreamWriteBool(Stream: TStream; b: Boolean); - begin - Stream.WriteBuffer(b, 1); - end; - - procedure StreamWriteStr(Stream: TStream; const s: string); - var w: Word; - begin - w := Length(s); - Stream.WriteBuffer(w, 2); - Stream.WriteBuffer(s[1], w); - end; - - procedure StreamWriteWideStr(Stream: TStream; const ws: WideString); - var w: Word; - begin - w := Length(ws); - Stream.WriteBuffer(w, 2); - Stream.WriteBuffer(ws[1], w*2); - end; - - procedure StreamWriteLine(Stream: TStream; const ws: WideString); overload; - var wsLn: WideString; - begin - wsLn := ws+#13#10; - Stream.WriteBuffer(wsLn[1], Length(wsLn)*2); - end; - - procedure StreamWriteLine(Stream: TStream; const s: String); overload; - var sLn: String; - begin - sLn := s+#13#10; - Stream.WriteBuffer(sLn[1], Length(sLn)); - end; - - procedure StreamWriteLine(Stream: TStream; const ws: WideString; const aParams: Array of const); overload; - begin - StreamWriteLine(Stream, WideFormat(ws, aParams)); - end; - - // Writes stream version number - procedure StreamWriteStreamVersion(Stream: TStream); - begin - StreamWriteByte(Stream, IDKLang_StreamVersion); - end; - - //=================================================================================================================== - // Reading - - function StreamReadByte(Stream: TStream): Byte; - begin - Stream.ReadBuffer(Result, 1); - end; - - function StreamReadWord(Stream: TStream): Word; - begin - Stream.ReadBuffer(Result, 2); - end; - - function StreamReadInt(Stream: TStream): Integer; - begin - Stream.ReadBuffer(Result, 4); - end; - - function StreamReadBool(Stream: TStream): Boolean; - begin - Stream.ReadBuffer(Result, 1); - end; - - function StreamReadStr(Stream: TStream): string; - var w: Word; - begin - w := StreamReadWord(Stream); - SetLength(Result, w); - Stream.ReadBuffer(Result[1], w); - end; - - function StreamReadWideStr(Stream: TStream): WideString; - var w: Word; - begin - w := StreamReadWord(Stream); - SetLength(Result, w); - Stream.ReadBuffer(Result[1], w*2); - end; - - //=================================================================================================================== - // TDKLang_MaskList - //=================================================================================================================== - - constructor TDKLang_MaskList.Create(MaskStrings: TStrings); - var i: Integer; - begin - inherited Create; - for i := 0 to MaskStrings.Count-1 do Add(TMask.Create(MaskStrings[i])); - end; - - function TDKLang_MaskList.GetItems(Index: Integer): TMask; - begin - Result := TMask(Get(Index)); - end; - - function TDKLang_MaskList.Matches(const s: String): Boolean; - var i: Integer; - begin - for i := 0 to Count-1 do - if Items[i].Matches(s) then begin - Result := True; - Exit; - end; - Result := False; - end; - - //=================================================================================================================== - // TDKLang_CompTranslation - //=================================================================================================================== - - function TDKLang_CompTranslation.Add(iID: Integer; const wsValue: WideString; TranStates: TDKLang_TranslationStates): Integer; - var p: PDKLang_PropValueTranslation; - begin - // Find insertion point and check ID uniqueness - if FindID(iID, Result) then DKLangError(SDKLangErrMsg_DuplicatePropValueID, [iID]); - // Create and insert a new entry - New(p); - Insert(Result, p); - // Initialize entry - p.iID := iID; - p.wsValue := wsValue; - p.TranStates := TranStates; - end; - - constructor TDKLang_CompTranslation.Create(const sComponentName: String); - begin - inherited Create; - FComponentName := sComponentName; - end; - - function TDKLang_CompTranslation.FindID(iID: Integer; out iIndex: Integer): Boolean; - var iL, iR, i, iItemID: Integer; - begin - // Since the list is sorted by ID, implement binary search here - Result := False; - iL := 0; - iR := Count-1; - while iL<=iR do begin - i := (iL+iR) shr 1; - iItemID := GetItems(i).iID; - if iItemIDnil then FParams.Clear; - if FConstants<>nil then FConstants.Clear; - end; - - constructor TDKLang_CompTranslations.Create; - begin - inherited Create; - FConstants := TDKLang_Constants.Create(GetLangIDCallback); - FParams := TTntStringList.Create; - end; - - destructor TDKLang_CompTranslations.Destroy; - begin - FreeAndNil(FParams); - FreeAndNil(FConstants); - inherited Destroy; - end; - - function TDKLang_CompTranslations.FindComponentName(const sComponentName: String): TDKLang_CompTranslation; - var idx: Integer; - begin - idx := IndexOfComponentName(sComponentName); - if idx<0 then Result := nil else Result := GetItems(idx); - end; - - function TDKLang_CompTranslations.GetItems(Index: Integer): TDKLang_CompTranslation; - begin - Result := Get(Index); - end; - - function TDKLang_CompTranslations.GetLangIDCallback: LANGID; - begin - Result := StrToIntDef(Params.Values[SDKLang_TranParam_LangID], ILangID_USEnglish); - end; - - function TDKLang_CompTranslations.IndexOfComponentName(const sComponentName: String): Integer; - begin - for Result := 0 to Count-1 do - if SameText(GetItems(Result).ComponentName, sComponentName) then Exit; - Result := -1; - end; - - procedure TDKLang_CompTranslations.Notify(Ptr: Pointer; Action: TListNotification); - begin - // Don't call inherited Notify() here as it does nothing - if Action=lnDeleted then TDKLang_CompTranslation(Ptr).Free; - end; - - procedure TDKLang_CompTranslations.Text_LoadFromFile(const wsFileName: WideString; bParamsOnly: Boolean); - var Stream: TStream; - begin - Stream := TTntFileStream.Create(wsFileName, fmOpenRead or fmShareDenyWrite); - try - Text_LoadFromStream(Stream, bParamsOnly); - finally - Stream.Free; - end; - end; - - procedure TDKLang_CompTranslations.Text_LoadFromResource(Instance: HINST; const wsResName: WideString; bParamsOnly: Boolean = False); - var Stream: TStream; - begin - Stream := TTntResourceStream.Create(Instance, wsResName, PWideChar(RT_RCDATA)); - try - Text_LoadFromStream(Stream, bParamsOnly); - finally - Stream.Free; - end; - end; - - procedure TDKLang_CompTranslations.Text_LoadFromResource(Instance: HINST; iResID: Integer; bParamsOnly: Boolean = False); - var Stream: TStream; - begin - Stream := TTntResourceStream.CreateFromID(Instance, iResID, PWideChar(RT_RCDATA)); - try - Text_LoadFromStream(Stream, bParamsOnly); - finally - Stream.Free; - end; - end; - - procedure TDKLang_CompTranslations.Text_LoadFromStream(Stream: TStream; bParamsOnly: Boolean = False); - var SL: TTntStringList; - - // Tries to split a line that is neither comment nor section into a name and a value and returns True if succeeded - function ParseValueLine(const wsLine: WideString; out sName: String; out wsValue: WideString): Boolean; - var iEqPos: Integer; - begin - Result := False; - iEqPos := Pos('=', wsLine); - if iEqPos=0 then Exit; - sName := Trim(Copy(wsLine, 1, iEqPos-1)); // Convert name to ANSI - wsValue := Trim(Copy(wsLine, iEqPos+1, MaxInt)); - if sName='' then Exit; - Result := True; - end; - - // Extracts and returns the language ID parameter value from the string list, or ILangID_USEnglish if failed - function RetrieveLangID(List: TTntStringList): LANGID; - var - i: Integer; - sName: String; - wsValue: WideString; - begin - Result := ILangID_USEnglish; - for i := 0 to List.Count-1 do - if ParseValueLine(List[i], sName, wsValue) and SameText(sName, SDKLang_TranParam_LangID) then begin - Result := StrToIntDef(wsValue, ILangID_USEnglish); - Break; - end; - end; - - // Loads List from Stream, either ANSI or Unicode - procedure LoadStreamIntoStringList(List: TTntStringList); - var - i64Pos: Int64; - cCodePage: Cardinal; - begin - // Remember the original stream position - i64Pos := Stream.Position; - // Determine whether this is an Unicode source (BEFORE any reading is done) - FIsStreamUnicode := AutoDetectCharacterSet(Stream)=csUnicode; - Stream.Position := i64Pos; - // Load the stream contents into the list - List.LoadFromStream(Stream); - // If this is an ANSI stream - if not FIsStreamUnicode then begin - // Get code page corresponding to the language from the loaded translations - cCodePage := LCIDToCodePage(RetrieveLangID(List)); - // Reload the list using this correct code page - Stream.Position := i64Pos; - List.AnsiStrings.LoadFromStreamEx(Stream, cCodePage); - end; - end; - - // Processes the string list, line by line - procedure ProcessStringList(List: TTntStringList); - type - // A translation part (within the Stream) - TTranslationPart = ( - tpParam, // A sectionless (parameter) part - tpConstant, // A constant part - tpComponent); // A component part - var - i: Integer; - wsLine: WideString; - CT: TDKLang_CompTranslation; - Part: TTranslationPart; - - // Parses strings starting with '[' and ending with ']' - procedure ProcessSectionLine(const wsSectionName: WideString); - begin - // If it's a constant section - if WideSameText(wsSectionName, SDKLang_ConstSectionName) then - Part := tpConstant - // Else assume this a component name - else begin - Part := tpComponent; - // Try to find the component among previously loaded - CT := FindComponentName(wsSectionName); - // If not found, create new - if CT=nil then begin - CT := TDKLang_CompTranslation.Create(wsSectionName); - Add(CT); - end; - end; - end; - - // Parses a value line and applies the value if succeeded - procedure ProcessValueLine(const wsLine: WideString); - var - sName: String; - wsValue: WideString; - iID: Integer; - begin - // Try to split the line to name and value - if ParseValueLine(wsLine, sName, wsValue) then - // Apply the parsed values - case Part of - tpParam: FParams.Values[sName] := wsValue; - tpConstant: FConstants.Add(sName, DecodeControlChars(wsValue), []); - tpComponent: - if CT<>nil then begin - iID := StrToIntDef(sName, 0); - if iID>0 then CT.Add(iID, DecodeControlChars(wsValue), []); - end; - end; - end; - - begin - Part := tpParam; // Initially we're dealing with the sectionless part - CT := nil; - for i := 0 to List.Count-1 do begin - try - wsLine := Trim(List[i]); - // Skip empty lines - if wsLine<>'' then - case wsLine[1] of - // A comment - ';': ; - // A section - '[': begin - if bParamsOnly then Break; - if (Length(wsLine)>2) and (wsLine[Length(wsLine)]=']') then ProcessSectionLine(Trim(Copy(wsLine, 2, Length(wsLine)-2))); - end; - // Probably an entry of form '=' - else ProcessValueLine(wsLine); - end; - except - on e: Exception do DKLangError(SDKLangErrMsg_ErrorLoadingTran, [i, e.Message]); - end; - end; - end; - - begin - // Clear all the lists - Clear; - // Load the stream contents into the string list - SL := TTntStringList.Create; - try - LoadStreamIntoStringList(SL); - // Parse the list line-by-line - ProcessStringList(SL); - finally - SL.Free; - end; - end; - - procedure TDKLang_CompTranslations.Text_SaveToFile(const wsFileName: WideString; bUnicode, bSkipUntranslated: Boolean); - var - Stream: TStream; - begin - Stream := TTntFileStream.Create(wsFileName, fmCreate); - try - Text_SaveToStream(Stream, bUnicode, bSkipUntranslated); - finally - Stream.Free; - end; - end; - - procedure TDKLang_CompTranslations.Text_SaveToStream(Stream: TStream; bUnicode, bSkipUntranslated: Boolean); - var cCodePage: Cardinal; - - procedure DoWriteLine(const ws: WideString); overload; - begin - if bUnicode then StreamWriteLine(Stream, ws) else StreamWriteLine(Stream, WideStringToStringEx(ws, cCodePage)); - end; - - procedure DoWriteLine(const ws: WideString; const aParams: Array of const); overload; - begin - DoWriteLine(WideFormat(ws, aParams)); - end; - - procedure WriteParams; - var i: Integer; - begin - for i := 0 to FParams.Count-1 do DoWriteLine(FParams[i]); - // Insert an empty line - if FParams.Count>0 then DoWriteLine(''); - end; - - procedure WriteComponents; - var - iComp, iEntry: Integer; - CT: TDKLang_CompTranslation; - begin - for iComp := 0 to Count-1 do begin - CT := GetItems(iComp); - // Write component's name - DoWriteLine('[%s]', [CT.ComponentName]); - // Write translated values in the form 'ID=Value' - for iEntry := 0 to CT.Count-1 do - with CT[iEntry]^ do - if not bSkipUntranslated or not (dktsUntranslated in TranStates) then - DoWriteLine('%.8d=%s', [iID, EncodeControlChars(wsValue)]); - // Insert an empty line - DoWriteLine(''); - end; - end; - - procedure WriteConstants; - var i: Integer; - begin - // Write constant section name - DoWriteLine('[%s]', [SDKLang_ConstSectionName]); - // Write constant in the form 'Name=Value' - for i := 0 to FConstants.Count-1 do - with FConstants[i]^ do - if not bSkipUntranslated or not (dktsUntranslated in TranStates) then - DoWriteLine('%s=%s', [sName, EncodeControlChars(wsValue)]); - end; - - begin - cCodePage := LCIDToCodePage(GetLangIDCallback); - // If Unicode saving - mark the stream as Unicode - if bUnicode then StreamWriteWord(Stream, Word(UNICODE_BOM)); - WriteParams; - WriteComponents; - WriteConstants; - end; - - //=================================================================================================================== - // TDKLang_PropEntries - //=================================================================================================================== - - function TDKLang_PropEntries.Add(iID: Integer; const sPropName: String; const wsDefLangValue: WideString): Boolean; - var - p: PDKLang_PropEntry; - idx: Integer; - begin - // Try to find the property by its name - Result := not FindPropName(sPropName, idx); - // If not found, create and insert a new entry - if Result then begin - New(p); - Insert(idx, p); - p.iID := iID; - p.sPropName := sPropName; - end else - p := GetItems(idx); - // Assign entry value - p.wsDefLangValue := wsDefLangValue; - // Validate the entry - p.bValidated := True; - end; - - procedure TDKLang_PropEntries.DeleteInvalidEntries; - var i: Integer; - begin - for i := Count-1 downto 0 do - if not GetItems(i).bValidated then Delete(i); - end; - - function TDKLang_PropEntries.FindPropByName(const sPropName: String): PDKLang_PropEntry; - var idx: Integer; - begin - if FindPropName(sPropName, idx) then Result := GetItems(idx) else Result := nil; - end; - - function TDKLang_PropEntries.FindPropName(const sPropName: String; out iIndex: Integer): Boolean; - var iL, iR, i: Integer; - begin - // Since the list is sorted by property name, implement binary search here - Result := False; - iL := 0; - iR := Count-1; - while iL<=iR do begin - i := (iL+iR) shr 1; - // Don't use AnsiCompareText() here as property names are allowed to consist of alphanumeric chars and '_' only - case CompareText(GetItems(i).sPropName, sPropName) of - Low(Integer)..-1: iL := i+1; - 0: begin - Result := True; - iL := i; - Break; - end; - else iR := i-1; - end; - end; - iIndex := iL; - end; - - function TDKLang_PropEntries.GetItems(Index: Integer): PDKLang_PropEntry; - begin - Result := Get(Index); - end; - - function TDKLang_PropEntries.GetMaxID: Integer; - var i: Integer; - begin - Result := 0; - for i := 0 to Count-1 do Result := Max(Result, GetItems(i).iID); - end; - - function TDKLang_PropEntries.IndexOfID(iID: Integer): Integer; - begin - for Result := 0 to Count-1 do - if GetItems(Result).iID=iID then Exit; - Result := -1; - end; - - function TDKLang_PropEntries.IndexOfPropName(const sPropName: String): Integer; - begin - if not FindPropName(sPropName, Result) then Result := -1; - end; - - procedure TDKLang_PropEntries.Invalidate; - var i: Integer; - begin - for i := 0 to Count-1 do GetItems(i).bValidated := False; - end; - - procedure TDKLang_PropEntries.LoadFromDFMResource(Stream: TStream); - var - i, iID: Integer; - sName: String; - begin - Clear; - for i := 0 to StreamReadInt(Stream)-1 do begin - iID := StreamReadInt(Stream); - sName := StreamReadStr(Stream); - Add(iID, sName, ''); - end; - end; - - procedure TDKLang_PropEntries.Notify(Ptr: Pointer; Action: TListNotification); - begin - // Don't call inherited Notify() here as it does nothing - if Action=lnDeleted then Dispose(PDKLang_PropEntry(Ptr)); - end; - - procedure TDKLang_PropEntries.SaveToDFMResource(Stream: TStream); - var - i: Integer; - p: PDKLang_PropEntry; - begin - StreamWriteInt(Stream, Count); - for i := 0 to Count-1 do begin - p := GetItems(i); - StreamWriteInt(Stream, p.iID); - StreamWriteStr(Stream, p.sPropName); - end; - end; - - //=================================================================================================================== - // TDKLang_CompEntry - //=================================================================================================================== - - procedure TDKLang_CompEntry.ApplyTranslation(Translation: TDKLang_CompTranslation; cCodePage: Cardinal); - - // Applies translations to component's properties - procedure TranslateProps; - - // Returns translation of a property value in wsTranslation and True if it is present in PropEntries - function GetTranslationUnicode(const sPropName: String; out wsTranslation: WideString): Boolean; - var - PE: PDKLang_PropEntry; - idxTran: Integer; - begin - // Try to locate prop translation entry - PE := FPropEntries.FindPropByName(sPropName); - Result := PE<>nil; - if Result then begin - wsTranslation := PE.wsDefLangValue; - // If actual translation is supplied - if Translation<>nil then begin - // Try to find the appropriate translation by property entry ID - idxTran := Translation.IndexOfID(PE.iID); - if idxTran>=0 then wsTranslation := Translation[idxTran].wsValue; - end; - end else - wsTranslation := ''; - end; - - // The same but return translation in ANSI encoding - function GetTranslationAnsi(const sPropName: String; out sTranslation: String): Boolean; - var ws: WideString; - begin - Result := GetTranslationUnicode(sPropName, ws); - sTranslation := WideStringToStringEx(ws, cCodePage); - end; - - procedure ProcessObject(const sPrefix: String; Instance: TObject); forward; - - // Processes the specified property and adds it to PropEntries if it appears suitable - procedure ProcessProp(const sPrefix: String; Instance: TObject; pInfo: PPropInfo); - const asSep: Array[Boolean] of String[1] = ('', '.'); - var - i: Integer; - o: TObject; - sFullName, sTranslation: String; - wsTranslation: WideString; - begin - // Test whether property is to be ignored (don't use IgnoreTest interface here) - if ((Instance is TComponent) and (pInfo.Name='Name')) or not (pInfo.PropType^.Kind in [tkClass, tkString, tkLString, tkWString]) then Exit; - sFullName := sPrefix+asSep[sPrefix<>'']+pInfo.Name; - // Assign the new [translated] value to the property - case pInfo.PropType^.Kind of - tkClass: - if Assigned(pInfo.GetProc) and Assigned(pInfo.SetProc) then begin - o := GetObjectProp(Instance, pInfo); - if o<>nil then - // TWideStrings property - if o is TWideStrings then begin - if GetTranslationUnicode(sFullName, wsTranslation) then TWideStrings(o).Text := wsTranslation; - // TStrings property - end else if o is TStrings then begin - if GetTranslationAnsi(sFullName, sTranslation) then TStrings(o).Text := sTranslation; - // TCollection property - end else if o is TCollection then - for i := 0 to TCollection(o).Count-1 do ProcessObject(sFullName+Format('[%d]', [i]), TCollection(o).Items[i]) - // TPersistent property. Avoid processing TComponent references which may lead to a circular loop - else if (o is TPersistent) and not (o is TComponent) then - ProcessObject(sFullName, o); - end; - tkString, - tkLString: if GetTranslationAnsi(sFullName, sTranslation) then SetStrProp(Instance, pInfo, sTranslation); - tkWString: if GetTranslationUnicode(sFullName, wsTranslation) then SetWideStrProp(Instance, pInfo, wsTranslation); - end; - end; - - // Iterates through Instance's properties and add them to PropEntries. sPrefix is the object name prefix part - procedure ProcessObject(const sPrefix: String; Instance: TObject); - var - i, iPropCnt: Integer; - pList: PPropList; - begin - // Get property list - iPropCnt := GetPropList(Instance, pList); - // Iterate thru Instance's properties - if iPropCnt>0 then - try - for i := 0 to iPropCnt-1 do ProcessProp(sPrefix, Instance, pList^[i]); - finally - FreeMem(pList); - end; - end; - - begin - if FPropEntries<>nil then ProcessObject('', FComponent); - end; - - // Recursively applies translations to owned components - procedure TranslateComponents; - var i: Integer; - begin - if FOwnedCompEntries<>nil then - for i := 0 to FOwnedCompEntries.Count-1 do FOwnedCompEntries[i].ApplyTranslation(Translation, cCodePage); - end; - - begin - // Translate properties - TranslateProps; - // Translate owned components - TranslateComponents; - end; - - procedure TDKLang_CompEntry.BindComponents(CurComponent: TComponent); - var - i: Integer; - CE: TDKLang_CompEntry; - c: TComponent; - begin - FComponent := CurComponent; - if FComponent<>nil then begin - FName := ''; // Free the memory after the link is established - // Cycle thru component entries - if FOwnedCompEntries<>nil then begin - for i := FOwnedCompEntries.Count-1 downto 0 do begin - CE := FOwnedCompEntries[i]; - if CE.FName<>'' then begin - // Try to find the component - c := CurComponent.FindComponent(CE.FName); - // If not found, delete entry. Recursively call BindComponents() otherwise - if c=nil then FOwnedCompEntries.Delete(i) else CE.BindComponents(c); - end; - end; - // Destroy the list once it is empty - if FOwnedCompEntries.Count=0 then FreeAndNil(FOwnedCompEntries); - end; - end; - end; - - constructor TDKLang_CompEntry.Create(AOwner: TDKLang_CompEntry); - begin - inherited Create; - FOwner := AOwner; - end; - - destructor TDKLang_CompEntry.Destroy; - begin - FPropEntries.Free; - FOwnedCompEntries.Free; - inherited Destroy; - end; - - function TDKLang_CompEntry.GetComponentNamePath(bIncludeRoot: Boolean): String; - begin - if FOwner=nil then - if bIncludeRoot then Result := Name else Result := '' - else begin - Result := FOwner.ComponentNamePath[bIncludeRoot]; - if Result<>'' then Result := Result+'.'; - Result := Result+Name; - end; - end; - - function TDKLang_CompEntry.GetMaxPropEntryID: Integer; - var i: Integer; - begin - if FPropEntries=nil then Result := 0 else Result := FPropEntries.GetMaxID; - if FOwnedCompEntries<>nil then - for i := 0 to FOwnedCompEntries.Count-1 do Result := Max(Result, FOwnedCompEntries[i].GetMaxPropEntryID); - end; - - function TDKLang_CompEntry.GetName: String; - begin - if FComponent=nil then Result := FName else Result := FComponent.Name; - end; - - procedure TDKLang_CompEntry.InternalUpdateEntries(var iFreePropEntryID: Integer; bModifyList, bIgnoreEmptyProps, bIgnoreNonAlphaProps, bIgnoreFontProps: Boolean; IgnoreMasks, StoreMasks: TDKLang_MaskList); - var sCompPathPrefix: String; - - // Returns True if a property is to be stored according either to its streaming store-flag or to its matching to - // StoreMasks - function IsPropStored(Instance: TObject; pInfo: PPropInfo; const sPropFullName: String): Boolean; - begin - Result := IsStoredProp(Instance, pInfo) or StoreMasks.Matches(sPropFullName); - end; - - // Returns True if a property value is allowed to be stored - function IsPropValueStored(const sFullPropName: String; const wsPropVal: WideString): Boolean; - var i: Integer; - begin - // Check whether the property value contains localizable characters - if bIgnoreNonAlphaProps then begin - Result := False; - for i := 1 to Length(wsPropVal) do - case wsPropVal[i] of - 'A'..'Z', 'a'..'z', #161..High(WideChar): begin - Result := True; - Break; - end; - end; - // Check for emptiness (no need if bIgnoreNonAlphaProps was True) - end else if bIgnoreEmptyProps then - Result := wsPropVal<>'' - else - Result := True; - end; - - // Updates the PropEntry value (creates one if needed) - procedure UpdatePropValue(const sFullPropName: String; const wsPropVal: WideString); - var p: PDKLang_PropEntry; - begin - if IsPropValueStored(sFullPropName, wsPropVal) then - // If modifications are allowed - if bModifyList then begin - // Create PropEntries if needed - if FPropEntries=nil then FPropEntries := TDKLang_PropEntries.Create; - // If property is added (rather than replaced), increment the iFreePropEntryID counter; validate the entry - if FPropEntries.Add(iFreePropEntryID, sFullPropName, wsPropVal) then Inc(iFreePropEntryID); - // Otherwise only update the value, if any - end else if FPropEntries<>nil then begin - p := FPropEntries.FindPropByName(sFullPropName); - if p<>nil then p.wsDefLangValue := wsPropVal; - end; - end; - - // Updates property entries - procedure UpdateProps; - - procedure ProcessObject(const sPrefix: String; Instance: TObject); forward; - - // Processes the specified property and adds it to PropEntries if it appears suitable - procedure ProcessProp(const sPrefix: String; Instance: TObject; pInfo: PPropInfo); - const asSep: Array[Boolean] of String[1] = ('', '.'); - var - i: Integer; - o: TObject; - sPropInCompName, sPropFullName: String; - begin - sPropInCompName := sPrefix+asSep[sPrefix<>'']+pInfo.Name; - sPropFullName := sCompPathPrefix+sPropInCompName; - // Test whether property is to be ignored - if ((Instance is TComponent) and (pInfo.Name='Name')) or - not (pInfo.PropType^.Kind in [tkClass, tkString, tkLString, tkWString]) or - IgnoreMasks.Matches(sPropFullName) then Exit; - // Obtain and store property value - case pInfo.PropType^.Kind of - tkClass: - if Assigned(pInfo.GetProc) and Assigned(pInfo.SetProc) and IsPropStored(Instance, pInfo, sPropFullName) then begin - o := GetObjectProp(Instance, pInfo); - if o<>nil then - // TWideStrings property - if o is TWideStrings then - UpdatePropValue(sPropInCompName, TWideStrings(o).Text) - // TStrings property - else if o is TStrings then - UpdatePropValue(sPropInCompName, TStrings(o).Text) - // TCollection property - else if o is TCollection then - for i := 0 to TCollection(o).Count-1 do ProcessObject(sPropInCompName+Format('[%d]', [i]), TCollection(o).Items[i]) - // TPersistent property. Avoid processing TComponent references which may lead to a circular loop. Also - // filter TFont property values if needed (use name comparison instead of inheritance operator to - // eliminate dependency on Graphics unit) - else if (o is TPersistent) and not (o is TComponent) and (not bIgnoreFontProps or (o.ClassName<>'TFont')) then - ProcessObject(sPropInCompName, o); - end; - tkString, - tkLString: if IsPropStored(Instance, pInfo, sPropFullName) then UpdatePropValue(sPropInCompName, GetStrProp(Instance, pInfo)); - tkWString: if IsPropStored(Instance, pInfo, sPropFullName) then UpdatePropValue(sPropInCompName, GetWideStrProp(Instance, pInfo)); - end; - end; - - // Iterates through Instance's properties and add them to PropEntries. sPrefix is the object name prefix part - procedure ProcessObject(const sPrefix: String; Instance: TObject); - var - i, iPropCnt: Integer; - pList: PPropList; - begin - // Get property list - iPropCnt := GetPropList(Instance, pList); - // Iterate thru Instance's properties - if iPropCnt>0 then - try - for i := 0 to iPropCnt-1 do ProcessProp(sPrefix, Instance, pList^[i]); - finally - FreeMem(pList); - end; - end; - - begin - ProcessObject('', FComponent); - // Erase all properties not validated yet - if bModifyList and (FPropEntries<>nil) then begin - FPropEntries.DeleteInvalidEntries; - // If property list is empty, erase it - if FPropEntries.Count=0 then FreeAndNil(FPropEntries); - end; - end; - - // Synchronizes component list and updates each component's property entries - procedure UpdateComponents; - var - i: Integer; - c: TComponent; - CE: TDKLang_CompEntry; - begin - for i := 0 to FComponent.ComponentCount-1 do begin - c := FComponent.Components[i]; - if (c.Name<>'') and not (c is TDKLanguageController) then begin - // Try to find the corresponding component entry - if FOwnedCompEntries=nil then begin - if bModifyList then FOwnedCompEntries := TDKLang_CompEntries.Create(Self); - CE := nil; - end else - CE := FOwnedCompEntries.FindComponent(c); - // If not found, and modifications are allowed, create the new entry - if (CE=nil) and bModifyList then begin - CE := TDKLang_CompEntry.Create(Self); - CE.FComponent := c; - FOwnedCompEntries.Add(CE); - end; - // Update the component's property entries - if CE<>nil then CE.InternalUpdateEntries(iFreePropEntryID, bModifyList, bIgnoreEmptyProps, bIgnoreNonAlphaProps, bIgnoreFontProps, IgnoreMasks, StoreMasks); - end; - end; - end; - - begin - sCompPathPrefix := ComponentNamePath[False]+'.'; // Root prop names will start with '.' - // Update property entries - UpdateProps; - // Update component entries - UpdateComponents; - end; - - procedure TDKLang_CompEntry.InvalidateProps; - var i: Integer; - begin - if FPropEntries<>nil then FPropEntries.Invalidate; - if FOwnedCompEntries<>nil then - for i := 0 to FOwnedCompEntries.Count-1 do FOwnedCompEntries[i].InvalidateProps; - end; - - procedure TDKLang_CompEntry.LoadFromDFMResource(Stream: TStream); - begin - // Read component name - FName := StreamReadStr(Stream); - // Load props, if any - if StreamReadBool(Stream) then begin - if FPropEntries=nil then FPropEntries := TDKLang_PropEntries.Create; - FPropEntries.LoadFromDFMResource(Stream); - end; - // Load owned components, if any (read component existence flag) - if StreamReadBool(Stream) then begin - if FOwnedCompEntries=nil then FOwnedCompEntries := TDKLang_CompEntries.Create(Self); - FOwnedCompEntries.LoadFromDFMResource(Stream); - end; - end; - - procedure TDKLang_CompEntry.RemoveComponent(AComponent: TComponent; bRecursive: Boolean); - var i, idx: Integer; - begin - if FOwnedCompEntries<>nil then begin - // Try to find the component by reference - idx := FOwnedCompEntries.IndexOfComponent(AComponent); - // If found, delete it - if idx>=0 then begin - FOwnedCompEntries.Delete(idx); - // Destroy the list once it is empty - if FOwnedCompEntries.Count=0 then FreeAndNil(FOwnedCompEntries); - end; - // The same for owned entries - if bRecursive and (FOwnedCompEntries<>nil) then - for i := 0 to FOwnedCompEntries.Count-1 do FOwnedCompEntries[i].RemoveComponent(AComponent, True); - end; - end; - - procedure TDKLang_CompEntry.SaveToDFMResource(Stream: TStream); - begin - // Save component name - StreamWriteStr(Stream, Name); - // Store component properties - StreamWriteBool(Stream, FPropEntries<>nil); - if FPropEntries<>nil then FPropEntries.SaveToDFMResource(Stream); - // Store owned components - StreamWriteBool(Stream, FOwnedCompEntries<>nil); - if FOwnedCompEntries<>nil then FOwnedCompEntries.SaveToDFMResource(Stream); - end; - - procedure TDKLang_CompEntry.StoreLangSource(Strings: TWideStrings); - var - i: Integer; - PE: PDKLang_PropEntry; - sCompPath: String; - begin - // Store the properties - if FPropEntries<>nil then begin - // Find the component path, if any - sCompPath := ComponentNamePath[False]; - if sCompPath<>'' then sCompPath := sCompPath+'.'; - // Iterate through the property entries - for i := 0 to FPropEntries.Count-1 do begin - PE := FPropEntries[i]; - Strings.Add(WideFormat('%s%s=%.8d,%s', [sCompPath, PE.sPropName, PE.iID, EncodeControlChars(PE.wsDefLangValue)])); - end; - end; - // Recursively call the method for owned entries - if FOwnedCompEntries<>nil then - for i := 0 to FOwnedCompEntries.Count-1 do FOwnedCompEntries[i].StoreLangSource(Strings); - end; - - procedure TDKLang_CompEntry.UpdateEntries(bModifyList, bIgnoreEmptyProps, bIgnoreNonAlphaProps, bIgnoreFontProps: Boolean; IgnoreMasks, StoreMasks: TDKLang_MaskList); - var iFreePropEntryID: Integer; - begin - // If modifications allowed - if bModifyList then begin - // Invalidate all property entries - InvalidateProps; - // Compute next free property entry ID - iFreePropEntryID := GetMaxPropEntryID+1; - end else - iFreePropEntryID := 0; - // Call recursive update routine - InternalUpdateEntries(iFreePropEntryID, bModifyList, bIgnoreEmptyProps, bIgnoreNonAlphaProps, bIgnoreFontProps, IgnoreMasks, StoreMasks); - end; - - //=================================================================================================================== - // TDKLang_CompEntries - //=================================================================================================================== - - function TDKLang_CompEntries.Add(Item: TDKLang_CompEntry): Integer; - begin - Result := inherited Add(Item); - end; - - constructor TDKLang_CompEntries.Create(AOwner: TDKLang_CompEntry); - begin - inherited Create; - FOwner := AOwner; - end; - - function TDKLang_CompEntries.FindComponent(CompReference: TComponent): TDKLang_CompEntry; - var idx: Integer; - begin - idx := IndexOfComponent(CompReference); - if idx<0 then Result := nil else Result := GetItems(idx); - end; - - function TDKLang_CompEntries.GetItems(Index: Integer): TDKLang_CompEntry; - begin - Result := Get(Index); - end; - - function TDKLang_CompEntries.IndexOfCompName(const sCompName: String): Integer; - begin - for Result := 0 to Count-1 do - // Don't use AnsiSameText() here as component names are allowed to consist of alphanumeric chars and '_' only - if SameText(GetItems(Result).Name, sCompName) then Exit; - Result := -1; - end; - - function TDKLang_CompEntries.IndexOfComponent(CompReference: TComponent): Integer; - begin - for Result := 0 to Count-1 do - if GetItems(Result).Component=CompReference then Exit; - Result := -1; - end; - - procedure TDKLang_CompEntries.LoadFromDFMResource(Stream: TStream); - var - i: Integer; - CE: TDKLang_CompEntry; - begin - Clear; - for i := 0 to StreamReadInt(Stream)-1 do begin - CE := TDKLang_CompEntry.Create(FOwner); - Add(CE); - CE.LoadFromDFMResource(Stream); - end; - end; - - procedure TDKLang_CompEntries.Notify(Ptr: Pointer; Action: TListNotification); - begin - // Don't call inherited Notify() here as it does nothing - if Action=lnDeleted then TDKLang_CompEntry(Ptr).Free; - end; - - procedure TDKLang_CompEntries.SaveToDFMResource(Stream: TStream); - var i: Integer; - begin - StreamWriteInt(Stream, Count); - for i := 0 to Count-1 do GetItems(i).SaveToDFMResource(Stream); - end; - - //=================================================================================================================== - // TDKLang_Constants - //=================================================================================================================== - - function TDKLang_Constants.Add(const sName: String; const wsValue: WideString; TranStates: TDKLang_TranslationStates): Integer; - var p: PDKLang_Constant; - begin - if not IsValidIdent(sName) then DKLangError(SDKLangErrMsg_InvalidConstName, [sName]); - // Find insertion point and check name uniqueness - if FindName(sName, Result) then DKLangError(SDKLangErrMsg_DuplicateConstName, [sName]); - // Create and insert a new entry - New(p); - Insert(Result, p); - // Initialize entry - p.sName := sName; - p.wsValue := wsValue; - p.wsDefValue := wsValue; - p.TranStates := TranStates; - end; - - constructor TDKLang_Constants.Create(AGetLangIDCallback: TDKLang_GetLangIDCallback); - begin - inherited Create; - FAutoSaveLangSource := True; - FGetLangIDCallback := AGetLangIDCallback; - end; - - function TDKLang_Constants.FindConstName(const sName: String): PDKLang_Constant; - var idx: Integer; - begin - if FindName(sName, idx) then Result := GetItems(idx) else Result := nil; - end; - - function TDKLang_Constants.FindName(const sName: String; out iIndex: Integer): Boolean; - var iL, iR, i: Integer; - begin - // Since the list is sorted by constant name, implement binary search here - Result := False; - iL := 0; - iR := Count-1; - while iL<=iR do begin - i := (iL+iR) shr 1; - // Don't use AnsiCompareText()/WideCompareText() here as constant names are allowed to consist of alphanumeric - // chars and '_' only - case CompareText(GetItems(i).sName, sName) of - Low(Integer)..-1: iL := i+1; - 0: begin - Result := True; - iL := i; - Break; - end; - else iR := i-1; - end; - end; - iIndex := iL; - end; - - function TDKLang_Constants.GetAsRawString: String; - var Stream: TStringStream; - begin - Stream := TStringStream.Create(''); - try - SaveToStream(Stream); - Result := Stream.DataString; - finally - Stream.Free; - end; - end; - - function TDKLang_Constants.GetItems(Index: Integer): PDKLang_Constant; - begin - Result := Get(Index); - end; - - function TDKLang_Constants.GetItemsByName(const sName: String): PDKLang_Constant; - var idx: Integer; - begin - if not FindName(sName, idx) then DKLangError(SDKLangErrMsg_ConstantNotFound, [sName]); - Result := GetItems(idx); - end; - - function TDKLang_Constants.GetValues(const sName: String): WideString; - begin - Result := ItemsByName[sName].wsValue; - end; - - function TDKLang_Constants.IndexOfName(const sName: String): Integer; - begin - if not FindName(sName, Result) then Result := -1; - end; - - function TDKLang_Constants.LoadFromResource(Instance: HINST; const wsResName: WideString): Boolean; - var Stream: TStream; - begin - // Check resource existence - Result := FindResourceW(Instance, PWideChar(wsResName), PWideChar(RT_RCDATA))<>0; - // If succeeded, load the list from resource - if Result then begin - Stream := TTntResourceStream.Create(Instance, wsResName, PWideChar(RT_RCDATA)); - try - LoadFromStream(Stream); - finally - Stream.Free; - end; - end; - end; - - procedure TDKLang_Constants.LoadFromStream(Stream: TStream); - var b: Byte; - - // Implements loading from stream of version 1 - procedure Load_v1(bAutoSaveLangSource: Boolean); - var - i: Integer; - sName: String; - wsValue: WideString; - cCodePage: Cardinal; - begin - cCodePage := LCIDToCodePage(FGetLangIDCallback); - // AutoSaveLangSource is already read (while determining stream version) - FAutoSaveLangSource := bAutoSaveLangSource; - // Read item count, then read the constant names and values - for i := 0 to StreamReadInt(Stream)-1 do begin - sName := StreamReadStr(Stream); - wsValue := StringToWideStringEx(StreamReadStr(Stream), cCodePage); - Add(sName, wsValue, []); - end; - end; - - // Implements loading from stream of version 2 - procedure Load_v2; - var - i: Integer; - sName: String; - wsValue: WideString; - begin - // Read props - FAutoSaveLangSource := StreamReadBool(Stream); - // Read item count, then read the constant names and values - for i := 0 to StreamReadInt(Stream)-1 do begin - sName := StreamReadStr (Stream); - wsValue := StreamReadWideStr(Stream); - Add(sName, wsValue, []); - end; - end; - - begin - // Clear the list - Clear; - // Read the first byte of the stream - b := StreamReadByte(Stream); - case b of - // If it is 0 or 1, we're dealing with the very first version of the stream, and b is just boolean - // AutoSaveLangSource flag - 0, 1: Load_v1(b<>0); - 2: Load_v2; - else DKLangError(SDKLangErrMsg_StreamVersionTooHigh, [b, IDKLang_StreamVersion]); - end; - end; - - function TDKLang_Constants.LSO_CanStore: Boolean; - begin - Result := True; - end; - - function TDKLang_Constants.LSO_GetSectionName: WideString; - begin - // Constants always use the predefined section name - Result := SDKLang_ConstSectionName; - end; - - procedure TDKLang_Constants.LSO_StoreLangSource(Strings: TWideStrings; StateFilter: TDKLang_TranslationStates); - var i: Integer; - begin - for i := 0 to Count-1 do - with GetItems(i)^ do - if TranStates*StateFilter=[] then Strings.Add(sName+'='+EncodeControlChars(wsValue)); - end; - - procedure TDKLang_Constants.Notify(Ptr: Pointer; Action: TListNotification); - begin - // Don't call inherited Notify() here as it does nothing - if Action=lnDeleted then Dispose(PDKLang_Constant(Ptr)); - end; - - function TDKLang_Constants.QueryInterface(const IID: TGUID; out Obj): HResult; - begin - if GetInterface(IID, Obj) then Result := S_OK else Result := E_NOINTERFACE; - end; - - procedure TDKLang_Constants.SaveToStream(Stream: TStream); - var - i: Integer; - p: PDKLang_Constant; - begin - // Write the stream version - StreamWriteStreamVersion(Stream); - // Store props - StreamWriteBool(Stream, FAutoSaveLangSource); - // Store count - StreamWriteInt(Stream, Count); - // Store the constants - for i := 0 to Count-1 do begin - p := GetItems(i); - StreamWriteStr (Stream, p.sName); - StreamWriteWideStr(Stream, p.wsValue); - end; - end; - - procedure TDKLang_Constants.SetAsRawString(const Value: String); - var Stream: TStringStream; - begin - Stream := TStringStream.Create(Value); - try - LoadFromStream(Stream); - finally - Stream.Free; - end; - end; - - procedure TDKLang_Constants.SetValues(const sName: String; const wsValue: WideString); - begin - ItemsByName[sName].wsValue := wsValue; - end; - - procedure TDKLang_Constants.TranslateFrom(Constants: TDKLang_Constants); - var - i, idx: Integer; - pc: PDKLang_Constant; - begin - for i := 0 to Count-1 do begin - pc := GetItems(i); - // If Constants=nil this means reverting to defaults - if Constants=nil then pc.wsValue := pc.wsDefValue - // Else try to find the constant in Constants. Update the value if found - else if Constants.FindName(pc.sName, idx) then pc.wsValue := Constants[idx].wsValue; - end; - end; - - function TDKLang_Constants._AddRef: Integer; - begin - // No refcounting applicable - Result := -1; - end; - - function TDKLang_Constants._Release: Integer; - begin - // No refcounting applicable - Result := -1; - end; - - //=================================================================================================================== - // TDKLanguageController - //=================================================================================================================== - - constructor TDKLanguageController.Create(AOwner: TComponent); - begin - inherited Create(AOwner); - // Initialize IgnoreList - FIgnoreList := TStringList.Create; - TStringList(FIgnoreList).Duplicates := dupIgnore; - TStringList(FIgnoreList).Sorted := True; - // Initialize StoreList - FStoreList := TStringList.Create; - TStringList(FStoreList).Duplicates := dupIgnore; - TStringList(FStoreList).Sorted := True; - // Initialize other props - FRootCompEntry := TDKLang_CompEntry.Create(nil); - FOptions := DKLang_DefaultControllerOptions; - if not (csLoading in ComponentState) then FRootCompEntry.BindComponents(Owner); - if not (csDesigning in ComponentState) then LangManager.AddLangController(Self); - end; - - procedure TDKLanguageController.DefineProperties(Filer: TFiler); - - function DoStore: Boolean; - begin - Result := (FRootCompEntry.Component<>nil) and (FRootCompEntry.Component.Name<>''); - end; - - begin - inherited DefineProperties(Filer); - Filer.DefineBinaryProperty('LangData', LangData_Load, LangData_Store, DoStore); - end; - - destructor TDKLanguageController.Destroy; - begin - if not (csDesigning in ComponentState) then LangManager.RemoveLangController(Self); - FRootCompEntry.Free; - FIgnoreList.Free; - FStoreList.Free; - inherited Destroy; - end; - - procedure TDKLanguageController.DoLanguageChanged; - begin - if Assigned(FOnLanguageChanged) then FOnLanguageChanged(Self); - end; - - procedure TDKLanguageController.DoLanguageChanging; - begin - if Assigned(FOnLanguageChanging) then FOnLanguageChanging(Self); - end; - - function TDKLanguageController.GetActualSectionName: WideString; - begin - if FSectionName='' then Result := Owner.Name else Result := FSectionName; - end; - - procedure TDKLanguageController.LangData_Load(Stream: TStream); - begin - FRootCompEntry.LoadFromDFMResource(Stream); - end; - - procedure TDKLanguageController.LangData_Store(Stream: TStream); - begin - UpdateComponents(True); - FRootCompEntry.SaveToDFMResource(Stream); - end; - - procedure TDKLanguageController.Loaded; - begin - inherited Loaded; - // Bind the components and refresh the properties - if Owner<>nil then begin - FRootCompEntry.BindComponents(Owner); - UpdateComponents(False); - // If at runtime, apply the language currently selected in the LangManager, to the controller itself - if not (csDesigning in ComponentState) then LangManager.TranslateController(Self); - end; - end; - - function TDKLanguageController.LSO_CanStore: Boolean; - begin - Result := (Owner<>nil) and (Owner.Name<>''); - // Update the entries - if Result then UpdateComponents(True); - end; - - procedure TDKLanguageController.LSO_StoreLangSource(Strings: TWideStrings; StateFilter: TDKLang_TranslationStates); - begin - FRootCompEntry.StoreLangSource(Strings); // StateFilter is not applicable - end; - - procedure TDKLanguageController.Notification(AComponent: TComponent; Operation: TOperation); - begin - inherited Notification(AComponent, Operation); - // Instantly remove any component that might be contained within entries - if (Operation=opRemove) and (AComponent<>Self) then FRootCompEntry.RemoveComponent(AComponent, True); - end; - - procedure TDKLanguageController.SetIgnoreList(Value: TStrings); - begin - FIgnoreList.Assign(Value); - end; - - procedure TDKLanguageController.SetStoreList(Value: TStrings); - begin - FStoreList.Assign(Value); - end; - - procedure TDKLanguageController.UpdateComponents(bModifyList: Boolean); - var IgnoreMasks, StoreMasks: TDKLang_MaskList; - begin - // Create mask lists for testing property names - IgnoreMasks := TDKLang_MaskList.Create(FIgnoreList); - try - StoreMasks := TDKLang_MaskList.Create(FStoreList); - try - FRootCompEntry.UpdateEntries(bModifyList, dklcoIgnoreEmptyProps in FOptions, dklcoIgnoreNonAlphaProps in FOptions, dklcoIgnoreFontProps in FOptions, IgnoreMasks, StoreMasks); - finally - StoreMasks.Free; - end; - finally - IgnoreMasks.Free; - end; - end; - - //=================================================================================================================== - // TDKLang_LangResources - //=================================================================================================================== - - function TDKLang_LangResources.Add(Kind: TDKLang_LangResourceKind; Instance: HINST; const wsName: WideString; iResID: Integer; wLangID: LANGID): Integer; - var p: PDKLang_LangResource; - begin - // First try to find the same language already registered - Result := IndexOfLangID(wLangID); - // If not found, create new - if Result<0 then begin - New(p); - Result := inherited Add(p); - p.wLangID := wLangID; - // Else get the existing record - end else - p := GetItems(Result); - // Update the resource properties - p.Kind := Kind; - p.Instance := Instance; - p.wsName := wsName; - p.iResID := iResID; - end; - - function TDKLang_LangResources.FindLangID(wLangID: LANGID): PDKLang_LangResource; - var idx: Integer; - begin - idx := IndexOfLangID(wLangID); - if idx<0 then Result := nil else Result := GetItems(idx); - end; - - function TDKLang_LangResources.GetItems(Index: Integer): PDKLang_LangResource; - begin - Result := Get(Index); - end; - - function TDKLang_LangResources.IndexOfLangID(wLangID: LANGID): Integer; - begin - for Result := 0 to Count-1 do - if GetItems(Result).wLangID=wLangID then Exit; - Result := -1; - end; - - procedure TDKLang_LangResources.Notify(Ptr: Pointer; Action: TListNotification); - begin - // Don't call inherited Notify() here as it does nothing - if Action=lnDeleted then Dispose(PDKLang_LangResource(Ptr)); - end; - - //=================================================================================================================== - // TDKLanguageManager - //=================================================================================================================== - - procedure TDKLanguageManager.AddLangController(Controller: TDKLanguageController); - begin - FSynchronizer.BeginWrite; - try - FLangControllers.Add(Controller); - finally - FSynchronizer.EndWrite; - end; - end; - - procedure TDKLanguageManager.ApplyTran(Translations: TDKLang_CompTranslations); - var - i: Integer; - Consts: TDKLang_Constants; - begin - FSynchronizer.BeginRead; - try - // First apply the language to constants as they may be used in controllers' OnLanguageChanged event handlers - if Translations=nil then Consts := nil else Consts := Translations.Constants; - FConstants.TranslateFrom(Consts); - // Apply translation to the controllers - for i := 0 to FLangControllers.Count-1 do ApplyTranToController(Translations, FLangControllers[i]); - finally - FSynchronizer.EndRead; - end; - end; - - procedure TDKLanguageManager.ApplyTranToController(Translations: TDKLang_CompTranslations; Controller: TDKLanguageController); - var - CE: TDKLang_CompEntry; - CT: TDKLang_CompTranslation; - begin - Controller.DoLanguageChanging; - try - // Get the controller's root component entry - CE := Controller.RootCompEntry; - // If Translations supplied, try to find the translation for the entry - if Translations=nil then CT := nil else CT := Translations.FindComponentName(Controller.ActualSectionName); - // Finally apply the translation, either found or default - CE.ApplyTranslation(CT, CodePage); - finally - Controller.DoLanguageChanged; - end; - end; - - constructor TDKLanguageManager.Create; - begin - inherited Create; - FSynchronizer := TMultiReadExclusiveWriteSynchronizer.Create; - FConstants := TDKLang_Constants.Create(GetLanguageID); - FLangControllers := TList.Create; - FLangResources := TDKLang_LangResources.Create; - FDefaultLanguageID := ILangID_USEnglish; - FLanguageID := FDefaultLanguageID; - UpdateCodePage; - // Load the constants from the executable's resources - FConstants.LoadFromResource(HInstance, SDKLang_ConstResourceName); - // Load the default translations - ApplyTran(nil); - end; - - destructor TDKLanguageManager.Destroy; - begin - FConstants.Free; - FLangControllers.Free; - FLangResources.Free; - FSynchronizer.Free; - inherited Destroy; - end; - - function TDKLanguageManager.GetConstantValue(const sName: String): WideString; - begin - FSynchronizer.BeginRead; - try - Result := FConstants.Values[sName]; - finally - FSynchronizer.EndRead; - end; - end; - - function TDKLanguageManager.GetConstantValueA(const sName: String): String; - begin - Result := WideStringToStringEx(GetConstantValue(sName), CodePage); - end; - - function TDKLanguageManager.GetDefaultLanguageID: LANGID; - begin - FSynchronizer.BeginRead; - Result := FDefaultLanguageID; - FSynchronizer.EndRead; - end; - - function TDKLanguageManager.GetLanguageCount: Integer; - begin - FSynchronizer.BeginRead; - try - Result := FLangResources.Count+1; // Increment by 1 for the default language - finally - FSynchronizer.EndRead; - end; - end; - - function TDKLanguageManager.GetLanguageID: LANGID; - begin - FSynchronizer.BeginRead; - Result := FLanguageID; - FSynchronizer.EndRead; - end; - - function TDKLanguageManager.GetLanguageIDs(Index: Integer): LANGID; - begin - FSynchronizer.BeginRead; - try - // Index=0 always means the default language - if Index=0 then - Result := FDefaultLanguageID - else - Result := FLangResources[Index-1].wLangID; - finally - FSynchronizer.EndRead; - end; - end; - - function TDKLanguageManager.GetLanguageIndex: Integer; - begin - FSynchronizer.BeginRead; - try - Result := IndexOfLanguageID(FLanguageID); - finally - FSynchronizer.EndRead; - end; - end; - - function TDKLanguageManager.GetLanguageNames(Index: Integer): WideString; - var wLangID: LANGID; - begin - FSynchronizer.BeginRead; - try - wLangID := GetLanguageIDs(Index); - finally - FSynchronizer.EndRead; - end; - Result := WideGetLocaleStr(wLangID, LOCALE_SLANGUAGE, IntToStr(wLangID)); - end; - - function TDKLanguageManager.GetLanguageResources(Index: Integer): PDKLang_LangResource; - begin - FSynchronizer.BeginRead; - try - // Index=0 always means the default language - if Index=0 then Result := nil else Result := FLangResources[Index-1]; - finally - FSynchronizer.EndRead; - end; - end; - - function TDKLanguageManager.GetTranslationsForLang(wLangID: LANGID): TDKLang_CompTranslations; - var plr: PDKLang_LangResource; - begin - Result := nil; - if wLangID<>DefaultLanguageID then begin - // Try to locate the appropriate resource entry - plr := FLangResources.FindLangID(wLangID); - if plr<>nil then begin - Result := TDKLang_CompTranslations.Create; - try - case plr.Kind of - dklrkResName: Result.Text_LoadFromResource(plr.Instance, plr.wsName); - dklrkResID: Result.Text_LoadFromResource(plr.Instance, plr.iResID); - dklrkFile: Result.Text_LoadFromFile(plr.wsName); - end; - except - Result.Free; - raise; - end; - end; - end; - end; - - function TDKLanguageManager.IndexOfLanguageID(wLangID: LANGID): Integer; - begin - FSynchronizer.BeginRead; - try - if wLangID=FDefaultLanguageID then Result := 0 else Result := FLangResources.IndexOfLangID(wLangID)+1; - finally - FSynchronizer.EndRead; - end; - end; - - function TDKLanguageManager.RegisterLangFile(const wsFileName: WideString): Boolean; - var - Tran: TDKLang_CompTranslations; - wLangID: LANGID; - begin - Result := False; - FSynchronizer.BeginWrite; - try - // Create and load the component translations object - if WideFileExists(wsFileName) then begin - Tran := TDKLang_CompTranslations.Create; - try - Tran.Text_LoadFromFile(wsFileName, True); - // Try to obtain LangID parameter - wLangID := StrToIntDef(Tran.Params.Values[SDKLang_TranParam_LangID], 0); - // If succeeded, add the file as a resource - if wLangID>0 then begin - // But only if it isn't default language - if wLangID<>FDefaultLanguageID then FLangResources.Add(dklrkFile, 0, wsFileName, 0, wLangID); - Result := True; - end; - finally - Tran.Free; - end; - end; - finally - FSynchronizer.EndWrite; - end; - end; - - procedure TDKLanguageManager.RegisterLangResource(Instance: HINST; const wsResourceName: WideString; wLangID: LANGID); - begin - FSynchronizer.BeginWrite; - try - if wLangID<>FDefaultLanguageID then FLangResources.Add(dklrkResName, Instance, wsResourceName, 0, wLangID); - finally - FSynchronizer.EndWrite; - end; - end; - - procedure TDKLanguageManager.RegisterLangResource(Instance: HINST; iResID: Integer; wLangID: LANGID); - begin - FSynchronizer.BeginWrite; - try - if wLangID<>FDefaultLanguageID then FLangResources.Add(dklrkResID, Instance, '', iResID, wLangID); - finally - FSynchronizer.EndWrite; - end; - end; - - procedure TDKLanguageManager.RemoveLangController(Controller: TDKLanguageController); - begin - FSynchronizer.BeginWrite; - try - FLangControllers.Remove(Controller); - finally - FSynchronizer.EndWrite; - end; - end; - - function TDKLanguageManager.ScanForLangFiles(const wsDir, wsMask: WideString; bRecursive: Boolean): Integer; - var - wsPath: WideString; - SRec: TSearchRecW; - begin - Result := 0; - // Determine the path - wsPath := WideIncludeTrailingPathDelimiter(wsDir); - // Scan the directory - if WideFindFirst(wsPath+wsMask, faAnyFile, SRec)=0 then - try - repeat - // Plain file. Try to register it - if SRec.Attr and faDirectory=0 then begin - if RegisterLangFile(wsPath+SRec.Name) then Inc(Result); - // Directory. Recurse if needed - end else if bRecursive and (SRec.Name[1]<>'.') then - Inc(Result, ScanForLangFiles(wsPath+SRec.Name, wsMask, True)); - until WideFindNext(SRec)<>0; - finally - WideFindClose(SRec); - end; - end; - - procedure TDKLanguageManager.SetDefaultLanguageID(Value: LANGID); - begin - FSynchronizer.BeginWrite; - if FDefaultLanguageID<>Value then FDefaultLanguageID := Value; - FSynchronizer.EndWrite; - end; - - procedure TDKLanguageManager.SetLanguageID(Value: LANGID); - var - bChanged: Boolean; - Tran: TDKLang_CompTranslations; - begin - Tran := nil; - try - FSynchronizer.BeginWrite; - try - // Try to obtain the Translations object - Tran := GetTranslationsForLang(Value); - // If nil returned, assume this a default language - if Tran=nil then Value := FDefaultLanguageID; - // If something changed, update the property - bChanged := FLanguageID<>Value; - if bChanged then begin - FLanguageID := Value; - UpdateCodePage; - end; - finally - FSynchronizer.EndWrite; - end; - // Apply the language change after synchronizing ends because applying might require constants etc. - if bChanged then ApplyTran(Tran); - finally - Tran.Free; - end; - end; - - procedure TDKLanguageManager.SetLanguageIndex(Value: Integer); - begin - SetLanguageID(GetLanguageIDs(Value)); - end; - - procedure TDKLanguageManager.TranslateController(Controller: TDKLanguageController); - var Tran: TDKLang_CompTranslations; - begin - FSynchronizer.BeginRead; - try - // If current language is not default, the translation is required - if FLanguageID<>FDefaultLanguageID then begin - Tran := GetTranslationsForLang(FLanguageID); - try - if Tran<>nil then ApplyTranToController(Tran, Controller); - finally - Tran.Free; - end; - end; - finally - FSynchronizer.EndRead; - end; - end; - - procedure TDKLanguageManager.UnregisterLangResource(wLangID: LANGID); - var idx: Integer; - begin - FSynchronizer.BeginWrite; - try - if wLangID<>FDefaultLanguageID then begin - idx := FLangResources.IndexOfLangID(wLangID); - if idx>=0 then FLangResources.Delete(idx); - end; - finally - FSynchronizer.EndWrite; - end; - end; - - procedure TDKLanguageManager.UpdateCodePage; - begin - FCodePage := LCIDToCodePage(FLanguageID); - end; - -initialization -finalization - _LangManager.Free; -end. diff --git a/DKLangReg.dcr b/DKLangReg.dcr deleted file mode 100755 index 1ff9816..0000000 Binary files a/DKLangReg.dcr and /dev/null differ diff --git a/DKLangReg.pas b/DKLangReg.pas deleted file mode 100755 index 84ddcf3..0000000 --- a/DKLangReg.pas +++ /dev/null @@ -1,48 +0,0 @@ -///********************************************************************************************************************* -/// $Id: DKLangReg.pas,v 1.6 2006-06-17 04:19:28 dale Exp $ -///--------------------------------------------------------------------------------------------------------------------- -/// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org -///********************************************************************************************************************* -/// -/// The contents of this package are subject to the Mozilla Public License -/// Version 1.1 (the "License"); you may not use this file except in compliance -/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ -/// -/// Alternatively, you may redistribute this library, use and/or modify it under the -/// terms of the GNU Lesser General Public License as published by the Free Software -/// Foundation; either version 2.1 of the License, or (at your option) any later -/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ -/// -/// Software distributed under the License is distributed on an "AS IS" basis, -/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -/// specific language governing rights and limitations under the License. -/// -/// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ -/// -///********************************************************************************************************************** -// Component, expert and component editor registration routines -// -unit DKLangReg; - -interface - - procedure Register; - -implementation -{$R *.dcr} -uses SysUtils, Classes, DesignEditors, DesignIntf, ToolsAPI, DKLang, DKL_Expt; - - //==================================================================================================================== - // Component, Property and Editor registration - //==================================================================================================================== - - procedure Register; - begin - RegisterComponents('System', [TDKLanguageController]); - // Register expert - RegisterPackageWizard(DKLang_CreateExpert); - RegisterComponentEditor(TDKLanguageController, TDKLangControllerEditor); - end; - -end. diff --git a/DKLang_7.bpg b/DKLang_7.bpg deleted file mode 100644 index ff6b13d..0000000 --- a/DKLang_7.bpg +++ /dev/null @@ -1,48 +0,0 @@ -#------------------------------------------------------------------------------ -VERSION = BWS.01 -#------------------------------------------------------------------------------ -!ifndef ROOT -ROOT = $(MAKEDIR)\.. -!endif -#------------------------------------------------------------------------------ -MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** -DCC = $(ROOT)\bin\dcc32.exe $** -BRCC = $(ROOT)\bin\brcc32.exe $** -#------------------------------------------------------------------------------ -PROJECTS = dklang7.bpl dcldklang7.bpl DKLang_Ansi_Demo.exe DKLang_Constants_Demo.exe DKLang_Frames_Demo.exe \ - DKLang_MDI_Demo.exe DKLang_Notepad_Demo.exe DKLang_Resource_Demo.exe DKLang_Simple_Demo.exe DKLang_Converter_v2.exe -#------------------------------------------------------------------------------ -default: $(PROJECTS) -#------------------------------------------------------------------------------ - -dklang7.bpl: Packages\dklang7.dpk - $(DCC) - -dcldklang7.bpl: Packages\dcldklang7.dpk - $(DCC) - -DKLang_Constants_Demo.exe: Examples\Constants\DKLang_Constants_Demo.dpr - $(DCC) - -DKLang_Frames_Demo.exe: Examples\Frames\DKLang_Frames_Demo.dpr - $(DCC) - -DKLang_MDI_Demo.exe: Examples\MDI\DKLang_MDI_Demo.dpr - $(DCC) - -DKLang_Notepad_Demo.exe: Examples\Notepad\DKLang_Notepad_Demo.dpr - $(DCC) - -DKLang_Resource_Demo.exe: Examples\Resource\DKLang_Resource_Demo.dpr - $(DCC) - -DKLang_Simple_Demo.exe: Examples\Simple\DKLang_Simple_Demo.dpr - $(DCC) - -DKLang_Ansi_Demo.exe: Examples\Ansi\DKLang_Ansi_Demo.dpr - $(DCC) - -DKLang_Converter_v2.exe: Converter_v2\DKLang_Converter_v2.dpr - $(DCC) - - diff --git a/Examples/Ansi/DKLang_Ansi_Demo.cfg b/Examples/Ansi/DKLang_Ansi_Demo.cfg deleted file mode 100644 index 45f0861..0000000 --- a/Examples/Ansi/DKLang_Ansi_Demo.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Examples/Ansi/DKLang_Ansi_Demo.dklang b/Examples/Ansi/DKLang_Ansi_Demo.dklang deleted file mode 100644 index 2e1a8bb..0000000 --- a/Examples/Ansi/DKLang_Ansi_Demo.dklang +++ /dev/null @@ -1,5 +0,0 @@ -[fMain] -Caption=00000001,Sample Form -bCancel.Caption=00000003,Cancel -lSampleMessage.Caption=00000004,This is a sample message. - diff --git a/Examples/Ansi/DKLang_Ansi_Demo.dof b/Examples/Ansi/DKLang_Ansi_Demo.dof deleted file mode 100644 index c18dd98..0000000 --- a/Examples/Ansi/DKLang_Ansi_Demo.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOfficeXP;GR32_DSGN_D7;GR32_D7;tb2k_d7;tbx_d7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Examples/Ansi/DKLang_Ansi_Demo.res b/Examples/Ansi/DKLang_Ansi_Demo.res deleted file mode 100644 index 1228533..0000000 Binary files a/Examples/Ansi/DKLang_Ansi_Demo.res and /dev/null differ diff --git a/Examples/Constants/DKLang_Constants_Demo.cfg b/Examples/Constants/DKLang_Constants_Demo.cfg deleted file mode 100755 index 45f0861..0000000 --- a/Examples/Constants/DKLang_Constants_Demo.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Examples/Constants/DKLang_Constants_Demo.dklang b/Examples/Constants/DKLang_Constants_Demo.dklang deleted file mode 100644 index b56a8ed..0000000 --- a/Examples/Constants/DKLang_Constants_Demo.dklang +++ /dev/null @@ -1,9 +0,0 @@ -[fMain] -Caption=00000001,Sample Form -bTest.Caption=00000003,Test -lSampleMessage.Caption=00000004,This is a sample message. - -[$CONSTANTS] -SMessageCaption=Message -STestMessage=This is a test message! - diff --git a/Examples/Constants/DKLang_Constants_Demo.dof b/Examples/Constants/DKLang_Constants_Demo.dof deleted file mode 100755 index c18dd98..0000000 --- a/Examples/Constants/DKLang_Constants_Demo.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOfficeXP;GR32_DSGN_D7;GR32_D7;tb2k_d7;tbx_d7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Examples/Constants/DKLang_Constants_Demo.res b/Examples/Constants/DKLang_Constants_Demo.res deleted file mode 100644 index 1228533..0000000 Binary files a/Examples/Constants/DKLang_Constants_Demo.res and /dev/null differ diff --git a/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.deployproj b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.deployproj new file mode 100644 index 0000000..d0090cd --- /dev/null +++ b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.deployproj @@ -0,0 +1,64 @@ + + + + 12 + + + + + + + + DKLang_Constants_FMX_Desktop_Demo.app\Contents\Resources\ + DKLang_Constants_FMX_Desktop_Demo.icns + 1 + + + + + DKLang_Constants_FMX_Desktop_Demo.app\Contents\MacOS\ + libcgunwind.1.0.dylib + 1 + + + + + DKLang_Constants_FMX_Desktop_Demo.app\Contents\MacOS\ + DKLang_Constants_FMX_Desktop_Demo.rsm + 1 + + + + + DKLang_Constants_FMX_Desktop_Demo.app\Contents\ + Info.plist + 1 + + + + + DKLang_Constants_FMX_Desktop_Demo.app\Contents\ + Entitlements.plist + 1 + + + + + DKLang_Constants_FMX_Desktop_Demo.app\Contents\MacOS\ + DKLang_Constants_FMX_Desktop_Demo + 1 + + + True + + + + + DKLang_Constants_FMX_Desktop_Demo.app\ + libcgunwind.1.0.dylib + 1 + + + + + diff --git a/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dkl_const.res b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dkl_const.res new file mode 100644 index 0000000..4727169 Binary files /dev/null and b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dkl_const.res differ diff --git a/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dklang b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dklang new file mode 100644 index 0000000..089772f Binary files /dev/null and b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dklang differ diff --git a/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dpr b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dpr new file mode 100644 index 0000000..eb05b98 --- /dev/null +++ b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dpr @@ -0,0 +1,14 @@ +program DKLang_Constants_FMX_Desktop_Demo; + +uses + FMX.Forms, + Main in 'Main.pas' {fMain}; + +{$R *.res} +{$R *.dkl_const.res} + +begin + Application.Initialize; + Application.CreateForm(TfMain, fMain); + Application.Run; +end. diff --git a/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dproj b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dproj new file mode 100644 index 0000000..111c18e --- /dev/null +++ b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.dproj @@ -0,0 +1,497 @@ + + + {021669BA-1F16-48DE-9ED0-2CFF53A2366A} + 15.2 + FMX + DKLang_Constants_FMX_Desktop_Demo.dpr + True + Debug + OSX32 + 7 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + $(BDS)\bin\delphi_PROJECTICNS.icns + $(BDS)\bin\delphi_PROJECTICON.ico + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;FireDACPgDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;IndyIPServer;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;inetdbxpress;dklangXE5;FireDACASADriver;bindcompfmx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDACADSDriver;FireDAC;inet;fmxobj;FireDACMySQLDriver;fmxdae;RESTComponents;dbexpress;FireDACMSAccDriver;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities + true + + + $(BDS)\bin\default_app.manifest + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + IndyIPClient;JvGlobus;JvMM;tmsdXE5;JvManagedThreads;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;tmswizdXE5;inetdbbde;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;JvNet;BeejComponentsXE5;JvDotNetCtrls;DbxCommonDriver;tdbf;vclimg;dbxcds;gtAdvGridExpD17;MetropolisUILiveTile;JvXPCtrls;vcldb;vcldsnap;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;JvCore;vclribbon;dsnap;IndyIPServer;OmniThreadLibraryRuntimeXE5;fmxase;vcl;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;CodeSiteExpressPkg;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;FileStorageBDS_XE5;JclDeveloperTools;dklangXE5;FrameViewerXE5;JvDocking;adortl;JvWizards;madBasic_;gtRichVwExpD17;FireDACASADriver;JvHMI;bindcompfmx;JvBands;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;madDisAsm_;JvSystem;xmlrtl;svnui;JvTimeFramework;JvControls;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;tmsxlsdXE5;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;ADOX_XE5;FireDACADSDriver;vcltouch;RichViewSpellingHunspell_XE5;madExcept_;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;BeejTmsRvEditLinkXE5;vclx;svn;tmsexdXE5;CADSys5_XE5;fmxdae;RESTComponents;bdertl;VirtualTreesR;dbexpress;FireDACMSAccDriver;JvBDE;$(DCC_UsePackage) + true + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + $(BDS)\bin\default_app.manifest + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;IndySystem;TeeDB;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;tdbf;vclimg;dbxcds;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;BesenComponents;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;inetdbxpress;webdsnap;dklangXE5;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;Tee;vclFireDAC;xmlrtl;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;FireDACMySQLDriver;vclx;fmxdae;RESTComponents;VirtualTreesR;dbexpress;FireDACMSAccDriver;$(DCC_UsePackage) + true + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + +
fMain
+ fmx +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + DKLang_Constants_FMX_Desktop_Demo.dpr + + + + + + DKLang_Constants_FMX_Desktop_Demo.icns + + + + + + + + + Contents\MacOS\ + DKLang_Constants_FMX_Desktop_Demo.rsm + + + + + Info.plist + + + + + Entitlements.plist + + + + + + + + 1 + .dylib + + + 0 + .bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + library\lib\armeabi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xhdpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + Contents\Resources + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + library\lib\armeabi + 1 + + + 0 + + + Contents\MacOS + 1 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + Contents\MacOS + 0 + + + 0 + + + + + 1 + + + 1 + + + + + res\drawable-ldpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + 1 + + + + + + + + + + + True + True + True + + + 12 + + + + +
diff --git a/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.res b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/Examples/Constants_FireMonkey_Desktop/DKLang_Constants_FMX_Desktop_Demo.res differ diff --git a/Examples/Constants_FireMonkey_Desktop/German.lng b/Examples/Constants_FireMonkey_Desktop/German.lng new file mode 100644 index 0000000..45055ad --- /dev/null +++ b/Examples/Constants_FireMonkey_Desktop/German.lng @@ -0,0 +1,15 @@ +TargetApplication=DKLang_Constants_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1031 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-26 00:17:03 + +[fMain] +00000001=Beispielform +00000002=Das ist eine Beispielmitteilung. +00000003=Test + +[$CONSTANTS] +STestMessage=Oops, Sie betätigten die Testschaltfläche! +SMessageCaption=Info diff --git a/Examples/Constants_FireMonkey_Desktop/Main.fmx b/Examples/Constants_FireMonkey_Desktop/Main.fmx new file mode 100644 index 0000000..4845869 --- /dev/null +++ b/Examples/Constants_FireMonkey_Desktop/Main.fmx @@ -0,0 +1,91 @@ +object fMain: TfMain + Left = 0 + Top = 0 + Caption = 'Sample Form' + ClientHeight = 153 + ClientWidth = 339 + FormFactor.Width = 320 + FormFactor.Height = 480 + FormFactor.Devices = [dkDesktop, dkiPhone, dkiPad] + OnCreate = FormCreate + DesignerMobile = False + DesignerWidth = 0 + DesignerHeight = 0 + DesignerDeviceName = '' + DesignerOrientation = 0 + DesignerOSVersion = '' + object cbLanguage: TComboBox + DisableFocusEffect = False + Height = 22.000000000000000000 + Position.X = 16.000000000000000000 + Position.Y = 8.000000000000000000 + TabOrder = 0 + Width = 305.000000000000000000 + OnChange = cbLanguageChange + end + object lSampleMessage: TLabel + Height = 17.000000000000000000 + Position.X = 16.000000000000000000 + Position.Y = 48.000000000000000000 + Text = 'This is a sample message.' + Width = 305.000000000000000000 + end + object bTest: TButton + Height = 22.000000000000000000 + Position.X = 128.000000000000000000 + Position.Y = 96.000000000000000000 + TabOrder = 2 + Text = 'Test' + Width = 80.000000000000000000 + OnClick = bTestClick + end + object lcMain: TDKLanguageController + Left = 288 + Top = 80 + LangData = { + 0500664D61696E010100000001000000070043617074696F6E01040000000A00 + 63624C616E677561676500000E006C53616D706C654D65737361676501010000 + 0002000000040054657874000500625465737401010000000300000004005465 + 787400060074734D61696E0000} + end + object tsMain: TDKLTranslationsStorage + Left = 248 + Top = 80 + StoredTranslationFiles = { + 02000000560043003A005C005F00730076006E005F0073006F00750072006300 + 65005F006F00740068006500720073005C005F00730076006E005F0064006B00 + 6C0061006E0067005F0062006A006D005C004500780061006D0070006C006500 + 73005C0043006F006E007300740061006E00740073005F004600690072006500 + 4D006F006E006B00650079005F004400650073006B0074006F0070005C004700 + 650072006D0061006E002E006C006E006700130032003000310033002D003100 + 31002D00310039002000300036003A00310033003A00350035000B0031003000 + 3300310020004700650072006D0061006E006901000015010000789C4550CD4A + C34010BE07F20E2B78B465938A62610F319152FA77486E22654D26C940321B76 + A782EFD3B7F0E0A10FE42BB88D5AE7F6CD7C3FC3F7F5F15968DB0027C3D061A9 + 190DA96CB5D6D4EC53438E35B1DB67D09B30480EDC1AABB21ED9BE8B95260A83 + DC1C6C09EB64BB58662A92B35918FC83280C164060359F65A3A928AC26D78D39 + E2A9427F116FF1D433D7DAF1C6545823542A96F276221F26F19D90721EDDCFA5 + 370E83E77AA3915EC240FE4CA41E01DD80D0D5C6F69775AC32ED043A168004E2 + 8FE3FF66C0EE40CDF4429DA9021C8FDED7E96E9B17C9B6C87D407E5E6FC039DD + 80DA99C1DD881C41BC029F8E8C0D0389CAE333CB95ADEEB8EE4EC7B2852B2FFD + 95A57A18DB5C52EDCBFB060DEC74A0570043003A005C005F00730076006E005F + 0073006F0075007200630065005F006F00740068006500720073005C005F0073 + 0076006E005F0064006B006C0061006E0067005F0062006A006D005C00450078 + 0061006D0070006C00650073005C0043006F006E007300740061006E00740073 + 005F0046006900720065004D006F006E006B00650079005F004400650073006B + 0074006F0070005C005200750073007300690061006E002E006C006E00670013 + 0032003000310033002D00310031002D00310039002000300036003A00310033 + 003A00340037000C00310030003400390020005200750073007300690061006E + 00A701000050010000789C4D504F4B024114BF0FCC7798A063CAEE2A85C21C16 + 3724FCD361F71621838EB6A0B3B23B06DDD422880E76EC1CDD22D80A433415FC + 046F3E495FA1D92DA57997F7E7F7E7BDF95EAC3D1676B8B4FBFDAEDF64D20F04 + 752A55263A8D522022C9848C1A0EEF0518D903791184D4E9F932BC2215260446 + 6E30089BBC6AD7CB270E358D5C0EA35D912F6054E682874C26B4549478211351 + 37F521C72D5F4FC8A59535358D45B216B4FCB6CF5BD4328C7CC62864AC436218 + 45F3A8685A186174D6AE315F9C6364FC3E93C233ACD410BE20CEC05A27339D4E + D57087B028BCAA31ACC8FF29512358E9785377308525CCD424BB63E4283C69D0 + 488D53C7FDD269DDF5ECBAE76A5BD7E37A491E45ACC3293CC007C40704E610C3 + A7A68C3569A2EB77754FB46AD28C6101B304B1D4766B98AB6BB279D9EA6F167B + 5AF24FAEC4FAE9DFC3232CD5CDF628759B2C87D10FDC92BB91} + end +end diff --git a/Examples/Constants_FireMonkey_Desktop/Main.pas b/Examples/Constants_FireMonkey_Desktop/Main.pas new file mode 100644 index 0000000..8adba2d --- /dev/null +++ b/Examples/Constants_FireMonkey_Desktop/Main.pas @@ -0,0 +1,56 @@ +unit Main; + +interface + +uses + System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, + FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, + DKLang, FMX.ListBox, DKLangStorage; + +type + TfMain = class(TForm) + lcMain: TDKLanguageController; + cbLanguage: TComboBox; + lSampleMessage: TLabel; + bTest: TButton; + tsMain: TDKLTranslationsStorage; + procedure cbLanguageChange(Sender: TObject); + procedure bTestClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + fMain: TfMain; + +implementation + +{$R *.fmx} + +procedure TfMain.bTestClick(Sender: TObject); +begin + ShowMessage( + DKLangConstW('SMessageCaption') + ': ' + DKLangConstW('STestMessage')); +end; + +procedure TfMain.cbLanguageChange(Sender: TObject); +var iIndex: Integer; +begin + iIndex := cbLanguage.ItemIndex; + if iIndex<0 then iIndex := 0; // When there's no valid selection in cbLanguage we use the default language (Index=0) + LangManager.LanguageID := LangManager.LanguageIDs[iIndex]; +end; + +procedure TfMain.FormCreate(Sender: TObject); + var i: Integer; + begin + // Fill cbLanguage with available languages + for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNames[i]); + // Index=0 always means the default language + cbLanguage.ItemIndex := 0; + end; + +end. diff --git a/Examples/Constants_FireMonkey_Desktop/Russian.lng b/Examples/Constants_FireMonkey_Desktop/Russian.lng new file mode 100644 index 0000000..5bd07e4 --- /dev/null +++ b/Examples/Constants_FireMonkey_Desktop/Russian.lng @@ -0,0 +1,15 @@ +TargetApplication=DKLang_Constants_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1049 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-26 00:17:12 + +[fMain] +00000001=Форма-пример +00000002=Это пример сообщения. +00000003=Тест + +[$CONSTANTS] +STestMessage=Ага, кажется, вы нажали кнопку «Тест»! +SMessageCaption=Информация diff --git a/Examples/Constants_FireMonkey_Mobile/AndroidManifest.template.xml b/Examples/Constants_FireMonkey_Mobile/AndroidManifest.template.xml new file mode 100644 index 0000000..3dde458 --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/AndroidManifest.template.xml @@ -0,0 +1,35 @@ + + + + + + +<%uses-permission%> + + + + + + + + + + + + + + diff --git a/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.deployproj b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.deployproj new file mode 100644 index 0000000..6eb3a1a --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.deployproj @@ -0,0 +1,502 @@ + + + + 12 + + + + DKLang_Constants_FMX_Mobile_Demo\res\drawable-xhdpi\ + ic_launcher.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo\res\drawable-ldpi\ + ic_launcher.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo\library\lib\armeabi\ + gdbserver + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo\res\drawable-mdpi\ + ic_launcher.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo\ + AndroidManifest.xml + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo\classes\ + classes.dex + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo\res\drawable-xxhdpi\ + ic_launcher.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo\library\lib\armeabi\ + libDKLang_Constants_FMX_Mobile_Demo.so + 1 + + + True + + + DKLang_Constants_FMX_Mobile_Demo\res\drawable-hdpi\ + ic_launcher.png + 1 + + + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + $(PROJECTNAME).app.dSYM\Contents\Resources\DWARF\ + DKLang_Constants_FMX_Mobile_Demo + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Entitlements.plist + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + DKLang_Constants_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + ResourceRules.plist + 1 + + + + + + + + + DKLang_Constants_FMX_Mobile_Demo.app\Contents\MacOS\ + libcgunwind.1.0.dylib + 1 + + + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_57x57.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape@2x.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SettingIcon_58x58.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-568h@2x.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_114x114.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + DKLang_Constants_FMX_Mobile_Demo.rsm + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Entitlements.plist + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_100x100.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_144x144.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_50x50.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SettingIcon_29x29.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Portrait@2x.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + libcgunwind.1.0.dylib + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default@2x.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_72x72.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default~ipad.png + 1 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + DKLang_Constants_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Constants_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_29x29.png + 0 + + + + + DKLang_Constants_FMX_Mobile_Demo.app\ + Default-Landscape.png + 1 + + + + + diff --git a/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dkl_const.res b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dkl_const.res new file mode 100644 index 0000000..4727169 Binary files /dev/null and b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dkl_const.res differ diff --git a/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dklang b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dklang new file mode 100644 index 0000000..504e5f6 Binary files /dev/null and b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dklang differ diff --git a/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dpr b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dpr new file mode 100644 index 0000000..ec91aee --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dpr @@ -0,0 +1,15 @@ +program DKLang_Constants_FMX_Mobile_Demo; + +uses + System.StartUpCopy, + FMX.Forms, + Main in 'Main.pas' {fMain}; + +{$R *.res} +{$R *.dkl_const.res} + +begin + Application.Initialize; + Application.CreateForm(TfMain, fMain); + Application.Run; +end. diff --git a/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dproj b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dproj new file mode 100644 index 0000000..cb14209 --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.dproj @@ -0,0 +1,819 @@ + + + {55D89073-6CF5-4234-BFB9-9C82B59D1248} + 15.2 + FMX + DKLang_Constants_FMX_Mobile_Demo.dpr + True + Debug + iOSDevice + 88 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + true + true + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + true + true + true + true + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + IndyIPClient;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;BeejComponentsXE5;DbxCommonDriver;dbxcds;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;OmniThreadLibraryRuntimeXE5;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;FileStorageBDS_XE5;dklangXE5;FrameViewerXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;ADOX_XE5;RichViewSpellingHunspell_XE5;FireDAC;inet;BeejTmsRvEditLinkXE5;CADSys5_XE5;RESTComponents;dbexpress;$(DCC_UsePackage) + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar + Debug + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + Debug + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + true + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + + + $(BDS)\bin\default_app.manifest + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + IndyIPClient;JvGlobus;JvMM;tmsdXE5;JvManagedThreads;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;tmswizdXE5;inetdbbde;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;JvNet;BeejComponentsXE5;JvDotNetCtrls;DbxCommonDriver;tdbf;vclimg;dbxcds;gtAdvGridExpD17;MetropolisUILiveTile;JvXPCtrls;vcldb;vcldsnap;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;JvCore;vclribbon;dsnap;IndyIPServer;OmniThreadLibraryRuntimeXE5;fmxase;vcl;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;CodeSiteExpressPkg;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;FileStorageBDS_XE5;JclDeveloperTools;dklangXE5;FrameViewerXE5;JvDocking;adortl;JvWizards;madBasic_;gtRichVwExpD17;FireDACASADriver;JvHMI;bindcompfmx;JvBands;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;madDisAsm_;JvSystem;xmlrtl;svnui;JvTimeFramework;JvControls;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;tmsxlsdXE5;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;ADOX_XE5;FireDACADSDriver;vcltouch;RichViewSpellingHunspell_XE5;madExcept_;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;BeejTmsRvEditLinkXE5;vclx;svn;tmsexdXE5;CADSys5_XE5;fmxdae;RESTComponents;bdertl;VirtualTreesR;dbexpress;FireDACMSAccDriver;JvBDE;$(DCC_UsePackage) + true + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + +
fMain
+ fmx +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + DKLang_Constants_FMX_Mobile_Demo.dpr + + + + + + + + + + + + Default-Landscape@2x.png + + + + + Default.png + + + + + + + + DKLang_Constants_FMX_Mobile_Demo + + + + + + + + ic_launcher.png + + + + + + + + Default-Landscape@2x~ipad.png + + + + + + + + + + + Default-Portrait~ipad.png + + + + + ic_launcher.png + + + + + + + + + + + ic_launcher.png + + + + + + + + Default-568h@2x.png + + + + + Default-Landscape@2x~ipad.png + + + + + + + + + + + + + + Entitlements.plist + + + + + DKLang_Constants_FMX_Mobile_Demo.rsm + + + + + Entitlements.plist + + + + + Default-Portrait@2x~ipad.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default-Portrait@2x.png + + + + + + + + + + + classes.dex + + + + + Default-Portrait~ipad.png + + + + + + + + + + + + ic_launcher.png + + + + + Default@2x.png + + + + + Default-Portrait@2x~ipad.png + + + + + Info.plist + + + + + + + + + + + + + + + + + Default-Landscape~ipad.png + + + + + Info.plist + + + + + + + + ic_launcher.png + + + + + + + + Default-Landscape~ipad.png + + + + + Default-Portrait@2x~ipad.png + + + + + Default-Landscape~ipad.png + + + + + + + + Default-Landscape@2x~ipad.png + + + + + Default-Portrait~ipad.png + + + + + + + + Default~ipad.png + + + + + + + + + + + ResourceRules.plist + + + + + Default-Landscape.png + + + + + 1 + .dylib + + + 0 + .bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + library\lib\armeabi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xhdpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + Contents\Resources + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + library\lib\armeabi + 1 + + + 0 + + + Contents\MacOS + 1 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + Contents\MacOS + 0 + + + 0 + + + + + 1 + + + 1 + + + + + res\drawable-ldpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + 1 + + + + + + + + + + + True + True + True + False + + + 12 + + + + +
diff --git a/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.res b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/Examples/Constants_FireMonkey_Mobile/DKLang_Constants_FMX_Mobile_Demo.res differ diff --git a/Examples/Constants_FireMonkey_Mobile/German.lng b/Examples/Constants_FireMonkey_Mobile/German.lng new file mode 100644 index 0000000..45055ad --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/German.lng @@ -0,0 +1,15 @@ +TargetApplication=DKLang_Constants_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1031 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-26 00:17:03 + +[fMain] +00000001=Beispielform +00000002=Das ist eine Beispielmitteilung. +00000003=Test + +[$CONSTANTS] +STestMessage=Oops, Sie betätigten die Testschaltfläche! +SMessageCaption=Info diff --git a/Examples/Constants_FireMonkey_Mobile/Main.fmx b/Examples/Constants_FireMonkey_Mobile/Main.fmx new file mode 100644 index 0000000..5950b84 --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/Main.fmx @@ -0,0 +1,120 @@ +object fMain: TfMain + Left = 0 + Top = 0 + Caption = 'Form2' + ClientHeight = 460 + ClientWidth = 320 + FormFactor.Width = 320 + FormFactor.Height = 480 + FormFactor.Devices = [dkDesktop] + OnCreate = FormCreate + DesignerMobile = True + DesignerWidth = 320 + DesignerHeight = 480 + DesignerDeviceName = 'iPhone' + DesignerOrientation = 0 + DesignerOSVersion = '7' + object cbLanguage: TComboBox + Align = alTop + DisableFocusEffect = False + Height = 30.000000000000000000 + TabOrder = 0 + Width = 320.000000000000000000 + OnChange = cbLanguageChange + end + object lSampleMessage: TLabel + Height = 23.000000000000000000 + Position.X = 8.000000000000000000 + Position.Y = 64.000000000000000000 + Text = 'This is a sample message.' + Width = 361.000000000000000000 + Trimming = ttCharacter + end + object bTest: TButton + Height = 44.000000000000000000 + Position.X = 80.000000000000000000 + Position.Y = 128.000000000000000000 + TabOrder = 2 + Text = 'Test' + Trimming = ttCharacter + Width = 201.000000000000000000 + OnClick = bTestClick + end + object pMsg: TPanel + Align = alBottom + Height = 199.000000000000000000 + Position.Y = 261.000000000000000000 + Width = 320.000000000000000000 + TabOrder = 3 + object lMessageCaption: TLabel + Align = alTop + Height = 23.000000000000000000 + Text = 'test message caption' + Width = 320.000000000000000000 + Trimming = ttCharacter + end + object mMessage: TMemo + Touch.InteractiveGestures = [igPan, igLongTap, igDoubleTap] + Align = alClient + Height = 176.000000000000000000 + HitTest = False + TabOrder = 1 + Width = 320.000000000000000000 + Lines.Strings = ( + 'test message') + TextAlign = taCenter + end + end + object lcMain: TDKLanguageController + Left = 256 + Top = 392 + LangData = { + 0500664D61696E010100000001000000070043617074696F6E01070000000A00 + 63624C616E677561676500000E006C53616D706C654D65737361676501010000 + 0002000000040054657874000500625465737401010000000300000004005465 + 787400060074734D61696E00000400704D736700000F006C4D65737361676543 + 617074696F6E0101000000040000000400546578740008006D4D657373616765 + 01010000000500000005004C696E657300} + end + object tsMain: TDKLTranslationsStorage + ReleaseMemoryOnTranslationRegistration = True + Left = 184 + Top = 392 + StoredTranslationFiles = { + 02000000550043003A005C005F00730076006E005F0073006F00750072006300 + 65005F006F00740068006500720073005C005F00730076006E005F0064006B00 + 6C0061006E0067005F0062006A006D005C004500780061006D0070006C006500 + 73005C0043006F006E007300740061006E00740073005F004600690072006500 + 4D006F006E006B00650079005F004D006F00620069006C0065005C0047006500 + 72006D0061006E002E006C006E006700130032003000310033002D0031003200 + 2D00300036002000300039003A00350037003A00320030000B00310030003300 + 310020004700650072006D0061006E006901000015010000789C4550CD4AC340 + 10BE07F20E2B78B465938A62610F319152FA77486E22654D26C940321B76A782 + EFD3B7F0E0A10FE42BB88D5AE7F6CD7C3FC3F7F5F15968DB0027C3D061A9190D + A96CB5D6D4EC53438E35B1DB67D09B30480EDC1AABB21ED9BE8B95260A83DC1C + 6C09EB64BB58662A92B35918FC83280C164060359F65A3A928AC26D78D39E2A9 + 427F116FF1D433D7DAF1C6545823542A96F276221F26F19D90721EDDCFA5370E + 83E77AA3915EC240FE4CA41E01DD80D0D5C6F69775AC32ED043A168004E28FE3 + FF66C0EE40CDF4429DA9021C8FDED7E96E9B17C9B6C87D407E5E6FC039DD80DA + 99C1DD881C41BC029F8E8C0D0389CAE333CB95ADEEB8EE4EC7B2852B2FFD95A5 + 7A18DB5C52EDCBFB060DEC74A0560043003A005C005F00730076006E005F0073 + 006F0075007200630065005F006F00740068006500720073005C005F00730076 + 006E005F0064006B006C0061006E0067005F0062006A006D005C004500780061 + 006D0070006C00650073005C0043006F006E007300740061006E00740073005F + 0046006900720065004D006F006E006B00650079005F004D006F00620069006C + 0065005C005200750073007300690061006E002E006C006E0067001300320030 + 00310033002D00310032002D00300036002000300039003A00350037003A0033 + 0037000C00310030003400390020005200750073007300690061006E00A70100 + 0050010000789C4D504F4B024114BF0FCC7798A063CAEE2A85C21C163724FCD3 + 61F71621838EB6A0B3B23B06DDD422880E76EC1CDD22D80A433415FC046F3E49 + 5FA1D92DA57997F7E7F7E7BDF95EAC3D1676B8B4FBFDAEDF64D20F04752A5526 + 3A8D522022C9848C1A0EEF0518D903791184D4E9F932BC22152604466E30089B + BC6AD7CB270E358D5C0EA35D912F6054E682874C26B454947821135137F521C7 + 2D5F4FC8A59535358D45B216B4FCB6CF5BD4328C7CC62864AC43621845F3A868 + 5A186174D6AE315F9C6364FC3E93C233ACD410BE20CEC05A27339D4ED57087B0 + 28BCAA31ACC8FF29512358E9785377308525CCD424BB63E4283C69D0488D53C7 + FDD269DDF5ECBAE76A5BD7E37A491E45ACC3293CC007C40704E610C3A7A68C35 + 69A2EB77754FB46AD28C6101B304B1D4766B98AB6BB279D9EA6F167B5AF24FAE + C4FAE9DFC3232CD5CDF628759B2C87D10FDC92BB91} + end +end diff --git a/Examples/Constants_FireMonkey_Mobile/Main.pas b/Examples/Constants_FireMonkey_Mobile/Main.pas new file mode 100644 index 0000000..4b201a3 --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/Main.pas @@ -0,0 +1,60 @@ +unit Main; + +interface + +uses + System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, + FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, DKLang, + FMX.StdCtrls, FMX.ListBox, DKLangStorage, FMX.Layouts, FMX.Memo; + +type + TfMain = class(TForm) + lcMain: TDKLanguageController; + cbLanguage: TComboBox; + lSampleMessage: TLabel; + bTest: TButton; + tsMain: TDKLTranslationsStorage; + pMsg: TPanel; + lMessageCaption: TLabel; + mMessage: TMemo; + procedure bTestClick(Sender: TObject); + procedure cbLanguageChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + fMain: TfMain; + +implementation + +{$R *.fmx} + +procedure TfMain.bTestClick(Sender: TObject); +begin + // simulate a dialog + lMessageCaption.Text := DKLangConstW('SMessageCaption'); + mMessage.Lines.Text := DKLangConstW('STestMessage'); +end; + +procedure TfMain.cbLanguageChange(Sender: TObject); +var iIndex: Integer; +begin + iIndex := cbLanguage.ItemIndex; + if iIndex<0 then iIndex := 0; // When there's no valid selection in cbLanguage we use the default language (Index=0) + LangManager.LanguageID := LangManager.LanguageIDs[iIndex]; +end; + +procedure TfMain.FormCreate(Sender: TObject); + var i: Integer; + begin + // Fill cbLanguage with available languages + for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNames[i]); + // Index=0 always means the default language + cbLanguage.ItemIndex := 0; + end; + +end. diff --git a/Examples/Constants_FireMonkey_Mobile/Russian.lng b/Examples/Constants_FireMonkey_Mobile/Russian.lng new file mode 100644 index 0000000..5bd07e4 --- /dev/null +++ b/Examples/Constants_FireMonkey_Mobile/Russian.lng @@ -0,0 +1,15 @@ +TargetApplication=DKLang_Constants_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1049 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-26 00:17:12 + +[fMain] +00000001=Форма-пример +00000002=Это пример сообщения. +00000003=Тест + +[$CONSTANTS] +STestMessage=Ага, кажется, вы нажали кнопку «Тест»! +SMessageCaption=Информация diff --git a/Examples/Constants/DKLang_Constants_Demo.dkl_const.res b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dkl_const.res similarity index 100% rename from Examples/Constants/DKLang_Constants_Demo.dkl_const.res rename to Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dkl_const.res diff --git a/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dklang b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dklang new file mode 100644 index 0000000..69270d6 Binary files /dev/null and b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dklang differ diff --git a/Examples/Constants/DKLang_Constants_Demo.dpr b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dpr similarity index 95% rename from Examples/Constants/DKLang_Constants_Demo.dpr rename to Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dpr index d34a215..771ae37 100644 --- a/Examples/Constants/DKLang_Constants_Demo.dpr +++ b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dpr @@ -4,7 +4,7 @@ // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** -program DKLang_Constants_Demo; +program DKLang_Constants_VCL_Demo; uses Forms, diff --git a/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dproj b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dproj new file mode 100644 index 0000000..fc92c0a --- /dev/null +++ b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.dproj @@ -0,0 +1,532 @@ + + + {71B96FB3-7581-4B04-93D7-E3647ED3C83D} + DKLang_Constants_VCL_Demo.dpr + Debug + DCC32 + 15.2 + VCL + True + Win64 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + $(BDS)\bin\default_app.manifest + $(Platform)\$(Config)\ + 1049 + .\$(Platform)\$(Config) + DKLang_Constants_Demo.exe + 00400000 + vcl;rtl;vclx;vclactnband;xmlrtl;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;vclribbon;vclAbsDBd12;$(DCC_UsePackage) + x86 + + + true + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + $(BDS)\bin\delphi_PROJECTICON.ico + 1033 + + + true + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + 1033 + DKLang_Constants_Demo_Icon.ico + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + DEBUG;$(DCC_Define) + + + 0 + madExcept;$(DCC_Define) + 3 + true + 1033 + + + madExcept;$(DCC_Define) + 3 + 0 + true + 1033 + $(BDS)\bin\delphi_PROJECTICON.ico + + + + MainSource + + +
fMain
+
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DKLang_Constants_VCL_Demo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + False + True + True + + + + + + + + + + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + + + + + + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + DKLang_Constants_VCL_Demo.rsm + + + + + 1 + .dylib + + + 0 + .bpl + + + 1 + .dylib + + + 1 + .dylib + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + + + 1 + + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + + library\lib\armeabi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xhdpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 0 + + + + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + + 1 + + + 1 + + + + + + res\drawable + 1 + + + + + Contents\Resources + 1 + + + + + + 1 + + + 1 + + + + + 1 + + + library\lib\armeabi + 1 + + + 0 + + + 1 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + 1 + + + + + res\drawable-ldpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + 1 + + + + + + + + + + + 12 + + + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + +
diff --git a/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.res b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.res new file mode 100644 index 0000000..0f3facb Binary files /dev/null and b/Examples/Constants_VCL/DKLang_Constants_VCL_Demo.res differ diff --git a/Examples/Constants/German.lng b/Examples/Constants_VCL/German.lng similarity index 100% rename from Examples/Constants/German.lng rename to Examples/Constants_VCL/German.lng diff --git a/Examples/Constants/Main.dfm b/Examples/Constants_VCL/Main.dfm similarity index 90% rename from Examples/Constants/Main.dfm rename to Examples/Constants_VCL/Main.dfm index 9e454fd..d81b3a1 100644 --- a/Examples/Constants/Main.dfm +++ b/Examples/Constants_VCL/Main.dfm @@ -16,14 +16,14 @@ object fMain: TfMain OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 - object lSampleMessage: TTntLabel + object lSampleMessage: TLabel Left = 20 Top = 44 Width = 123 Height = 13 Caption = 'This is a sample message.' end - object bTest: TTntButton + object bTest: TButton Left = 104 Top = 76 Width = 75 @@ -32,13 +32,12 @@ object fMain: TfMain TabOrder = 0 OnClick = bTestClick end - object cbLanguage: TTntComboBox + object cbLanguage: TComboBox Left = 8 Top = 8 Width = 261 Height = 21 Style = csDropDownList - ItemHeight = 13 TabOrder = 1 OnChange = cbLanguageChange end diff --git a/Examples/Constants/Main.pas b/Examples/Constants_VCL/Main.pas similarity index 72% rename from Examples/Constants/Main.pas rename to Examples/Constants_VCL/Main.pas index ab3a819..77bdd35 100644 --- a/Examples/Constants/Main.pas +++ b/Examples/Constants_VCL/Main.pas @@ -1,5 +1,5 @@ //********************************************************************************************************************** -// $Id: Main.pas,v 1.8 2006-08-11 12:15:50 dale Exp $ +// $Id: Main.pas,v 1.8 2006/08/11 12:15:50 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org @@ -9,15 +9,15 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, TntForms, - DKLang, StdCtrls, TntStdCtrls; + Windows, Messages, Variants, Classes, Graphics, Controls, Forms, Dialogs, + DKLang, StdCtrls; type - TfMain = class(TTntForm) - bTest: TTntButton; - cbLanguage: TTntComboBox; + TfMain = class(TForm) + bTest: TButton; + cbLanguage: TComboBox; lcMain: TDKLanguageController; - lSampleMessage: TTntLabel; + lSampleMessage: TLabel; procedure bTestClick(Sender: TObject); procedure cbLanguageChange(Sender: TObject); procedure FormCreate(Sender: TObject); @@ -28,14 +28,14 @@ TfMain = class(TTntForm) implementation {$R *.dfm} -uses TntSystem, TntSysUtils; +uses SysUtils; procedure TfMain.bTestClick(Sender: TObject); begin MessageBoxW( Application.Handle, - PWideChar(DKLangConstW('STestMessage')), - PWideChar(DKLangConstW('SMessageCaption')), + PChar(DKLangConstW('STestMessage')), + PChar(DKLangConstW('SMessageCaption')), MB_ICONINFORMATION or MB_OK); end; @@ -50,12 +50,12 @@ implementation procedure TfMain.FormCreate(Sender: TObject); var i: Integer; begin - // Scan for language files in the app directory and register them in the LangManager object - LangManager.ScanForLangFiles(WideExtractFileDir(WideParamStr(0)), '*.lng', False); + // Scan for language files in the app directory and register them in the Languager Manager + LangManager.ScanForLangFiles(IncludeTrailingPathDelimiter(ExtractFileDir(ParamStr(0))), '*.lng', False); // Fill cbLanguage with available languages for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNames[i]); // Index=0 always means the default language - cbLanguage.ItemIndex := 0; + cbLanguage.ItemIndex := 0; end; end. diff --git a/Examples/Constants/Russian.lng b/Examples/Constants_VCL/Russian.lng similarity index 100% rename from Examples/Constants/Russian.lng rename to Examples/Constants_VCL/Russian.lng diff --git a/Examples/DKLangExamples.groupproj b/Examples/DKLangExamples.groupproj new file mode 100644 index 0000000..57eea1c --- /dev/null +++ b/Examples/DKLangExamples.groupproj @@ -0,0 +1,168 @@ + + + {6D5B2442-31F6-463D-B6FA-C6DF6CF28DC5} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/Embedded_FireMonkey_Mobile/AndroidManifest.template.xml b/Examples/Embedded_FireMonkey_Mobile/AndroidManifest.template.xml new file mode 100644 index 0000000..3dde458 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/AndroidManifest.template.xml @@ -0,0 +1,35 @@ + + + + + + +<%uses-permission%> + + + + + + + + + + + + + + diff --git a/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.deployproj b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.deployproj new file mode 100644 index 0000000..6828f10 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.deployproj @@ -0,0 +1,666 @@ + + + + 12 + + + + DKLang_Embedded_FMX_Mobile_Demo\assets\internal\ + Russian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\assets\internal\ + Korean.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\res\drawable-xhdpi\ + ic_launcher.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\res\drawable-ldpi\ + ic_launcher.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\library\lib\armeabi\ + gdbserver + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\res\drawable-mdpi\ + ic_launcher.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\assets\internal\ + Italian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\assets\internal\ + German.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + AndroidManifest.xml + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\classes\ + classes.dex + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\res\drawable-xxhdpi\ + ic_launcher.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\assets\internal\ + Spanish.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + AndroidManifest.xml + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\res\drawable-hdpi\ + ic_launcher.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo\assets\internal\ + French.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\library\lib\armeabi\ + libDKLang_LocalFileStorage_FMX_Mobile_Demo.so + 1 + + + True + + + DKLang_Embedded_FMX_Mobile_Demo\library\lib\armeabi\ + libDKLang_LocalFileStorage_FMX_Mobile_Demo.so + 1 + + + True + + + DKLang_Embedded_FMX_Mobile_Demo\assets\internal\ + Japanese.lng + 0 + + + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + ResourceRules.plist + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Russian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Korean.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Italian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + German.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Spanish.lng + 0 + + + + + $(PROJECTNAME).app.dSYM\Contents\Resources\DWARF\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + French.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Entitlements.plist + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Japanese.lng + 0 + + + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + Russian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + Korean.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + Italian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + German.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + Spanish.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + French.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo\ + Japanese.lng + 0 + + + + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Contents\MacOS\ + libcgunwind.1.0.dylib + 1 + + + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_57x57.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Landscape@2x.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Russian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Korean.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SettingIcon_58x58.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_114x114.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + DKLang_Embedded_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-568h@2x.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_100x100.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + DKLang_Embedded_FMX_Mobile_Demo.rsm + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Italian.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Entitlements.plist + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + German.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_144x144.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_50x50.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SettingIcon_29x29.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Portrait@2x.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + libcgunwind.1.0.dylib + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default@2x.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Spanish.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + French.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\Startup\Documents\ + Japanese.lng + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Entitlements.plist + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_72x72.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_29x29.png + 0 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default~ipad.png + 1 + + + + + DKLang_Embedded_FMX_Mobile_Demo.app\ + Default-Landscape.png + 1 + + + + + diff --git a/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dklang b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dklang new file mode 100644 index 0000000..374b939 Binary files /dev/null and b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dklang differ diff --git a/Converter_v2/DKLang_Converter_v2.dpr b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dpr similarity index 65% rename from Converter_v2/DKLang_Converter_v2.dpr rename to Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dpr index d49a84d..8b483e3 100644 --- a/Converter_v2/DKLang_Converter_v2.dpr +++ b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dpr @@ -1,7 +1,8 @@ -program DKLang_Converter_v2; +program DKLang_Embedded_FMX_Mobile_Demo; uses - Forms, + System.StartUpCopy, + FMX.Forms, Main in 'Main.pas' {fMain}; {$R *.res} diff --git a/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dproj b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dproj new file mode 100644 index 0000000..3cb81ad --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.dproj @@ -0,0 +1,888 @@ + + + {908131A0-C4C2-4A62-AF4D-637662473750} + 15.2 + FMX + DKLang_Embedded_FMX_Mobile_Demo.dpr + True + Debug + iOSSimulator + 88 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + true + true + true + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + true + true + true + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar + Debug + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + IndyIPClient;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;BeejComponentsXE5;DbxCommonDriver;dbxcds;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;OmniThreadLibraryRuntimeXE5;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;FileStorageBDS_XE5;dklangXE5;FrameViewerXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;ADOX_XE5;RichViewSpellingHunspell_XE5;FireDAC;inet;BeejTmsRvEditLinkXE5;CADSys5_XE5;RESTComponents;dbexpress;$(DCC_UsePackage) + + + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + Debug + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + + + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + + + $(BDS)\bin\default_app.manifest + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + IndyIPClient;JvGlobus;JvMM;tmsdXE5;JvManagedThreads;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;tmswizdXE5;inetdbbde;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;JvNet;BeejComponentsXE5;JvDotNetCtrls;DbxCommonDriver;tdbf;vclimg;dbxcds;gtAdvGridExpD17;MetropolisUILiveTile;JvXPCtrls;vcldb;vcldsnap;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;JvCore;vclribbon;dsnap;IndyIPServer;OmniThreadLibraryRuntimeXE5;fmxase;vcl;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;CodeSiteExpressPkg;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;FileStorageBDS_XE5;JclDeveloperTools;dklangXE5;FrameViewerXE5;JvDocking;adortl;JvWizards;madBasic_;gtRichVwExpD17;FireDACASADriver;JvHMI;bindcompfmx;JvBands;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;madDisAsm_;JvSystem;xmlrtl;svnui;JvTimeFramework;JvControls;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;tmsxlsdXE5;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;ADOX_XE5;FireDACADSDriver;vcltouch;RichViewSpellingHunspell_XE5;madExcept_;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;BeejTmsRvEditLinkXE5;vclx;svn;tmsexdXE5;CADSys5_XE5;fmxdae;RESTComponents;bdertl;VirtualTreesR;dbexpress;FireDACMSAccDriver;JvBDE;$(DCC_UsePackage) + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + +
fMain
+ fmx +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + DKLang_Embedded_FMX_Mobile_Demo.dpr + + + + + + + + + + + + Default-568h@2x.png + + + + + Default-Portrait@2x.png + + + + + + + + ResourceRules.plist + + + + + + + + assets\internal\ + Russian.lng + + + Startup\Documents\ + Russian.lng + + + Russian.lng + + + Startup\Documents\ + Russian.lng + + + + + assets\internal\ + Korean.lng + + + Startup\Documents\ + Korean.lng + + + Korean.lng + + + Startup\Documents\ + Korean.lng + + + + + Default~ipad.png + + + + + Default.png + + + + + + + + ic_launcher.png + + + + + + + + + + + + + + + + + ic_launcher.png + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + Default-Landscape@2x.png + + + + + ic_launcher.png + + + + + + + + Info.plist + + + + + + + + + + + Info.plist + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + + + + assets\internal\ + Italian.lng + + + Startup\Documents\ + Italian.lng + + + Italian.lng + + + Startup\Documents\ + Italian.lng + + + + + Info.plist + + + + + Entitlements.plist + + + + + assets\internal\ + German.lng + + + Startup\Documents\ + German.lng + + + German.lng + + + Startup\Documents\ + German.lng + + + + + + + + + + + Default-Landscape.png + + + + + Default-Portrait~ipad.png + + + + + + + + classes.dex + + + + + ic_launcher.png + + + + + + + + + Default-Portrait@2x~ipad.png + + + + + assets\internal\ + Spanish.lng + + + Startup\Documents\ + Spanish.lng + + + Spanish.lng + + + Startup\Documents\ + Spanish.lng + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo + + + + + + + + Default-Landscape~ipad.png + + + + + + + + ic_launcher.png + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + Default@2x.png + + + + + assets\internal\ + French.lng + + + Startup\Documents\ + French.lng + + + French.lng + + + Startup\Documents\ + French.lng + + + + + Default-Landscape@2x~ipad.png + + + + + + + + Entitlements.plist + + + + + + + + assets\internal\ + Japanese.lng + + + Startup\Documents\ + Japanese.lng + + + Japanese.lng + + + Startup\Documents\ + Japanese.lng + + + + + Entitlements.plist + + + + + + + + 1 + .dylib + + + 0 + .bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + library\lib\armeabi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xhdpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + Contents\Resources + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + library\lib\armeabi + 1 + + + 0 + + + Contents\MacOS + 1 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + Contents\MacOS + 0 + + + 0 + + + + + 1 + + + 1 + + + + + res\drawable-ldpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + 1 + + + + + + + + + + + True + True + True + False + + + 12 + + + + +
diff --git a/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.res b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/Examples/Embedded_FireMonkey_Mobile/DKLang_Embedded_FMX_Mobile_Demo.res differ diff --git a/Examples/Embedded_FireMonkey_Mobile/LangFiles/French.lng b/Examples/Embedded_FireMonkey_Mobile/LangFiles/French.lng new file mode 100644 index 0000000..ea1e904 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/LangFiles/French.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: French.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1036 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:26:51 + +[fMain] +00000001=Forme témoin +00000002=C'est un message témoin. +00000003=Annuler + +[$CONSTANTS] diff --git a/Examples/Embedded_FireMonkey_Mobile/LangFiles/German.lng b/Examples/Embedded_FireMonkey_Mobile/LangFiles/German.lng new file mode 100644 index 0000000..128c2f9 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/LangFiles/German.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: German.lng,v 1.8 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1031 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:26:51 + +[fMain] +00000001=Beispielform +00000002=Das ist eine Beispielmitteilung. +00000003=Abbrechen + +[$CONSTANTS] diff --git a/Examples/Embedded_FireMonkey_Mobile/LangFiles/Italian.lng b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Italian.lng new file mode 100644 index 0000000..b5c06b0 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Italian.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Italian.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1040 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:26:51 + +[fMain] +00000001=Forma del campione +00000002=Ciò è un messaggio del campione. +00000003=Annulla + +[$CONSTANTS] diff --git a/Examples/Embedded_FireMonkey_Mobile/LangFiles/Japanese.lng b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Japanese.lng new file mode 100644 index 0000000..3e84b1e --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Japanese.lng @@ -0,0 +1,13 @@ +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1041 +Generator=DKLang Translation Editor v3.0 +LastModified=2006-08-02 01:26:30 + +[fMain] +00000001=サンプル形態 +00000002=これはサンプルメッセージである。 +00000003=取り消し + +[$CONSTANTS] diff --git a/Examples/Embedded_FireMonkey_Mobile/LangFiles/Korean.lng b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Korean.lng new file mode 100644 index 0000000..0653643 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Korean.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Korean.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1042 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:18:27 + +[fMain] +00000001=견본 모양 +00000002=이것은 견본 메시지이다. +00000003=취소 + +[$CONSTANTS] diff --git a/Examples/Embedded_FireMonkey_Mobile/LangFiles/Russian.lng b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Russian.lng new file mode 100644 index 0000000..38c2b46 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Russian.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Russian.lng,v 1.7 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1049 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:18:27 + +[fMain] +00000001=Форма-пример +00000002=Это пример сообщения. +00000003=Отмена + +[$CONSTANTS] diff --git a/Examples/Embedded_FireMonkey_Mobile/LangFiles/Spanish.lng b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Spanish.lng new file mode 100644 index 0000000..44ac077 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/LangFiles/Spanish.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Spanish.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=3082 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:18:27 + +[fMain] +00000001=Forma de la muestra +00000002=Esto es un mensaje de la muestra. +00000003=Cancelar + +[$CONSTANTS] diff --git a/Examples/Embedded_FireMonkey_Mobile/Main.fmx b/Examples/Embedded_FireMonkey_Mobile/Main.fmx new file mode 100644 index 0000000..79ab50d --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/Main.fmx @@ -0,0 +1,191 @@ +object fMain: TfMain + Left = 0 + Top = 0 + Caption = 'Form2' + ClientHeight = 567 + ClientWidth = 384 + FormFactor.Width = 320 + FormFactor.Height = 480 + FormFactor.Devices = [dkDesktop] + OnCreate = FormCreate + DesignerMobile = True + DesignerWidth = 384 + DesignerHeight = 592 + DesignerDeviceName = 'Google Nexus 4' + DesignerOrientation = 0 + DesignerOSVersion = '' + object cbLanguage: TComboBox + Align = alTop + DisableFocusEffect = False + Height = 32.000000000000000000 + TabOrder = 0 + Width = 384.000000000000000000 + OnChange = cbLanguageChange + end + object lSampleMessage: TLabel + Height = 23.000000000000000000 + Position.X = 8.000000000000000000 + Position.Y = 64.000000000000000000 + Text = 'This is a sample message.' + Width = 361.000000000000000000 + Trimming = ttCharacter + end + object bCancel: TButton + Default = True + Height = 44.000000000000000000 + Position.X = 80.000000000000000000 + Position.Y = 128.000000000000000000 + TabOrder = 2 + Text = 'Cancel' + Trimming = ttCharacter + Width = 201.000000000000000000 + end + object lcMain: TDKLanguageController + Left = 280 + Top = 440 + LangData = { + 0500664D61696E010100000001000000070043617074696F6E01040000000A00 + 63624C616E677561676500000E006C53616D706C654D65737361676501010000 + 00020000000400546578740007006243616E63656C0101000000030000000400 + 546578740006006C734D61696E0000} + end + object lsMain: TDKLTranslationsStorage + Left = 176 + Top = 448 + StoredTranslationFiles = { + 070000005E0043003A005C005F00730076006E005F0073006F00750072006300 + 65005F006F00740068006500720073005C005F00730076006E005F0064006B00 + 6C0061006E0067005F0062006A006D005C004500780061006D0070006C006500 + 73005C0045006D006200650064006400650064005F0046006900720065004D00 + 6F006E006B00650079005F004D006F00620069006C0065005C004C0061006E00 + 6700460069006C00650073005C004600720065006E00630068002E006C006E00 + 6700130032003000310033002D00310031002D00330030002000310032003A00 + 300036003A00320035000B00310030003300360020004600720065006E006300 + 68001703000059010000789CC5524B6E833010DD2371875944AA5405C2A7A409 + 110B149228CAA79560575591050E58011B19139ADEA867E8A28B1EA857A80135 + 3D429E66E39979A3796FFCF3F935BBBF0D5465063058272E2C39A671A6E7341D + 9EC1D46DB00C63AC19131960DAAEF3E83A5348508E61F156C24012B5DBA05B39 + D86C114D61CB629493772408A3F08CE2134A71579FB3F2C2499A895686A5B55A + 24074276140DE278089910A53B1A354DA32727AD92799DF154726F7608558910 + 4FB1F0CB32277127C9EB651E425294393E04B860AAE2D72263DC0B0A22F80536 + 8852550959CD63BCF5F7AB75E099866DABCAFF63AC2A2B4C3147A2A5F5C6451C + D12AEF7D5B244456E06CE9A6A4A14AEC58428E04279EB4ED4133A6DD1798B8D6 + D875CC76CF97E30E11FAAA2A460FD35B325E6010DF1F0523F49AB7BCF91DAE04 + D4140A5C55F2367F2DFAB5C7F67C4AEB1CF36EF060FEB40F237F1F8572FA2FAB + 52BCCF5E0043003A005C005F00730076006E005F0073006F0075007200630065 + 005F006F00740068006500720073005C005F00730076006E005F0064006B006C + 0061006E0067005F0062006A006D005C004500780061006D0070006C00650073 + 005C0045006D006200650064006400650064005F0046006900720065004D006F + 006E006B00650079005F004D006F00620069006C0065005C004C0061006E0067 + 00460069006C00650073005C004700650072006D0061006E002E006C006E0067 + 00130032003000310033002D00310031002D00330030002000310032003A0030 + 0036003A00340037000B00310030003300310020004700650072006D0061006E + 001F03000059010000789CC552CB6EC23010BC47CA3FEC815345421E8542500E + 294108F168A570AB2A649225583876E41852FA6B3DF493FA0B75824A3F81912F + DEDDD1CE8CFDF3F53D7EB80F4C630CD0996701CC501684DB8CE7DD33B8F6103C + C71958CE501F70FDA0FF14F44790118630FD28A1A389D67DD04A8E174BC27358 + 8A9430FA4914151C5E497A2439B6FD89282F92E607D5D8F0ACC68BE64022F6AA + 2612BB7050AA0C7ABDBAAEEDEC6855BA6E0B996BEEDD1EC2343644E6A8A2B264 + 346D2D85579BDB841625C36D8C85308DE8A40E4286714195BCC082706E1A8938 + C91497D17A368F43D7F17DD3F8BFB8A631438E92A886760D6E2309AFD835B769 + 467507CE9EAD2797A4522B91D13DC52CD4B13D5ACEA8FD02C3C01B047DB7D1F9 + B65F11CADF4DC3B9C20D9F91562545B617B2B895BD302615D04A01528EF037A3 + 752BA4ECC473FB36EA87D16E27313D206F1774262FEB6413AD3789DEF20BA1D0 + BF145F0043003A005C005F00730076006E005F0073006F007500720063006500 + 5F006F00740068006500720073005C005F00730076006E005F0064006B006C00 + 61006E0067005F0062006A006D005C004500780061006D0070006C0065007300 + 5C0045006D006200650064006400650064005F0046006900720065004D006F00 + 6E006B00650079005F004D006F00620069006C0065005C004C0061006E006700 + 460069006C00650073005C004900740061006C00690061006E002E006C006E00 + 6700130032003000310033002D00310031002D00330030002000310032003A00 + 300038003A00330030000C00310030003400300020004900740061006C006900 + 61006E002603000060010000789CC5524B6EC23014DC47CA1DDE825545423E40 + 21288B885084F8B452D855157A4A4CB070ECC831507AA2AEBBEDA20B0ED42BD4 + 2412524FC0C81B7BDEF8BD19FBF7FB67F4701F98C608A035CB0298296414B9CD + 78DE3E826BFBE0394EDF72067A81EB07BDC7A037840C1981C97B092DADB4EE83 + 7AE678BE409EC342A47AEC0F54547078C1748F39A9F9B128CF92E63B75B5E159 + 572F5A0389D8AA134AD2869D5265D0E99C4E273BDB5B953EB785CCB5F66E2F61 + 1A6B9439515159329AD696C2C6E626A145C9C8262685308DE8A0764286714195 + 3CC31C39378D441C644A16D16A3A8B43D7F17DD3B86DBA8E694C092712D555D6 + 04B796C82BD6E436C9A866E0E8D9AE9661A59622A35B4AB250C7D6B59C61FD05 + 0681D70F7AEE75CED7ED12297F330DA7811B3E0959206484418A45A92F2537D2 + 0BC7F4F205974F3870284855619E53F1AFD6BE15FB61C4F98131ACDBB4C6CFAB + 641DADD689EEF50784D5C214600043003A005C005F00730076006E005F007300 + 6F0075007200630065005F006F00740068006500720073005C005F0073007600 + 6E005F0064006B006C0061006E0067005F0062006A006D005C00450078006100 + 6D0070006C00650073005C0045006D006200650064006400650064005F004600 + 6900720065004D006F006E006B00650079005F004D006F00620069006C006500 + 5C004C0061006E006700460069006C00650073005C004A006100700061006E00 + 6500730065002E006C006E006700130032003000310033002D00310031002D00 + 330030002000310032003A00300037003A00320032000D003100300034003100 + 20004A006100700061006E00650073006500330100000D010000789C7BBF7B7F + 4862517A6A896341414E66726249667E9EAD8BB74F625E7A7C70666E414E6ABC + 4B6A6E3E2F97636949467E91AD4B6E664951A58277625E1E2F57707E695172AA + 8FA39FBBA78BADA181B1312F179C6362C8CBE59E9A975A945802D206365121A4 + 2831AF38076C89826B4A265046A1CC58CF00A82DB1B8C4373F25332D3335C5D6 + C8C0C04CD7C042D7C048C1C0D0CAC8CCCA18A882972B3ACD3731332F9697CB00 + 020C6D1F376D7DDCBCF971F3F4C7CDAB9FEE5DF4ACB51B2E6964FBB871F2E3A6 + 9EC78DEB91553D6E5EF8B8B9F971D3EEC7CD7B1E37ED78DCB8FC7163D3E3A6EE + C70D4D70ADC6B64FFBA73D6EEA7AB6ADE371E374B0CD2ACEFE7EC1218E7E21C1 + 40EB01E5D7775F5E0043003A005C005F00730076006E005F0073006F00750072 + 00630065005F006F00740068006500720073005C005F00730076006E005F0064 + 006B006C0061006E0067005F0062006A006D005C004500780061006D0070006C + 00650073005C0045006D006200650064006400650064005F0046006900720065 + 004D006F006E006B00650079005F004D006F00620069006C0065005C004C0061 + 006E006700460069006C00650073005C004B006F007200650061006E002E006C + 006E006700130032003000310033002D00310031002D00330030002000310032 + 003A00300037003A00330036000B00310030003400320020004B006F00720065 + 0061006E001E03000075010000789CC5524D4BC34010BD07F21FE6D09398980F + 3F6A2487604A29AD55486E22B224DB7431DD0DDBB5514F82E0A55E04F1A437C1 + 2A9E5450F0E0FFB101FF829B14FB173ACC65E7CD9B9DF7767FBFBEB7961613AA + B205506BC50EB419C788EA294D964760EA365886B1AE19759960DACEDA86B3B6 + 09314A31344E32A849A2B698A856F6DB1D4413E8B008A5E40C09C228ECA1E808 + 25B8C2B75976CA49D217A50C4B2BB5480E04AC2772C4F132F485C89C95953CCF + F5F8481BCABACE7822B90B7B085509114FB0F0B22C255125C99DC93C0CC8204B + F1A18F074C55BC63D167DCF50744F05368234A552560C73CC21DAFDB6CF9AE69 + D8B6AACC0FAB96AA3431C51C899236332EE4880ED3996F8D98480446966E4A1A + 1A8A1D16931EC1B12B6D5BD58CCDEA0BD41D99D646B9E77E6F07117AA02AC62C + 4CF7E7F565FAF609D3E749717B3DAF5B6E71FFFEF37A51DC9FC37FC7D34D31BE + 2B1ECF25321D3FE8F35EDB2D3E26C5E55535BFB6BDDB0D42AF1B06F2923F6A2D + CE275F0043003A005C005F00730076006E005F0073006F007500720063006500 + 5F006F00740068006500720073005C005F00730076006E005F0064006B006C00 + 61006E0067005F0062006A006D005C004500780061006D0070006C0065007300 + 5C0045006D006200650064006400650064005F0046006900720065004D006F00 + 6E006B00650079005F004D006F00620069006C0065005C004C0061006E006700 + 460069006C00650073005C005200750073007300690061006E002E006C006E00 + 6700130032003000310033002D00310031002D00330030002000310032003A00 + 300037003A00350033000C003100300034003900200052007500730073006900 + 61006E00350300007B010000789CC552314EC33014DD23E50E7FE884484852A0 + 34284344AA0AB51444BA2184ACC44D2D523B72DC16980A1B13376062452A0312 + 1250AEE09C842BE02452C50DFAFC876F3F3FFDFFBEFDFBF973B8B519E8DA2140 + E33876E17C9AE7045133A5C9F60C6CB3058E65ED1BD6810AB09BEE5ECBDD6B43 + 8C520C9D9B0C1A4A696C0655CF41AF8F68027D16A194DC2141188533145DA304 + 57FC11CB6E3949C6A2B4E118A517A581908DC41C71BC0D6321327767673E9F9B + F1B591AB7393F1446937F612BA36443CC1C2CFB294449525AFB67915924996E2 + AB004F98AEF9533166DC0B2644F05BE8214A752D64531EE1BE3FE81E079E6D35 + 9BBAB6DEECB675AD8B29E64894B27A70438E689ED673EBC4443130734C5BC950 + 2E4E584C4604C79E1ADBAE61B5AB2F70E0AA705A659F17A31344E8A5AE59356C + 4FBEC855B1905F7269C81F957CA8F4BD58AC6F389E7C2D1EE40AFEB350DCCB95 + 5A6FC5A37C97DFF2A37832D78AA6279F95E2AB629655D5C6D1E9201CFA8361A8 + 4AFF01053FDF585F0043003A005C005F00730076006E005F0073006F00750072 + 00630065005F006F00740068006500720073005C005F00730076006E005F0064 + 006B006C0061006E0067005F0062006A006D005C004500780061006D0070006C + 00650073005C0045006D006200650064006400650064005F0046006900720065 + 004D006F006E006B00650079005F004D006F00620069006C0065005C004C0061 + 006E006700460069006C00650073005C005300700061006E006900730068002E + 006C006E006700130032003000310033002D00310031002D0033003000200031 + 0032003A00300038003A00310031000C00330030003800320020005300700061 + 006E00690073006800270300005C010000789CC552CB6E833010BC23F10F7BC8 + A90A8447DB24441C5048A3288F56825B55452B70C00DD8C898D0F4D77AE827F5 + 176A4815A95F90D15EECD9D1EE8CFDF3F53DBBBB0D746D063058A51E4415325A + E766C1B2E1096CD305C7B21E0D6BA20A6CD77B187B0F5348B120B0F8A860A094 + C66DD0EF1CAE37C832D8F0040BFA899272062F981C31233D3FE7D559D02C979D + 0DC7E8BC280D44FC205B146408B99495371AB56D6BA647A356F7261799D2DEEC + 25742D4691111954554193DE927FB1B98F685915641F9292EB5AD0C89C0B3F2C + A91467582363BA16F146246413EC96ABD0B72DD7D5B5BF836B4D1C5D5B124604 + CA4E76092E16C8EAE292DB22A58A819363DA4A86B5DCF2941E28497D15DBBD61 + 4DFB2F30F15439E36ECFD7C316297BD335EB02DB7FE2A2444809140865436A29 + F0CA3AFEA2961C480D0D8392B01ADFC9FF56F3DAEBFA7364092950F47306F3E7 + 5D1407BB3852C37E012022C0F9} + end +end diff --git a/Examples/Embedded_FireMonkey_Mobile/Main.pas b/Examples/Embedded_FireMonkey_Mobile/Main.pas new file mode 100644 index 0000000..8fdf621 --- /dev/null +++ b/Examples/Embedded_FireMonkey_Mobile/Main.pas @@ -0,0 +1,51 @@ +unit Main; + +interface + +uses + System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, + FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, DKLang, + FMX.StdCtrls, FMX.ListBox, FMX.Layouts, FMX.Memo, DKLangStorage; + +type + TfMain = class(TForm) + cbLanguage: TComboBox; + lSampleMessage: TLabel; + bCancel: TButton; + lcMain: TDKLanguageController; + lsMain: TDKLTranslationsStorage; + procedure cbLanguageChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + fMain: TfMain; + +implementation + +{$R *.fmx} + + procedure TfMain.cbLanguageChange(Sender: TObject); + var iIndex: Integer; + begin + iIndex := cbLanguage.ItemIndex; + if iIndex<0 then iIndex := 0; // When there's no valid selection in cbLanguage we use the default language (Index=0) + LangManager.LanguageID := LangManager.LanguageIDs[iIndex]; + end; + + procedure TfMain.FormCreate(Sender: TObject); + var i: Integer; + begin + // embedded languages auto register when the form is created, so only need to load them into the combobox + + // Fill cbLanguage with available languages + for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNativeNames[i]); + // Index=0 always means the default language + cbLanguage.ItemIndex := 0; + end; + +end. diff --git a/Examples/Simple/Arabic.lng b/Examples/Embedded_VCL/Arabic.lng similarity index 100% rename from Examples/Simple/Arabic.lng rename to Examples/Embedded_VCL/Arabic.lng diff --git a/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dklang b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dklang new file mode 100644 index 0000000..5c8355f Binary files /dev/null and b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dklang differ diff --git a/Examples/Ansi/DKLang_Ansi_Demo.dpr b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dpr similarity index 85% rename from Examples/Ansi/DKLang_Ansi_Demo.dpr rename to Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dpr index b255ff8..7264eb2 100644 --- a/Examples/Ansi/DKLang_Ansi_Demo.dpr +++ b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dpr @@ -1,10 +1,10 @@ //********************************************************************************************************************** -// $Id: DKLang_Ansi_Demo.dpr,v 1.1 2006-08-05 21:34:10 dale Exp $ +// $Id: DKLang_Simple_Demo.dpr,v 1.4 2006-06-17 04:19:28 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** -program DKLang_Ansi_Demo; +program DKLang_Embedded_VCL_Demo; uses Forms, diff --git a/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dproj b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dproj new file mode 100644 index 0000000..7421972 --- /dev/null +++ b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.dproj @@ -0,0 +1,181 @@ + + + {D571BC1E-6F55-4906-AB55-43C426D1AEE0} + DKLang_Embedded_VCL_Demo.dpr + Debug + DCC32 + 15.2 + VCL + True + Win32 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + .\$(Platform)\$(Config) + $(BDS)\bin\delphi_PROJECTICON.ico + $(Platform)\$(Config)\ + $(BDS)\bin\default_app.manifest + 1049 + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + DKLang_Simple_Demo.exe + 00400000 + vcl;rtl;vclx;vclactnband;xmlrtl;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;vclribbon;vclAbsDBd12;$(DCC_UsePackage) + x86 + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + 1033 + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + 1033 + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + 1033 + true + + + 1033 + true + + + DEBUG;$(DCC_Define) + + + + MainSource + + +
fMain
+ dfm +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DKLang_Embedded_VCL_Demo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + False + True + True + + + 12 + + +
diff --git a/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.res b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.res new file mode 100644 index 0000000..0f3facb Binary files /dev/null and b/Examples/Embedded_VCL/DKLang_Embedded_VCL_Demo.res differ diff --git a/Examples/Simple/French.lng b/Examples/Embedded_VCL/French.lng similarity index 100% rename from Examples/Simple/French.lng rename to Examples/Embedded_VCL/French.lng diff --git a/Examples/Simple/German.lng b/Examples/Embedded_VCL/German.lng similarity index 100% rename from Examples/Simple/German.lng rename to Examples/Embedded_VCL/German.lng diff --git a/Examples/Simple/Italian.lng b/Examples/Embedded_VCL/Italian.lng similarity index 100% rename from Examples/Simple/Italian.lng rename to Examples/Embedded_VCL/Italian.lng diff --git a/Examples/Simple/Japanese.lng b/Examples/Embedded_VCL/Japanese.lng similarity index 100% rename from Examples/Simple/Japanese.lng rename to Examples/Embedded_VCL/Japanese.lng diff --git a/Examples/Simple/Korean.lng b/Examples/Embedded_VCL/Korean.lng similarity index 100% rename from Examples/Simple/Korean.lng rename to Examples/Embedded_VCL/Korean.lng diff --git a/Examples/Embedded_VCL/Main.dfm b/Examples/Embedded_VCL/Main.dfm new file mode 100644 index 0000000..e3e90ea --- /dev/null +++ b/Examples/Embedded_VCL/Main.dfm @@ -0,0 +1,198 @@ +object fMain: TfMain + Left = 438 + Top = 199 + BorderStyle = bsDialog + Caption = 'Sample Form' + ClientHeight = 119 + ClientWidth = 280 + Color = clBtnFace + Font.Charset = ANSI_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Arial Unicode MS' + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 15 + object lSampleMessage: TLabel + Left = 20 + Top = 44 + Width = 128 + Height = 15 + Caption = 'This is a sample message.' + end + object bCancel: TButton + Left = 104 + Top = 76 + Width = 75 + Height = 25 + Caption = 'Cancel' + TabOrder = 0 + end + object cbLanguage: TComboBox + Left = 8 + Top = 8 + Width = 261 + Height = 23 + Style = csDropDownList + TabOrder = 1 + OnChange = cbLanguageChange + end + object lcMain: TDKLanguageController + Left = 240 + Top = 48 + LangData = { + 0500664D61696E010100000001000000070043617074696F6E01040000000700 + 6243616E63656C010100000003000000070043617074696F6E000E006C53616D + 706C654D657373616765010100000004000000070043617074696F6E000A0063 + 624C616E67756167650000060074734D61696E0000} + end + object tsMain: TDKLTranslationsStorage + Left = 200 + Top = 48 + StoredTranslationFiles = { + 08000000460043003A005C005F00730076006E005F0073006F00750072006300 + 65005F006F00740068006500720073005C005F00730076006E005F0064006B00 + 6C0061006E0067005F0062006A006D005C004500780061006D0070006C006500 + 73005C0045006D006200650064006400650064005F00560043004C005C004100 + 720061006200690063002E006C006E006700130032003000310033002D003100 + 30002D00310031002000310037003A00340037003A00310031000B0031003000 + 3200350020004100720061006200690063002A0300006F010000789CC592CF4A + C34010C6EF81BCC31C7A9226E64F6BDB941C42534A69AD427A139135D9A64BD3 + 6CD8AE56BD2A067C0B4F5E15BDA8075F23FB14BE829B04FB0A1D6659763F7ECC + 7CB3FBFBFDD33FD84FA84A1FA0318E1CF018BA24A19EA471F31A4CDD06CB308E + 34A32B134CDB69779C760F22946018DE64D090A0B69FA85AF6275394C630A521 + 4AC81DE284A6708AC2158A71A50F6876CB48BCE4A50D4B2BBD480602BAE05BC4 + 7013969C67CEE1E176BBD5A395B691F73A65B164F7F610AA32472CC6DCCBB284 + 849525B7B67911907596E00B1FAFA9AA78577C4999EBAF0967B7304169AA2A01 + BD62219E7AB3D1D8774DC3B6556577B0DAAA32C229668897583DB83943E926A9 + E7368C8854E0DAD24D89A10D3FA61159101CB9726C2DCDE8555FA0EBC8B43A65 + 9F678B6344D2735531EA30DDE243DC8B07285EC443F1299EC4A3C877AAED56D7 + E5FA2A5E8AE79DD072455EBC8A1CFE919A7F2BDECB5DE47A55AB31389905736F + 360F64C13F5048D66A460043003A005C005F00730076006E005F0073006F0075 + 007200630065005F006F00740068006500720073005C005F00730076006E005F + 0064006B006C0061006E0067005F0062006A006D005C004500780061006D0070 + 006C00650073005C0045006D006200650064006400650064005F00560043004C + 005C004600720065006E00630068002E006C006E006700130032003000310033 + 002D00310030002D00310031002000310037003A00340037003A00310031000B + 00310030003300360020004600720065006E0063006800170300005901000078 + 9CC552CB6A834014DD0BFEC35D040A251A1F499A185C484C42C8A305DD951206 + 9DE8109D91718C4DFEA8DFD04517FDA0FE4247A5E927E47037732EE772CFB9F3 + F3F9357BBC0F546506D05BC70E2C39A651AA6734E99FC1D46DB00C63AC191359 + 60DACEE8C9194D21461986C57B013D29D4EE8376657FB34534812D8B5046AE48 + 1046E105452794E0B63F67C5859324158D0D4B6BBC480D04EC286AC4711F5221 + 0A6730A8EB5A8F4F5A29799DF1446AEF76085509114FB0F08A2223516BC9ED6C + 1E029217193EF83867AAE2552265DCF57322F805368852550958C523BCF5F6AB + B5EF9A866DABCAFF63AC2A2B4C3147A29175C1851CD132EB725BC44476E06CE9 + A694A152EC584C8E04C7AE8C6DA819D3F60B4C1C6BEC8CCC66CFD7E30E11FAA6 + 2A4607D35D329E6310DF1F3923F4C6DBAE476995617E6386EEFC0197022A0A39 + 2E4B79AD3F91DE0EEECD9FF741E8EDC3404EFF0585A2BCD1460043003A005C00 + 5F00730076006E005F0073006F0075007200630065005F006F00740068006500 + 720073005C005F00730076006E005F0064006B006C0061006E0067005F006200 + 6A006D005C004500780061006D0070006C00650073005C0045006D0062006500 + 64006400650064005F00560043004C005C004700650072006D0061006E002E00 + 6C006E006700130032003000310033002D00310030002D003100310020003100 + 37003A00340037003A00310031000B0031003000330031002000470065007200 + 6D0061006E001F03000059010000789CC552CB6E833010BC23F10F7BC8A90A04 + C8A30911071AA228CAA395E0565591030B58011B192769FB6B3DF493FA0B35A0 + A69F90D15E3CEBD1EE8CFDF3F53D7FB80F746D0ED05B272EAC5094849905CBFA + 17B0CD2938963531ACA92AB087EEF8D11DCF202105C2F2BD829E121AF741BB72 + B0D91296C196C7A4A09F4452CEE085C4279261DB5FF0EA43D02C978D0DC768BC + 280D843C955722B00FB994953B185CAF57333919B5E24D2E32A5BDDB43E85A44 + 4486D2AFAA82C6AD25AFB379086959157808B0E4BAE69F65CE851794548A0FD8 + 10C6742DE46711E3D6DFAFD681675BC3A1AEFD1F6C5D5B2143416423EB828B04 + 6175D1E5B64CA8EAC0C531D5CD2DA9E58E2734A598782AB69161CDDA2F30759D + 893BB69B3D5FD31DA1EC4DD7AC0EB6F784B4AE28162917E58D1E7AFEF12830CE + 91DDB89117901A682D012943F8D3292F1269716699D90EE82D9EF761E4EFA350 + 4DF90571A3BF16470043003A005C005F00730076006E005F0073006F00750072 + 00630065005F006F00740068006500720073005C005F00730076006E005F0064 + 006B006C0061006E0067005F0062006A006D005C004500780061006D0070006C + 00650073005C0045006D006200650064006400650064005F00560043004C005C + 004900740061006C00690061006E002E006C006E006700130032003000310033 + 002D00310030002D00310031002000310037003A00340037003A00310031000C + 00310030003400300020004900740061006C00690061006E0026030000600100 + 00789CC552CB6EC23010BC47CA3FEC815345421E402128870828423C5A29B955 + 155A2526583876E41828FDA29E7BEDA1073EA8BF50274848FD02567BF18EC63B + 33F6EFF7CFE8E13E651A2380D63C0B60AE9051E436E379FB08AEED83E7387DCB + 19E806D70F7A8F416F08193202D3F7125A9A69DDA71ACD93C512790E4B916AD9 + 1FA8A8E0F082E91E73D2E063519E25CD77AAB6E159B517CD81586CD5092569C3 + 4EA932E8744EA7939DEDAD4ACF6D2173CDBDDB4B98468232272A2A4B46D3C652 + 78B5B989695132B2999042984674503B21C34941953CC30239378D581C644A96 + D17A369F84AEE3FBA6713B741DD398114E24AA9A760D2E91C82B76CD6D9A518D + C0D1B35D4DC34AAD4446B79464A18EAD6B39C3E60B0C02AF1FF4DC5AE7EB7685 + 94BF9986732D377C12B240C80883148B525F4A6EA01F469C1F18C3DBA41B8EE9 + E50B2E9F70E05090AAC23CA7E21FDB6ED6B4C6CFEB3889D649AC77FD0141E5C2 + 16480043003A005C005F00730076006E005F0073006F0075007200630065005F + 006F00740068006500720073005C005F00730076006E005F0064006B006C0061 + 006E0067005F0062006A006D005C004500780061006D0070006C00650073005C + 0045006D006200650064006400650064005F00560043004C005C004A00610070 + 0061006E006500730065002E006C006E006700130032003000310033002D0031 + 0030002D00310031002000310037003A00340037003A00310031000D00310030 + 003400310020004A006100700061006E00650073006500330100000D01000078 + 9C7BBF7B7F4862517A6A896341414E66726249667E9EAD8BB74F625E7A7C7066 + 6E414E6ABC4B6A6E3E2F97636949467E91AD4B6E664951A58277625E1E2F5770 + 7E695172AA8FA39FBBA78BADA181B1312F179C6362C8CBE59E9A975A945802D2 + 06365121A42831AF38076C89826B4A265046A1CC58CF00A82DB1B8C4373F2533 + 2D3335C5D6C8C0C04CD7C042D7C048C1C0D0CAC8CCCA18A882972B3ACD373133 + 2F9697CB00020C6D1F376D7DDCBCF971F3F4C7CDAB9FEE5DF4ACB51B2E696CFB + B47FDAE3A6AE67DB3A1E374E870B9BD83E6E9CFCB8A9E771E37A64CD8F9B173E + 6E6E7EDCB4FB71F39EC74D3B1E372E7FDCD8F4B8A9FB714313D86615677FBFE0 + 1047BF9060A0F5001EF37761460043003A005C005F00730076006E005F007300 + 6F0075007200630065005F006F00740068006500720073005C005F0073007600 + 6E005F0064006B006C0061006E0067005F0062006A006D005C00450078006100 + 6D0070006C00650073005C0045006D006200650064006400650064005F005600 + 43004C005C004B006F007200650061006E002E006C006E006700130032003000 + 310033002D00310030002D00310031002000310037003A00340037003A003100 + 31000B00310030003400320020004B006F007200650061006E001E0300007501 + 0000789CC552CB4AC34014DD07F20F77D19598348F6A3592453122A50F856427 + 2243324D07D399309DB6D6554170533782B8D29D6015572A28B8F07F6CC05F70 + 9A607FA197BB99733873EF3933BF5FDF3B6BAB2955D90128D523071A8C6344F5 + 84C6EB4330751B2CC3D8D48C2DD960DACE46D5D9D886082518F6CE522849A1B6 + 9ACA57F61A4D446368B21025E41C09C2281CA2F014C538E777593AE624EE8A85 + 0D4B5B78911AF059478C10C7EBD0152275CAE5D168A447A75A5FE23AE3B1D4AE + EC215425403CC6A296A60909734B6E61F3C427BD34C1271EEE3155A90D449771 + D7EB11C1C7D04094AA8ACF063CC4CD5A7BBFEEB9A661DBAAB23C542C55D9C714 + 732416B222B88023DA4F8ADCF6222219185ABA2965A82F5A2C221D822357C656 + D18CEDFC0B6C39B2ADEA62CFA34E0B117AAC2A4651A6FBF3FA327FFB84F9F32C + BBBD5EE2B69B7DCCB2CBAB255071B3FBF79FD78BEC7E02FF92A79B6C7A973D4E + 24339F3EE8F9FDA5DD83B61FD4DA812F87FC01E15CCE29470043003A005C005F + 00730076006E005F0073006F0075007200630065005F006F0074006800650072 + 0073005C005F00730076006E005F0064006B006C0061006E0067005F0062006A + 006D005C004500780061006D0070006C00650073005C0045006D006200650064 + 006400650064005F00560043004C005C005200750073007300690061006E002E + 006C006E006700130032003000310033002D00310030002D0031003100200031 + 0037003A00340037003A00310031000C00310030003400390020005200750073 + 007300690061006E00350300007A010000789CC552CD4EC24010BE37E93BCC81 + 93A1A5E547A0A6070284107E34969B31664397B2B1EC36DB05C4137AF3E41B78 + F26A82071312155F61FB24BE82DB9210DF80D939CC7E335F66BED9FDFDFC393B + 398EE9DA1940AEEB3B70398F6382A819D220BF00DBAC42D1B24E0DABA61CEC92 + 53A93A953AF828C4D0BE8B20A798C6712C9BB9D5EB231A409F8D5148EE91208C + C2051ADFA20067F9268B569C045391CA281AA916C5018F4DC412719C87A91091 + 53282C974BD3BF3562859B8C078A7BB497D0B511E201168D280AC93893E4EE65 + DE78641685F8A685674CD71A733165DC6DCD88E02BE8214A75CD63733EC6FDC6 + B0D36DB9B6552AE9DAE152AEEB5A0753CC914869FBC58D38A271B8DF5BDB272A + 038BA2692B1A8AC580F96442B0EFAAB5950DAB9E7D819AA3BC584DE7BC9A0C10 + A1D7BA66EDCD76E5ABDC256BF9253786FC51C156851FC9FA505172E54BF29882 + F25B6E0E70D9956F0ADEC17F12240F72A7CE7BF294956F936733EB9A6B9E0FBD + 516338F254EB3F8979DF5A470043003A005C005F00730076006E005F0073006F + 0075007200630065005F006F00740068006500720073005C005F00730076006E + 005F0064006B006C0061006E0067005F0062006A006D005C004500780061006D + 0070006C00650073005C0045006D006200650064006400650064005F00560043 + 004C005C005300700061006E006900730068002E006C006E0067001300320030 + 00310033002D00310030002D00310031002000310037003A00340037003A0031 + 0031000C00330030003800320020005300700061006E00690073006800270300 + 005B010000789CC552CB6EC23010BC47CA3FEC815345421E502028870828423C + 5A29DCAA0AAD1293B83876E43850FA6B3DF493FA0B354985D42F60B417EF68B4 + 3BB3FEF9FA9E3CDC07A63101E82CD300E21239AD729BF1AC7B02D7F6C1739C47 + CB19E902D70F06C3603086141981F947091DADB4EE8366E7D96A8D3C83B54890 + D14F54547078C1E4881969F8A9282F9266B9BADAF0ACAB17AD81581CD41925E9 + 42AE5419F47AE7F3D94E8F56A5FBB69099D6DEED12A6B1439911159525A34963 + 296C6DEE635A948CEC67A410A611D52A17329C1554C90BAC9073D388452D13B2 + 8EB68BE52C741DDF378DBF87EF8C3CD358104E24AAABAC0D6E279157ACCD6D9E + 52CDC0C9B35D2DC34A6D444A0F94A4A18EAD6F39E3E60B8C025DDEF0BAE7EB61 + 8394BF9986D3C20D9F842C1052020CA1A849A524DE583F9C224F0843796BF5C3 + 79A504900A6A0E05E115BE93FF6ABB99D3993E6FE35DB4DDC57AD82FF7C1C0FB} + end +end diff --git a/Examples/Simple/Main.pas b/Examples/Embedded_VCL/Main.pas similarity index 67% rename from Examples/Simple/Main.pas rename to Examples/Embedded_VCL/Main.pas index 4a030b5..ff28272 100644 --- a/Examples/Simple/Main.pas +++ b/Examples/Embedded_VCL/Main.pas @@ -1,5 +1,5 @@ //********************************************************************************************************************** -// $Id: Main.pas,v 1.7 2006-08-11 12:15:51 dale Exp $ +// $Id: Main.pas,v 1.7 2006/08/11 12:15:51 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright (c)DK Software, http://www.dk-soft.org/ @@ -9,15 +9,16 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, TntForms, - StdCtrls, DKLang, TntStdCtrls; + Windows, Messages, Variants, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, DKLang, DKLangStorage; type - TfMain = class(TTntForm) - bCancel: TTntButton; - cbLanguage: TTntComboBox; + TfMain = class(TForm) + bCancel: TButton; + cbLanguage: TComboBox; lcMain: TDKLanguageController; - lSampleMessage: TTntLabel; + lSampleMessage: TLabel; + tsMain: TDKLTranslationsStorage; procedure cbLanguageChange(Sender: TObject); procedure FormCreate(Sender: TObject); end; @@ -26,8 +27,8 @@ TfMain = class(TTntForm) fMain: TfMain; implementation + {$R *.dfm} -uses TntSystem, TntSysUtils; procedure TfMain.cbLanguageChange(Sender: TObject); var iIndex: Integer; @@ -40,12 +41,12 @@ implementation procedure TfMain.FormCreate(Sender: TObject); var i: Integer; begin - // Scan for language files in the app directory and register them in the LangManager object - LangManager.ScanForLangFiles(WideExtractFileDir(WideParamStr(0)), '*.lng', False); - // Fill cbLanguage with available languages + // embedded languages auto register when the form is created, so only need to load them into the combobox + + // Fill cbLanguage with available languages for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNames[i]); // Index=0 always means the default language - cbLanguage.ItemIndex := 0; + cbLanguage.ItemIndex := 0; end; end. diff --git a/Examples/Simple/Russian.lng b/Examples/Embedded_VCL/Russian.lng similarity index 100% rename from Examples/Simple/Russian.lng rename to Examples/Embedded_VCL/Russian.lng diff --git a/Examples/Simple/Spanish.lng b/Examples/Embedded_VCL/Spanish.lng similarity index 100% rename from Examples/Simple/Spanish.lng rename to Examples/Embedded_VCL/Spanish.lng diff --git a/Examples/Frames/DKLang_Frames_Demo.cfg b/Examples/Frames/DKLang_Frames_Demo.cfg deleted file mode 100755 index 45f0861..0000000 --- a/Examples/Frames/DKLang_Frames_Demo.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Examples/Frames/DKLang_Frames_Demo.dklang b/Examples/Frames/DKLang_Frames_Demo.dklang deleted file mode 100644 index bf56cb7..0000000 --- a/Examples/Frames/DKLang_Frames_Demo.dklang +++ /dev/null @@ -1,15 +0,0 @@ -[fMain] -Caption=00000001,Settings -bCancel.Caption=00000003,Cancel -bOK.Caption=00000004,OK -lLanguage.Caption=00000005,&Interface language: - -[frFontSettings] -bSelectFont.Caption=00000001,Select... -pSample.Caption=00000002,This is a sample text - -[$CONSTANTS] -SFontEditorTitle_Interface=Interface -SFontEditorTitle_Table=Table -SFontEditorTitle_Toolbar=Toolbar - diff --git a/Examples/Frames/DKLang_Frames_Demo.dof b/Examples/Frames/DKLang_Frames_Demo.dof deleted file mode 100755 index c18dd98..0000000 --- a/Examples/Frames/DKLang_Frames_Demo.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOfficeXP;GR32_DSGN_D7;GR32_D7;tb2k_d7;tbx_d7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Examples/Frames/DKLang_Frames_Demo.res b/Examples/Frames/DKLang_Frames_Demo.res deleted file mode 100644 index 1228533..0000000 Binary files a/Examples/Frames/DKLang_Frames_Demo.res and /dev/null differ diff --git a/Examples/Frames/DKLang_Frames_Demo.dkl_const.res b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dkl_const.res similarity index 100% rename from Examples/Frames/DKLang_Frames_Demo.dkl_const.res rename to Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dkl_const.res diff --git a/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dklang b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dklang new file mode 100644 index 0000000..14b04a6 Binary files /dev/null and b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dklang differ diff --git a/Examples/Frames/DKLang_Frames_Demo.dpr b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dpr similarity index 96% rename from Examples/Frames/DKLang_Frames_Demo.dpr rename to Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dpr index c11bea4..aabba76 100644 --- a/Examples/Frames/DKLang_Frames_Demo.dpr +++ b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dpr @@ -4,7 +4,7 @@ // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** -program DKLang_Frames_Demo; +program DKLang_Frames_VCL_Demo; uses Forms, diff --git a/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dproj b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dproj new file mode 100644 index 0000000..7efeaf4 --- /dev/null +++ b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.dproj @@ -0,0 +1,173 @@ + + + {F0E9C25A-051A-43BA-88F2-B71A19839D76} + DKLang_Frames_VCL_Demo.dpr + Debug + DCC32 + 15.2 + VCL + True + Win64 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + .\$(Platform)\$(Config) + $(Platform)\$(Config)\ + $(BDS)\bin\default_app.manifest + 1049 + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + DKLang_Frames_Demo_Icon.ico + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + DKLang_Frames_Demo.exe + 00400000 + vcl;rtl;vclx;vclactnband;xmlrtl;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;vclribbon;vclAbsDBd12;$(DCC_UsePackage) + x86 + + + 1033 + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + 1033 + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + DEBUG;$(DCC_Define) + + + 1033 + true + + + $(BDS)\bin\delphi_PROJECTICON.ico + true + 1033 + + + + MainSource + + +
fMain
+
+ +
frFontSettings
+ TFrame +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DKLang_Frames_VCL_Demo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + False + True + True + + + 12 + + +
diff --git a/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.res b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.res new file mode 100644 index 0000000..0f3facb Binary files /dev/null and b/Examples/Frames_VCL/DKLang_Frames_VCL_Demo.res differ diff --git a/Examples/Frames/German.lng b/Examples/Frames_VCL/German.lng similarity index 100% rename from Examples/Frames/German.lng rename to Examples/Frames_VCL/German.lng diff --git a/Examples/Frames/Main.dfm b/Examples/Frames_VCL/Main.dfm similarity index 93% rename from Examples/Frames/Main.dfm rename to Examples/Frames_VCL/Main.dfm index 18d39c7..16f40a4 100644 --- a/Examples/Frames/Main.dfm +++ b/Examples/Frames_VCL/Main.dfm @@ -20,7 +20,7 @@ object fMain: TfMain 284) PixelsPerInch = 96 TextHeight = 13 - object lLanguage: TTntLabel + object lLanguage: TLabel Left = 12 Top = 4 Width = 96 @@ -28,7 +28,7 @@ object fMain: TfMain Caption = '&Interface language:' FocusControl = cbLanguage end - object bCancel: TTntButton + object bCancel: TButton Left = 254 Top = 251 Width = 75 @@ -37,7 +37,7 @@ object fMain: TfMain Caption = 'Cancel' TabOrder = 0 end - object bOK: TTntButton + object bOK: TButton Left = 174 Top = 251 Width = 75 @@ -51,8 +51,9 @@ object fMain: TfMain Top = 48 Width = 312 Height = 57 - AutoScroll = False TabOrder = 2 + ExplicitLeft = 12 + ExplicitTop = 48 inherited lcMain: TDKLanguageController LangData = { 14006672466F6E7453657474696E67735F5461626C650001030000000B006253 @@ -66,8 +67,9 @@ object fMain: TfMain Top = 116 Width = 312 Height = 57 - AutoScroll = False TabOrder = 3 + ExplicitLeft = 12 + ExplicitTop = 116 inherited lcMain: TDKLanguageController LangData = { 16006672466F6E7453657474696E67735F546F6F6C6261720001030000000B00 @@ -81,8 +83,9 @@ object fMain: TfMain Top = 184 Width = 312 Height = 57 - AutoScroll = False TabOrder = 4 + ExplicitLeft = 12 + ExplicitTop = 184 inherited lcMain: TDKLanguageController LangData = { 18006672466F6E7453657474696E67735F496E74657266616365000103000000 @@ -91,7 +94,7 @@ object fMain: TfMain 4D61696E0000} end end - object cbLanguage: TTntComboBox + object cbLanguage: TComboBox Left = 12 Top = 20 Width = 313 diff --git a/Examples/Frames/Main.pas b/Examples/Frames_VCL/Main.pas similarity index 83% rename from Examples/Frames/Main.pas rename to Examples/Frames_VCL/Main.pas index f8ead07..5c32763 100644 --- a/Examples/Frames/Main.pas +++ b/Examples/Frames_VCL/Main.pas @@ -1,5 +1,5 @@ //********************************************************************************************************************** -// $Id: Main.pas,v 1.5 2006-08-11 12:15:50 dale Exp $ +// $Id: Main.pas,v 1.5 2006/08/11 12:15:50 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright (c)DK Software, http://www.dk-soft.org/ @@ -9,19 +9,19 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, TntForms, - Dialogs, StdCtrls, DKLang, ufrFontSettings, TntStdCtrls; + Windows, Messages, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, DKLang, ufrFontSettings; type - TfMain = class(TTntForm) - bCancel: TTntButton; - bOK: TTntButton; - cbLanguage: TTntComboBox; + TfMain = class(TForm) + bCancel: TButton; + bOK: TButton; + cbLanguage: TComboBox; frFontSettings_Interface: TfrFontSettings; frFontSettings_Table: TfrFontSettings; frFontSettings_Toolbar: TfrFontSettings; lcMain: TDKLanguageController; - lLanguage: TTntLabel; + lLanguage: TLabel; procedure cbLanguageChange(Sender: TObject); procedure FormCreate(Sender: TObject); procedure lcMainLanguageChanged(Sender: TObject); @@ -35,7 +35,7 @@ TfMain = class(TTntForm) implementation {$R *.dfm} -uses TntSystem, TntSysUtils; +uses SysUtils; procedure TfMain.cbLanguageChange(Sender: TObject); var iIndex: Integer; @@ -49,7 +49,7 @@ implementation var i: Integer; begin // Scan for language files in the app directory and register them in the LangManager object - LangManager.ScanForLangFiles(WideExtractFileDir(WideParamStr(0)), '*.lng', False); + LangManager.ScanForLangFiles(ExtractFileDir(ParamStr(0)), '*.lng', False); // Fill cbLanguage with available languages for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNames[i]); // Index=0 always means the default language diff --git a/Examples/Frames/Russian.lng b/Examples/Frames_VCL/Russian.lng similarity index 100% rename from Examples/Frames/Russian.lng rename to Examples/Frames_VCL/Russian.lng diff --git a/Examples/Frames/ufrFontSettings.dfm b/Examples/Frames_VCL/ufrFontSettings.dfm old mode 100755 new mode 100644 similarity index 91% rename from Examples/Frames/ufrFontSettings.dfm rename to Examples/Frames_VCL/ufrFontSettings.dfm index 4d90989..7b52eb1 --- a/Examples/Frames/ufrFontSettings.dfm +++ b/Examples/Frames_VCL/ufrFontSettings.dfm @@ -5,7 +5,7 @@ object frFontSettings: TfrFontSettings Height = 57 AutoScroll = False TabOrder = 0 - object gbMain: TTntGroupBox + object gbMain: TGroupBox Left = 0 Top = 0 Width = 312 @@ -15,7 +15,7 @@ object frFontSettings: TfrFontSettings DesignSize = ( 312 57) - object pSample: TTntPanel + object pSample: TPanel Left = 8 Top = 16 Width = 213 @@ -25,7 +25,7 @@ object frFontSettings: TfrFontSettings Caption = 'This is a sample text' TabOrder = 0 end - object bSelectFont: TTntButton + object bSelectFont: TButton Left = 228 Top = 20 Width = 75 diff --git a/Examples/Frames/ufrFontSettings.pas b/Examples/Frames_VCL/ufrFontSettings.pas old mode 100755 new mode 100644 similarity index 72% rename from Examples/Frames/ufrFontSettings.pas rename to Examples/Frames_VCL/ufrFontSettings.pas index 5c22e37..99d7387 --- a/Examples/Frames/ufrFontSettings.pas +++ b/Examples/Frames_VCL/ufrFontSettings.pas @@ -3,27 +3,27 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, TntForms, - Dialogs, DKLang, StdCtrls, ExtCtrls, TntStdCtrls, TntExtCtrls; + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, DKLang, StdCtrls, ExtCtrls; type - TfrFontSettings = class(TTntFrame) - bSelectFont: TTntButton; - gbMain: TTntGroupBox; + TfrFontSettings = class(TFrame) + bSelectFont: TButton; + gbMain: TGroupBox; lcMain: TDKLanguageController; - pSample: TTntPanel; + pSample: TPanel; procedure bSelectFontClick(Sender: TObject); private // Prop handlers function GetSelectedFont: TFont; - function GetTitle: WideString; + function GetTitle: UnicodeString; procedure SetSelectedFont(Value: TFont); - procedure SetTitle(const Value: WideString); + procedure SetTitle(const Value: UnicodeString); public // Props // -- Frame title, assigned at runtime (we cannot localize it at design time since all of the controllers share the // same translation in this example) - property Title: WideString read GetTitle write SetTitle; + property Title: UnicodeString read GetTitle write SetTitle; // -- A font selected in the editor property SelectedFont: TFont read GetSelectedFont write SetSelectedFont; end; @@ -48,7 +48,7 @@ implementation Result := pSample.Font; end; - function TfrFontSettings.GetTitle: WideString; + function TfrFontSettings.GetTitle: UnicodeString; begin Result := gbMain.Caption; end; @@ -58,7 +58,7 @@ implementation pSample.Font.Assign(Value); end; - procedure TfrFontSettings.SetTitle(const Value: WideString); + procedure TfrFontSettings.SetTitle(const Value: UnicodeString); begin gbMain.Caption := Value; end; diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/AndroidManifest.template.xml b/Examples/LocalFileStorage_FireMonkey_Mobile/AndroidManifest.template.xml new file mode 100644 index 0000000..3dde458 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/AndroidManifest.template.xml @@ -0,0 +1,35 @@ + + + + + + +<%uses-permission%> + + + + + + + + + + + + + + diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.deployproj b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.deployproj new file mode 100644 index 0000000..84d4f38 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.deployproj @@ -0,0 +1,666 @@ + + + + 12 + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\assets\internal\ + Russian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\assets\internal\ + Korean.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\res\drawable-xhdpi\ + ic_launcher.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\res\drawable-ldpi\ + ic_launcher.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\library\lib\armeabi\ + gdbserver + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\res\drawable-mdpi\ + ic_launcher.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\assets\internal\ + Italian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\assets\internal\ + German.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + AndroidManifest.xml + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\classes\ + classes.dex + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\res\drawable-xxhdpi\ + ic_launcher.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\assets\internal\ + Spanish.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + AndroidManifest.xml + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\res\drawable-hdpi\ + ic_launcher.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\assets\internal\ + French.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\library\lib\armeabi\ + libDKLang_LocalFileStorage_FMX_Mobile_Demo.so + 1 + + + True + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\library\lib\armeabi\ + libDKLang_LocalFileStorage_FMX_Mobile_Demo.so + 1 + + + True + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\assets\internal\ + Japanese.lng + 0 + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + ResourceRules.plist + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Russian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Korean.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Italian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + German.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Spanish.lng + 0 + + + + + $(PROJECTNAME).app.dSYM\Contents\Resources\DWARF\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + True + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + French.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Entitlements.plist + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Japanese.lng + 0 + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + Russian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + Korean.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + Italian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + German.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + Spanish.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + French.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo\ + Japanese.lng + 0 + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Contents\MacOS\ + libcgunwind.1.0.dylib + 1 + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_57x57.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + True + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Landscape@2x.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Russian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Korean.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SettingIcon_58x58.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + True + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_114x114.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-568h@2x.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_100x100.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Italian.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Entitlements.plist + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + German.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_144x144.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_50x50.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SettingIcon_29x29.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Portrait@2x.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + libcgunwind.1.0.dylib + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default@2x.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Spanish.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + French.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\Startup\Documents\ + Japanese.lng + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Entitlements.plist + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_72x72.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_29x29.png + 0 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default~ipad.png + 1 + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.app\ + Default-Landscape.png + 1 + + + + + diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dklang b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dklang new file mode 100644 index 0000000..374b939 Binary files /dev/null and b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dklang differ diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dpr b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dpr new file mode 100644 index 0000000..d3bdc74 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dpr @@ -0,0 +1,14 @@ +program DKLang_LocalFileStorage_FMX_Mobile_Demo; + +uses + System.StartUpCopy, + FMX.Forms, + Main in 'Main.pas' {fMain}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TfMain, fMain); + Application.Run; +end. diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dproj b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dproj new file mode 100644 index 0000000..e1012d4 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.dproj @@ -0,0 +1,888 @@ + + + {65B810CC-CD11-449D-ACF2-33C6ED10B8CD} + 15.2 + FMX + DKLang_LocalFileStorage_FMX_Mobile_Demo.dpr + True + Debug + iOSSimulator + 88 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + true + true + true + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + true + true + true + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar + Debug + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + IndyIPClient;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;BeejComponentsXE5;DbxCommonDriver;dbxcds;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;OmniThreadLibraryRuntimeXE5;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;FileStorageBDS_XE5;dklangXE5;FrameViewerXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;ADOX_XE5;RichViewSpellingHunspell_XE5;FireDAC;inet;BeejTmsRvEditLinkXE5;CADSys5_XE5;RESTComponents;dbexpress;$(DCC_UsePackage) + + + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + Debug + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + + + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + + + $(BDS)\bin\default_app.manifest + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + IndyIPClient;JvGlobus;JvMM;tmsdXE5;JvManagedThreads;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;tmswizdXE5;inetdbbde;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;JvNet;BeejComponentsXE5;JvDotNetCtrls;DbxCommonDriver;tdbf;vclimg;dbxcds;gtAdvGridExpD17;MetropolisUILiveTile;JvXPCtrls;vcldb;vcldsnap;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;JvCore;vclribbon;dsnap;IndyIPServer;OmniThreadLibraryRuntimeXE5;fmxase;vcl;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;CodeSiteExpressPkg;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;FileStorageBDS_XE5;JclDeveloperTools;dklangXE5;FrameViewerXE5;JvDocking;adortl;JvWizards;madBasic_;gtRichVwExpD17;FireDACASADriver;JvHMI;bindcompfmx;JvBands;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;madDisAsm_;JvSystem;xmlrtl;svnui;JvTimeFramework;JvControls;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;tmsxlsdXE5;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;ADOX_XE5;FireDACADSDriver;vcltouch;RichViewSpellingHunspell_XE5;madExcept_;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;BeejTmsRvEditLinkXE5;vclx;svn;tmsexdXE5;CADSys5_XE5;fmxdae;RESTComponents;bdertl;VirtualTreesR;dbexpress;FireDACMSAccDriver;JvBDE;$(DCC_UsePackage) + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + +
fMain
+ fmx +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.dpr + + + + + + + + + + + + Default-568h@2x.png + + + + + Default-Portrait@2x.png + + + + + + + + ResourceRules.plist + + + + + + + + assets\internal\ + Russian.lng + + + Startup\Documents\ + Russian.lng + + + Russian.lng + + + Startup\Documents\ + Russian.lng + + + + + assets\internal\ + Korean.lng + + + Startup\Documents\ + Korean.lng + + + Korean.lng + + + Startup\Documents\ + Korean.lng + + + + + Default~ipad.png + + + + + Default.png + + + + + + + + ic_launcher.png + + + + + + + + + + + + + + + + + ic_launcher.png + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + Default-Landscape@2x.png + + + + + ic_launcher.png + + + + + + + + Info.plist + + + + + + + + + + + Info.plist + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + + + + assets\internal\ + Italian.lng + + + Startup\Documents\ + Italian.lng + + + Italian.lng + + + Startup\Documents\ + Italian.lng + + + + + Info.plist + + + + + Entitlements.plist + + + + + assets\internal\ + German.lng + + + Startup\Documents\ + German.lng + + + German.lng + + + Startup\Documents\ + German.lng + + + + + + + + + + + Default-Landscape.png + + + + + Default-Portrait~ipad.png + + + + + + + + classes.dex + + + + + ic_launcher.png + + + + + + + + + Default-Portrait@2x~ipad.png + + + + + assets\internal\ + Spanish.lng + + + Startup\Documents\ + Spanish.lng + + + Spanish.lng + + + Startup\Documents\ + Spanish.lng + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo + + + + + + + + Default-Landscape~ipad.png + + + + + + + + ic_launcher.png + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + Default@2x.png + + + + + assets\internal\ + French.lng + + + Startup\Documents\ + French.lng + + + French.lng + + + Startup\Documents\ + French.lng + + + + + Default-Landscape@2x~ipad.png + + + + + + + + Entitlements.plist + + + + + + + + assets\internal\ + Japanese.lng + + + Startup\Documents\ + Japanese.lng + + + Japanese.lng + + + Startup\Documents\ + Japanese.lng + + + + + Entitlements.plist + + + + + + + + 1 + .dylib + + + 0 + .bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + library\lib\armeabi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xhdpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + Contents\Resources + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + library\lib\armeabi + 1 + + + 0 + + + Contents\MacOS + 1 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + Contents\MacOS + 0 + + + 0 + + + + + 1 + + + 1 + + + + + res\drawable-ldpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + 1 + + + + + + + + + + + True + True + True + False + + + 12 + + + + +
diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.res b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/Examples/LocalFileStorage_FireMonkey_Mobile/DKLang_LocalFileStorage_FMX_Mobile_Demo.res differ diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/French.lng b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/French.lng new file mode 100644 index 0000000..ea1e904 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/French.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: French.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1036 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:26:51 + +[fMain] +00000001=Forme témoin +00000002=C'est un message témoin. +00000003=Annuler + +[$CONSTANTS] diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/German.lng b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/German.lng new file mode 100644 index 0000000..128c2f9 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/German.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: German.lng,v 1.8 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1031 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:26:51 + +[fMain] +00000001=Beispielform +00000002=Das ist eine Beispielmitteilung. +00000003=Abbrechen + +[$CONSTANTS] diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Italian.lng b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Italian.lng new file mode 100644 index 0000000..b5c06b0 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Italian.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Italian.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1040 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:26:51 + +[fMain] +00000001=Forma del campione +00000002=Ciò è un messaggio del campione. +00000003=Annulla + +[$CONSTANTS] diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Japanese.lng b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Japanese.lng new file mode 100644 index 0000000..3e84b1e --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Japanese.lng @@ -0,0 +1,13 @@ +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1041 +Generator=DKLang Translation Editor v3.0 +LastModified=2006-08-02 01:26:30 + +[fMain] +00000001=サンプル形態 +00000002=これはサンプルメッセージである。 +00000003=取り消し + +[$CONSTANTS] diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Korean.lng b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Korean.lng new file mode 100644 index 0000000..0653643 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Korean.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Korean.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1042 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:18:27 + +[fMain] +00000001=견본 모양 +00000002=이것은 견본 메시지이다. +00000003=취소 + +[$CONSTANTS] diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Russian.lng b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Russian.lng new file mode 100644 index 0000000..38c2b46 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Russian.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Russian.lng,v 1.7 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1049 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:18:27 + +[fMain] +00000001=Форма-пример +00000002=Это пример сообщения. +00000003=Отмена + +[$CONSTANTS] diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Spanish.lng b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Spanish.lng new file mode 100644 index 0000000..44ac077 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/LangFiles/Spanish.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Spanish.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=3082 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:18:27 + +[fMain] +00000001=Forma de la muestra +00000002=Esto es un mensaje de la muestra. +00000003=Cancelar + +[$CONSTANTS] diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/Main.fmx b/Examples/LocalFileStorage_FireMonkey_Mobile/Main.fmx new file mode 100644 index 0000000..2ca2c12 --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/Main.fmx @@ -0,0 +1,52 @@ +object fMain: TfMain + Left = 0 + Top = 0 + Caption = 'Form2' + ClientHeight = 567 + ClientWidth = 384 + FormFactor.Width = 320 + FormFactor.Height = 480 + FormFactor.Devices = [dkDesktop] + OnCreate = FormCreate + DesignerMobile = True + DesignerWidth = 384 + DesignerHeight = 592 + DesignerDeviceName = 'Google Nexus 4' + DesignerOrientation = 0 + DesignerOSVersion = '' + object cbLanguage: TComboBox + Align = alTop + DisableFocusEffect = False + Height = 32.000000000000000000 + TabOrder = 0 + Width = 384.000000000000000000 + OnChange = cbLanguageChange + end + object lSampleMessage: TLabel + Height = 23.000000000000000000 + Position.X = 8.000000000000000000 + Position.Y = 64.000000000000000000 + Text = 'This is a sample message.' + Width = 361.000000000000000000 + Trimming = ttCharacter + end + object bCancel: TButton + Default = True + Height = 44.000000000000000000 + Position.X = 80.000000000000000000 + Position.Y = 128.000000000000000000 + TabOrder = 2 + Text = 'Cancel' + Trimming = ttCharacter + Width = 201.000000000000000000 + end + object lcMain: TDKLanguageController + Left = 280 + Top = 440 + LangData = { + 0500664D61696E010100000001000000070043617074696F6E01040000000A00 + 63624C616E677561676500000E006C53616D706C654D65737361676501010000 + 00020000000400546578740007006243616E63656C0101000000030000000400 + 546578740006006C734D61696E0000} + end +end diff --git a/Examples/LocalFileStorage_FireMonkey_Mobile/Main.pas b/Examples/LocalFileStorage_FireMonkey_Mobile/Main.pas new file mode 100644 index 0000000..169ccdf --- /dev/null +++ b/Examples/LocalFileStorage_FireMonkey_Mobile/Main.pas @@ -0,0 +1,60 @@ +unit Main; + +interface + +uses + System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, + FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, DKLang, + FMX.StdCtrls, FMX.ListBox, FMX.Layouts, FMX.Memo; + +type + TfMain = class(TForm) + cbLanguage: TComboBox; + lSampleMessage: TLabel; + bCancel: TButton; + lcMain: TDKLanguageController; + procedure cbLanguageChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + fMain: TfMain; + +implementation + +uses + System.IOUtils; // for TPath + +{$R *.fmx} + +procedure TfMain.cbLanguageChange(Sender: TObject); +var iIndex: Integer; +begin + iIndex := cbLanguage.ItemIndex; + if iIndex<0 then iIndex := 0; // When there's no valid selection in cbLanguage we use the default language (Index=0) + LangManager.LanguageID := LangManager.LanguageIDs[iIndex]; +end; + +procedure TfMain.FormCreate(Sender: TObject); + var i: Integer; + begin + // the language files are added by including them with the Deployment Manager via Projects|Deployment + // Remote path: + // iOS: Startup\Documents\ + // android: assets\internal\ + + + // Scan for language files in the local documents directory and register them in the LangManager object + LangManager.ScanForLangFiles(TPath.GetDocumentsPath, '*.lng', False); + + // Fill cbLanguage with available languages + for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNativeNames[i]); + // Index=0 always means the default language + cbLanguage.ItemIndex := 0; + end; + +end. diff --git a/Examples/MDI/DKLang_MDI_Demo.cfg b/Examples/MDI/DKLang_MDI_Demo.cfg deleted file mode 100755 index 45f0861..0000000 --- a/Examples/MDI/DKLang_MDI_Demo.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Examples/MDI/DKLang_MDI_Demo.dklang b/Examples/MDI/DKLang_MDI_Demo.dklang deleted file mode 100644 index be41322..0000000 --- a/Examples/MDI/DKLang_MDI_Demo.dklang +++ /dev/null @@ -1,10 +0,0 @@ -[fMain] -Caption=00000001,Sample MDI Application -bNewWindow.Caption=00000002,&New window -bTile.Caption=00000003,&Tile -bCascade.Caption=00000004,&Cascade - -[fMDIChild] -bCancel.Caption=00000003,Cancel -lSampleMessage.Caption=00000004,This is a sample message. - diff --git a/Examples/MDI/DKLang_MDI_Demo.dof b/Examples/MDI/DKLang_MDI_Demo.dof deleted file mode 100755 index c18dd98..0000000 --- a/Examples/MDI/DKLang_MDI_Demo.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOfficeXP;GR32_DSGN_D7;GR32_D7;tb2k_d7;tbx_d7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Examples/MDI/DKLang_MDI_Demo.res b/Examples/MDI/DKLang_MDI_Demo.res deleted file mode 100755 index 1228533..0000000 Binary files a/Examples/MDI/DKLang_MDI_Demo.res and /dev/null differ diff --git a/Examples/MDI/DKLang_MDI_Demo.dpr b/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.dpr old mode 100755 new mode 100644 similarity index 96% rename from Examples/MDI/DKLang_MDI_Demo.dpr rename to Examples/MDI_VCL/DKLang_MDI_VCL_Demo.dpr index 114bc5f..3b46ffc --- a/Examples/MDI/DKLang_MDI_Demo.dpr +++ b/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.dpr @@ -4,7 +4,7 @@ // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** -program DKLang_MDI_Demo; +program DKLang_MDI_VCL_Demo; uses Forms, diff --git a/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.dproj b/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.dproj new file mode 100644 index 0000000..003f1e1 --- /dev/null +++ b/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.dproj @@ -0,0 +1,171 @@ + + + {9CC65756-438D-4595-A369-596DB5297907} + DKLang_MDI_VCL_Demo.dpr + Debug + DCC32 + 15.2 + VCL + True + Win64 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + .\$(Platform)\$(Config) + $(Platform)\$(Config)\ + $(BDS)\bin\default_app.manifest + 1049 + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + DKLang_MDI_Demo_Icon.ico + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + DKLang_MDI_Demo.exe + 00400000 + vcl;rtl;vclx;vclactnband;xmlrtl;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;vclribbon;vclAbsDBd12;$(DCC_UsePackage) + x86 + + + 1033 + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + 1033 + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + DEBUG;$(DCC_Define) + + + 1033 + true + + + true + 1033 + + + + MainSource + + +
fMain
+
+ +
fMDIChild
+
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DKLang_MDI_VCL_Demo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + False + True + True + + + 12 + + +
diff --git a/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.res b/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.res new file mode 100644 index 0000000..0f3facb Binary files /dev/null and b/Examples/MDI_VCL/DKLang_MDI_VCL_Demo.res differ diff --git a/Examples/MDI/German.lng b/Examples/MDI_VCL/German.lng similarity index 100% rename from Examples/MDI/German.lng rename to Examples/MDI_VCL/German.lng diff --git a/Examples/MDI/Main.dfm b/Examples/MDI_VCL/Main.dfm similarity index 89% rename from Examples/MDI/Main.dfm rename to Examples/MDI_VCL/Main.dfm index a153215..867c881 100644 --- a/Examples/MDI/Main.dfm +++ b/Examples/MDI_VCL/Main.dfm @@ -1,9 +1,9 @@ object fMain: TfMain Left = 438 Top = 199 - Width = 469 - Height = 324 Caption = 'Sample MDI Application' + ClientHeight = 290 + ClientWidth = 461 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -16,7 +16,7 @@ object fMain: TfMain OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 - object pTop: TTntPanel + object pTop: TPanel Left = 0 Top = 0 Width = 461 @@ -26,7 +26,7 @@ object fMain: TfMain DesignSize = ( 461 61) - object cbLanguage: TTntComboBox + object cbLanguage: TComboBox Left = 4 Top = 4 Width = 453 @@ -37,7 +37,7 @@ object fMain: TfMain TabOrder = 0 OnChange = cbLanguageChange end - object bNewWindow: TTntButton + object bNewWindow: TButton Left = 4 Top = 32 Width = 75 @@ -46,7 +46,7 @@ object fMain: TfMain TabOrder = 1 OnClick = bNewWindowClick end - object bTile: TTntButton + object bTile: TButton Left = 84 Top = 32 Width = 75 @@ -55,7 +55,7 @@ object fMain: TfMain TabOrder = 2 OnClick = bTileClick end - object bCascade: TTntButton + object bCascade: TButton Left = 164 Top = 32 Width = 75 diff --git a/Examples/MDI/Main.pas b/Examples/MDI_VCL/Main.pas similarity index 78% rename from Examples/MDI/Main.pas rename to Examples/MDI_VCL/Main.pas index 1803f15..fed4b84 100644 --- a/Examples/MDI/Main.pas +++ b/Examples/MDI_VCL/Main.pas @@ -1,5 +1,5 @@ //********************************************************************************************************************** -// $Id: Main.pas,v 1.5 2006-08-11 12:15:50 dale Exp $ +// $Id: Main.pas,v 1.5 2006/08/11 12:15:50 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright (c)DK Software, http://www.dk-soft.org/ @@ -9,17 +9,17 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, TntForms, - DKLang, StdCtrls, TntStdCtrls, ExtCtrls, TntExtCtrls; + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, + DKLang, StdCtrls, ExtCtrls; type - TfMain = class(TTntForm) - bCascade: TTntButton; - bNewWindow: TTntButton; - bTile: TTntButton; - cbLanguage: TTntComboBox; + TfMain = class(TForm) + bCascade: TButton; + bNewWindow: TButton; + bTile: TButton; + cbLanguage: TComboBox; lcMain: TDKLanguageController; - pTop: TTntPanel; + pTop: TPanel; procedure bCascadeClick(Sender: TObject); procedure bNewWindowClick(Sender: TObject); procedure bTileClick(Sender: TObject); @@ -32,7 +32,7 @@ TfMain = class(TTntForm) implementation {$R *.dfm} -uses TntSystem, TntSysUtils, ufMDIChild; +uses ufMDIChild; procedure TfMain.bCascadeClick(Sender: TObject); begin @@ -53,7 +53,7 @@ implementation var iIndex: Integer; begin iIndex := cbLanguage.ItemIndex; - if iIndex<0 then iIndex := 0; // When there's no valid selection in cbLanguage we use the default language (Index=0) + if iIndex<0 then iIndex := 0; // When there's no valid selection in cbLanguage we use the default language (Index=0) LangManager.LanguageID := LangManager.LanguageIDs[iIndex]; end; @@ -61,7 +61,7 @@ implementation var i: Integer; begin // Scan for language files in the app directory and register them in the LangManager object - LangManager.ScanForLangFiles(WideExtractFileDir(WideParamStr(0)), '*.lng', False); + LangManager.ScanForLangFiles(ExtractFileDir(ParamStr(0)), '*.lng', False); // Fill cbLanguage with available languages for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNames[i]); // Index=0 always means the default language diff --git a/Examples/MDI/Russian.lng b/Examples/MDI_VCL/Russian.lng similarity index 100% rename from Examples/MDI/Russian.lng rename to Examples/MDI_VCL/Russian.lng diff --git a/Examples/MDI/ufMDIChild.dfm b/Examples/MDI_VCL/ufMDIChild.dfm similarity index 93% rename from Examples/MDI/ufMDIChild.dfm rename to Examples/MDI_VCL/ufMDIChild.dfm index f6e0bfe..f967756 100644 --- a/Examples/MDI/ufMDIChild.dfm +++ b/Examples/MDI_VCL/ufMDIChild.dfm @@ -18,14 +18,14 @@ object fMDIChild: TfMDIChild OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 - object lSampleMessage: TTntLabel + object lSampleMessage: TLabel Left = 12 Top = 12 Width = 123 Height = 13 Caption = 'This is a sample message.' end - object bCancel: TTntButton + object bCancel: TButton Left = 104 Top = 76 Width = 75 @@ -45,3 +45,4 @@ object fMDIChild: TfMDIChild 000004000000070043617074696F6E00} end end + diff --git a/Examples/MDI/ufMDIChild.pas b/Examples/MDI_VCL/ufMDIChild.pas old mode 100755 new mode 100644 similarity index 73% rename from Examples/MDI/ufMDIChild.pas rename to Examples/MDI_VCL/ufMDIChild.pas index 5d3a35f..9b3a2bd --- a/Examples/MDI/ufMDIChild.pas +++ b/Examples/MDI_VCL/ufMDIChild.pas @@ -1,5 +1,5 @@ //********************************************************************************************************************** -// $Id: ufMDIChild.pas,v 1.3 2006-08-05 21:42:34 dale Exp $ +// $Id: ufMDIChild.pas,v 1.3 2006/08/05 21:42:34 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright (c)DK Software, http://www.dk-soft.org/ @@ -10,14 +10,14 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, TntForms, - DKLang, StdCtrls, TntStdCtrls; + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, + DKLang, StdCtrls; type - TfMDIChild = class(TTntForm) - bCancel: TTntButton; + TfMDIChild = class(TForm) + bCancel: TButton; lcMain: TDKLanguageController; - lSampleMessage: TTntLabel; + lSampleMessage: TLabel; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); end; diff --git a/Examples/Notepad/DKLang_Notepad_Demo.cfg b/Examples/Notepad/DKLang_Notepad_Demo.cfg deleted file mode 100644 index 45f0861..0000000 --- a/Examples/Notepad/DKLang_Notepad_Demo.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Examples/Notepad/DKLang_Notepad_Demo.dklang b/Examples/Notepad/DKLang_Notepad_Demo.dklang deleted file mode 100644 index 84a8d8c..0000000 --- a/Examples/Notepad/DKLang_Notepad_Demo.dklang +++ /dev/null @@ -1,79 +0,0 @@ -[$CONSTANTS] -SApplicationName=Notepad -SCopyright=Copyright ©2002-2006 Dmitry Kann, http://www.dk-soft.org/ -SDefaultFileName=untitled.txt -SDlgTitle_About=About -SDlgTitle_GoToLine=Go to line -SDlgTitle_Warning=Warning -SGoToLinePrompt=&Line number: -SMsg_ConfirmFileDiscard=File "%s" was modified but not saved. Do you wish to save it? - -[fMain] -smFile.Caption=00000002,&File -smEdit.Caption=00000003,&Edit -smFormat.Caption=00000004,Fo&rmat -smView.Caption=00000005,&View -smHelp.Caption=00000006,&Help -aFileNew.Caption=00000008,&New -aFileNew.Category=00000007,File -aFileNew.Hint=00000009,New|Clear editor contents -aFileOpen.Caption=00000011,&Open... -aFileOpen.Category=00000010,File -aFileOpen.Hint=00000012,Open...|Open an existing file -aFileSave.Caption=00000014,&Save -aFileSave.Category=00000013,File -aFileSave.Hint=00000015,Save|Save the text into the current file -aFileSaveAs.Caption=00000017,Save &as... -aFileSaveAs.Category=00000016,File -aFileSaveAs.Hint=00000018,Save as...|Save the text into another file -aFileExit.Caption=00000020,E&xit -aFileExit.Category=00000019,File -aFileExit.Hint=00000021,Exit|Exit the program -aEditUndo.Caption=00000023,&Undo -aEditUndo.Category=00000022,Edit -aEditUndo.Hint=00000024,Undo|Undo or redo the last change -aEditCut.Caption=00000027,&Cut -aEditCut.Category=00000026,Edit -aEditCut.Hint=00000028,Cut|Cut selected text into the clipboard -aEditCopy.Caption=00000031,Cop&y -aEditCopy.Category=00000030,Edit -aEditCopy.Hint=00000032,Copy|Copy selected text into the clipboard -aEditPaste.Caption=00000035,&Paste -aEditPaste.Category=00000034,Edit -aEditPaste.Hint=00000036,Paste|Paste text from the clipboard -aEditFind.Caption=00000039,&Find... -aEditFind.Category=00000038,Edit -aEditFind.Hint=00000040,Find...|Open Find text dialog -aEditFindNext.Caption=00000042,Find &next -aEditFindNext.Category=00000041,Edit -aEditFindNext.Hint=00000043,Find next|Repeat the last search -aEditReplace.Caption=00000045,&Replace... -aEditReplace.Category=00000044,Edit -aEditReplace.Hint=00000046,Replace...|Open Replace text dialog -aEditGoToLine.Caption=00000048,&Go to line... -aEditGoToLine.Category=00000047,Edit -aEditGoToLine.Hint=00000049,Go to line...|Locate a particular text line -aEditSelectAll.Caption=00000051,&Select all -aEditSelectAll.Category=00000050,Edit -aEditSelectAll.Hint=00000052,Select all|Select the whole text -aEditDateAndTime.Caption=00000054,&Date and time -aEditDateAndTime.Category=00000053,Edit -aEditDateAndTime.Hint=00000055,Date and time|Paste current date and time -aFormatWordWrap.Caption=00000057,&Word wrap -aFormatWordWrap.Category=00000056,Format -aFormatWordWrap.Hint=00000058,Word wrap|Toggle word wrap -aFormatFont.Caption=00000060,&Font... -aFormatFont.Category=00000059,Format -aFormatFont.Hint=00000061,Font...|Select editor font -aViewStatusBar.Caption=00000063,&Status bar -aViewStatusBar.Category=00000062,View -aViewStatusBar.Hint=00000064,Status bar|Toggle the status bar -aHelpAbout.Caption=00000066,&About... -aHelpAbout.Category=00000065,Help -aHelpAbout.Hint=00000067,About...|Show version and copyright info -odMain.Filter=00000069,Text files (*.txt;*.log)|*.txt;*.log|All files (*.*)|*.* -odMain.Title=00000070,Select a file to open -sdMain.Filter=00000072,ANSI text files (*.txt)|*.txt|Unicode text files (*.txt)|*.txt -sdMain.Title=00000073,Select a file to save to -smViewLanguage.Caption=00000074,&Language - diff --git a/Examples/Notepad/DKLang_Notepad_Demo.dof b/Examples/Notepad/DKLang_Notepad_Demo.dof deleted file mode 100644 index c18dd98..0000000 --- a/Examples/Notepad/DKLang_Notepad_Demo.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOfficeXP;GR32_DSGN_D7;GR32_D7;tb2k_d7;tbx_d7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Examples/Notepad/DKLang_Notepad_Demo.res b/Examples/Notepad/DKLang_Notepad_Demo.res deleted file mode 100644 index 1228533..0000000 Binary files a/Examples/Notepad/DKLang_Notepad_Demo.res and /dev/null differ diff --git a/Examples/Notepad/DKLang_Notepad_Demo.dkl_const.res b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dkl_const.res similarity index 100% rename from Examples/Notepad/DKLang_Notepad_Demo.dkl_const.res rename to Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dkl_const.res diff --git a/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dklang b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dklang new file mode 100644 index 0000000..5c8355f Binary files /dev/null and b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dklang differ diff --git a/Examples/Notepad/DKLang_Notepad_Demo.dpr b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dpr similarity index 95% rename from Examples/Notepad/DKLang_Notepad_Demo.dpr rename to Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dpr index ba392b4..aeeae9e 100644 --- a/Examples/Notepad/DKLang_Notepad_Demo.dpr +++ b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dpr @@ -4,7 +4,7 @@ // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** -program DKLang_Notepad_Demo; +program DKLang_Notepad_VCL_Demo; uses Forms, diff --git a/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dproj b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dproj new file mode 100644 index 0000000..e9bc862 --- /dev/null +++ b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.dproj @@ -0,0 +1,167 @@ + + + {A124F761-3C31-4F27-9F95-30963F72A8F9} + DKLang_Notepad_VCL_Demo.dpr + Debug + DCC32 + 15.2 + VCL + True + Win64 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + .\$(Platform)\$(Config) + $(Platform)\$(Config)\ + $(BDS)\bin\default_app.manifest + 1049 + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + DKLang_Notepad_Demo.exe + 00400000 + vcl;rtl;vclx;vclactnband;xmlrtl;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;vclribbon;vclAbsDBd12;$(DCC_UsePackage) + x86 + + + $(BDS)\bin\delphi_PROJECTICON.ico + 1033 + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + true + + + $(BDS)\bin\delphi_PROJECTICON.ico + 1033 + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + true + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + DEBUG;$(DCC_Define) + + + 1033 + true + + + true + 1033 + + + + MainSource + + +
fMain
+
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DKLang_Notepad_VCL_Demo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + False + True + True + + + 12 + + +
diff --git a/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.res b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.res new file mode 100644 index 0000000..0f3facb Binary files /dev/null and b/Examples/Notepad_VCL/DKLang_Notepad_VCL_Demo.res differ diff --git a/Examples/Notepad_VCL/Dutch.lng b/Examples/Notepad_VCL/Dutch.lng new file mode 100644 index 0000000..3b7de38 Binary files /dev/null and b/Examples/Notepad_VCL/Dutch.lng differ diff --git a/Examples/Notepad/Main.dfm b/Examples/Notepad_VCL/Main.dfm similarity index 82% rename from Examples/Notepad/Main.dfm rename to Examples/Notepad_VCL/Main.dfm index 426e9f4..36afc63 100644 --- a/Examples/Notepad/Main.dfm +++ b/Examples/Notepad_VCL/Main.dfm @@ -1,9 +1,9 @@ object fMain: TfMain Left = 321 Top = 170 - Width = 640 - Height = 464 Caption = '<>' + ClientHeight = 430 + ClientWidth = 632 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -13,24 +13,24 @@ object fMain: TfMain Menu = mmMain OldCreateOrder = False Position = poScreenCenter - OnCloseQuery = TntFormCloseQuery - OnCreate = TntFormCreate + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 - object TheStatusBar: TTntStatusBar + object TheStatusBar: TStatusBar Left = 0 - Top = 396 + Top = 411 Width = 632 Height = 19 AutoHint = True Panels = <> SimplePanel = True end - object mMain: TTntMemo + object mMain: TMemo Left = 0 Top = 0 Width = 632 - Height = 396 + Height = 411 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -43,234 +43,234 @@ object fMain: TfMain WordWrap = False OnChange = UpdateStateNotify end - object mmMain: TTntMainMenu + object mmMain: TMainMenu Left = 108 Top = 32 - object smFile: TTntMenuItem + object smFile: TMenuItem Caption = '&File' - object iFileNew: TTntMenuItem + object iFileNew: TMenuItem Action = aFileNew end - object iFileOpen: TTntMenuItem + object iFileOpen: TMenuItem Action = aFileOpen end - object iFileSave: TTntMenuItem + object iFileSave: TMenuItem Action = aFileSave end - object iFileSaveAs: TTntMenuItem + object iFileSaveAs: TMenuItem Action = aFileSaveAs end - object iSepFileExit: TTntMenuItem + object iSepFileExit: TMenuItem Caption = '-' end - object iFileExit: TTntMenuItem + object iFileExit: TMenuItem Action = aFileExit end end - object smEdit: TTntMenuItem + object smEdit: TMenuItem Caption = '&Edit' - object iEditUndo: TTntMenuItem + object iEditUndo: TMenuItem Action = aEditUndo end - object iSepEditCut: TTntMenuItem + object iSepEditCut: TMenuItem Caption = '-' end - object iEditCut: TTntMenuItem + object iEditCut: TMenuItem Action = aEditCut end - object iEditCopy: TTntMenuItem + object iEditCopy: TMenuItem Action = aEditCopy end - object iEditPaste: TTntMenuItem + object iEditPaste: TMenuItem Action = aEditPaste end - object iSepEditFind: TTntMenuItem + object iSepEditFind: TMenuItem Caption = '-' end - object iEditFind: TTntMenuItem + object iEditFind: TMenuItem Action = aEditFind end - object iEditFindNext: TTntMenuItem + object iEditFindNext: TMenuItem Action = aEditFindNext end - object iEditReplace: TTntMenuItem + object iEditReplace: TMenuItem Action = aEditReplace end - object iEditGoToLine: TTntMenuItem + object iEditGoToLine: TMenuItem Action = aEditGoToLine end - object iSepEditSelectAll: TTntMenuItem + object iSepEditSelectAll: TMenuItem Caption = '-' end - object iEditSelectAll: TTntMenuItem + object iEditSelectAll: TMenuItem Action = aEditSelectAll end - object iEditDateAndTime: TTntMenuItem + object iEditDateAndTime: TMenuItem Action = aEditDateAndTime end end - object smFormat: TTntMenuItem + object smFormat: TMenuItem Caption = 'Fo&rmat' - object iFormatWordWrap: TTntMenuItem + object iFormatWordWrap: TMenuItem Action = aFormatWordWrap end - object iFormatFont: TTntMenuItem + object iFormatFont: TMenuItem Action = aFormatFont end end - object smView: TTntMenuItem + object smView: TMenuItem Caption = '&View' - object iViewStatusBar: TTntMenuItem + object iViewStatusBar: TMenuItem Action = aViewStatusBar end - object iSepViewLanguage: TTntMenuItem + object iSepViewLanguage: TMenuItem Caption = '-' end - object smViewLanguage: TTntMenuItem + object smViewLanguage: TMenuItem Caption = '&Language' end end - object smHelp: TTntMenuItem + object smHelp: TMenuItem Caption = '&Help' - object iHelpAbout: TTntMenuItem + object iHelpAbout: TMenuItem Action = aHelpAbout end end end - object alMain: TTntActionList + object alMain: TActionList Left = 68 Top = 32 - object aFileNew: TTntAction + object aFileNew: TAction Category = 'File' Caption = '&New' Hint = 'New|Clear editor contents' ShortCut = 16462 OnExecute = aFileNewExecute end - object aFileOpen: TTntAction + object aFileOpen: TAction Category = 'File' Caption = '&Open...' Hint = 'Open...|Open an existing file' ShortCut = 16463 OnExecute = aFileOpenExecute end - object aFileSave: TTntAction + object aFileSave: TAction Category = 'File' Caption = '&Save' Hint = 'Save|Save the text into the current file' ShortCut = 16467 OnExecute = aFileSaveExecute end - object aFileSaveAs: TTntAction + object aFileSaveAs: TAction Category = 'File' Caption = 'Save &as...' Hint = 'Save as...|Save the text into another file' ShortCut = 123 OnExecute = aFileSaveAsExecute end - object aFileExit: TTntAction + object aFileExit: TAction Category = 'File' Caption = 'E&xit' Hint = 'Exit|Exit the program' OnExecute = aFileExitExecute end - object aEditUndo: TTntAction + object aEditUndo: TAction Category = 'Edit' Caption = '&Undo' Hint = 'Undo|Undo or redo the last change' - ShortCut = 16474 SecondaryShortCuts.Strings = ( 'Alt+Backspace') + ShortCut = 16474 OnExecute = aEditUndoExecute end - object aEditCut: TTntAction + object aEditCut: TAction Category = 'Edit' Caption = '&Cut' Hint = 'Cut|Cut selected text into the clipboard' - ShortCut = 16472 SecondaryShortCuts.Strings = ( 'Shift+Del') + ShortCut = 16472 OnExecute = aEditCutExecute end - object aEditCopy: TTntAction + object aEditCopy: TAction Category = 'Edit' Caption = 'Cop&y' Hint = 'Copy|Copy selected text into the clipboard' - ShortCut = 16451 SecondaryShortCuts.Strings = ( 'Ctrl+Ins') + ShortCut = 16451 OnExecute = aEditCopyExecute end - object aEditPaste: TTntAction + object aEditPaste: TAction Category = 'Edit' Caption = '&Paste' Hint = 'Paste|Paste text from the clipboard' - ShortCut = 16470 SecondaryShortCuts.Strings = ( 'Shift+Ins') + ShortCut = 16470 OnExecute = aEditPasteExecute end - object aEditFind: TTntAction + object aEditFind: TAction Category = 'Edit' Caption = '&Find...' Hint = 'Find...|Open Find text dialog' ShortCut = 16454 OnExecute = aEditFindExecute end - object aEditFindNext: TTntAction + object aEditFindNext: TAction Category = 'Edit' Caption = 'Find &next' Hint = 'Find next|Repeat the last search' ShortCut = 114 OnExecute = aEditFindNextExecute end - object aEditReplace: TTntAction + object aEditReplace: TAction Category = 'Edit' Caption = '&Replace...' Hint = 'Replace...|Open Replace text dialog' ShortCut = 16456 OnExecute = aEditReplaceExecute end - object aEditGoToLine: TTntAction + object aEditGoToLine: TAction Category = 'Edit' Caption = '&Go to line...' Hint = 'Go to line...|Locate a particular text line' ShortCut = 16455 OnExecute = aEditGoToLineExecute end - object aEditSelectAll: TTntAction + object aEditSelectAll: TAction Category = 'Edit' Caption = '&Select all' Hint = 'Select all|Select the whole text' ShortCut = 16449 OnExecute = aEditSelectAllExecute end - object aEditDateAndTime: TTntAction + object aEditDateAndTime: TAction Category = 'Edit' Caption = '&Date and time' Hint = 'Date and time|Paste current date and time' ShortCut = 116 OnExecute = aEditDateAndTimeExecute end - object aFormatWordWrap: TTntAction + object aFormatWordWrap: TAction Category = 'Format' Caption = '&Word wrap' Hint = 'Word wrap|Toggle word wrap' OnExecute = aFormatWordWrapExecute end - object aFormatFont: TTntAction + object aFormatFont: TAction Category = 'Format' Caption = '&Font...' Hint = 'Font...|Select editor font' OnExecute = aFormatFontExecute end - object aViewStatusBar: TTntAction + object aViewStatusBar: TAction Category = 'View' Caption = '&Status bar' Hint = 'Status bar|Toggle the status bar' OnExecute = aViewStatusBarExecute end - object aHelpAbout: TTntAction + object aHelpAbout: TAction Category = 'Help' Caption = '&About...' Hint = 'About...|Show version and copyright info' @@ -278,7 +278,7 @@ object fMain: TfMain OnExecute = aHelpAboutExecute end end - object odMain: TTntOpenDialog + object odMain: TOpenDialog DefaultExt = 'txt' Filter = 'Text files (*.txt;*.log)|*.txt;*.log|All files (*.*)|*.*' Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing] @@ -286,7 +286,7 @@ object fMain: TfMain Left = 152 Top = 32 end - object sdMain: TTntSaveDialog + object sdMain: TSaveDialog DefaultExt = 'txt' Filter = 'ANSI text files (*.txt)|*.txt|Unicode text files (*.txt)|*.txt' Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing] diff --git a/Examples/Notepad/Main.pas b/Examples/Notepad_VCL/Main.pas similarity index 63% rename from Examples/Notepad/Main.pas rename to Examples/Notepad_VCL/Main.pas index f753e43..760c6b1 100644 --- a/Examples/Notepad/Main.pas +++ b/Examples/Notepad_VCL/Main.pas @@ -1,79 +1,76 @@ //********************************************************************************************************************** -// $Id: Main.pas,v 1.3 2006-08-22 13:17:35 dale Exp $ +// $Id: Main.pas,v 1.3 2006/08/22 13:17:35 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** unit Main; -{$INCLUDE TntCompilers.inc} - interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, TntForms, - StdCtrls, DKLang, TntDialogs, ActnList, TntActnList, Menus, TntMenus, - TntStdCtrls, ComCtrls, TntComCtrls; + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + StdCtrls, DKLang, Dialogs, ActnList, Menus, ComCtrls, System.Actions; type - TfMain = class(TTntForm) - aEditCopy: TTntAction; - aEditCut: TTntAction; - aEditDateAndTime: TTntAction; - aEditFind: TTntAction; - aEditFindNext: TTntAction; - aEditGoToLine: TTntAction; - aEditPaste: TTntAction; - aEditReplace: TTntAction; - aEditSelectAll: TTntAction; - aEditUndo: TTntAction; - aFileExit: TTntAction; - aFileNew: TTntAction; - aFileOpen: TTntAction; - aFileSave: TTntAction; - aFileSaveAs: TTntAction; - aFormatFont: TTntAction; - aFormatWordWrap: TTntAction; - aHelpAbout: TTntAction; - alMain: TTntActionList; - aViewStatusBar: TTntAction; + TfMain = class(TForm) + aEditCopy: TAction; + aEditCut: TAction; + aEditDateAndTime: TAction; + aEditFind: TAction; + aEditFindNext: TAction; + aEditGoToLine: TAction; + aEditPaste: TAction; + aEditReplace: TAction; + aEditSelectAll: TAction; + aEditUndo: TAction; + aFileExit: TAction; + aFileNew: TAction; + aFileOpen: TAction; + aFileSave: TAction; + aFileSaveAs: TAction; + aFormatFont: TAction; + aFormatWordWrap: TAction; + aHelpAbout: TAction; + alMain: TActionList; + aViewStatusBar: TAction; dklcMain: TDKLanguageController; fdMain: TFontDialog; - iEditCopy: TTntMenuItem; - iEditCut: TTntMenuItem; - iEditDateAndTime: TTntMenuItem; - iEditFind: TTntMenuItem; - iEditFindNext: TTntMenuItem; - iEditGoToLine: TTntMenuItem; - iEditPaste: TTntMenuItem; - iEditReplace: TTntMenuItem; - iEditSelectAll: TTntMenuItem; - iEditUndo: TTntMenuItem; - iFileExit: TTntMenuItem; - iFileNew: TTntMenuItem; - iFileOpen: TTntMenuItem; - iFileSave: TTntMenuItem; - iFileSaveAs: TTntMenuItem; - iFormatFont: TTntMenuItem; - iFormatWordWrap: TTntMenuItem; - iHelpAbout: TTntMenuItem; - iSepEditCut: TTntMenuItem; - iSepEditFind: TTntMenuItem; - iSepEditSelectAll: TTntMenuItem; - iSepFileExit: TTntMenuItem; - iSepViewLanguage: TTntMenuItem; - iViewStatusBar: TTntMenuItem; - mMain: TTntMemo; - mmMain: TTntMainMenu; - odMain: TTntOpenDialog; - sdMain: TTntSaveDialog; - smEdit: TTntMenuItem; - smFile: TTntMenuItem; - smFormat: TTntMenuItem; - smHelp: TTntMenuItem; - smView: TTntMenuItem; - smViewLanguage: TTntMenuItem; - TheStatusBar: TTntStatusBar; + iEditCopy: TMenuItem; + iEditCut: TMenuItem; + iEditDateAndTime: TMenuItem; + iEditFind: TMenuItem; + iEditFindNext: TMenuItem; + iEditGoToLine: TMenuItem; + iEditPaste: TMenuItem; + iEditReplace: TMenuItem; + iEditSelectAll: TMenuItem; + iEditUndo: TMenuItem; + iFileExit: TMenuItem; + iFileNew: TMenuItem; + iFileOpen: TMenuItem; + iFileSave: TMenuItem; + iFileSaveAs: TMenuItem; + iFormatFont: TMenuItem; + iFormatWordWrap: TMenuItem; + iHelpAbout: TMenuItem; + iSepEditCut: TMenuItem; + iSepEditFind: TMenuItem; + iSepEditSelectAll: TMenuItem; + iSepFileExit: TMenuItem; + iSepViewLanguage: TMenuItem; + iViewStatusBar: TMenuItem; + mMain: TMemo; + mmMain: TMainMenu; + odMain: TOpenDialog; + sdMain: TSaveDialog; + smEdit: TMenuItem; + smFile: TMenuItem; + smFormat: TMenuItem; + smHelp: TMenuItem; + smView: TMenuItem; + smViewLanguage: TMenuItem; + TheStatusBar: TStatusBar; procedure aEditCopyExecute(Sender: TObject); procedure aEditCutExecute(Sender: TObject); procedure aEditDateAndTimeExecute(Sender: TObject); @@ -93,30 +90,28 @@ TfMain = class(TTntForm) procedure aFormatWordWrapExecute(Sender: TObject); procedure aHelpAboutExecute(Sender: TObject); procedure aViewStatusBarExecute(Sender: TObject); - procedure TntFormCreate(Sender: TObject); - procedure TntFormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure FormCreate(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure UpdateStateNotify(Sender: TObject); private - // True if open file is Unicode - FIsUnicodeFile: Boolean; // Prop storage - FFileName: WideString; + FFileName: UnicodeString; // Updates form interface procedure UpdateState; // Language item click handler procedure LanguageItemClick(Sender: TObject); // Loads the specified file - procedure DoLoadFile(const wsFileName: WideString); + procedure DoLoadFile(const wsFileName: UnicodeString); // Saves the text into the specified file - procedure DoSaveFile(const wsFileName: WideString; bUnicode: Boolean); + procedure DoSaveFile(const wsFileName: UnicodeString); // Returns True if text can be discarded function CanDiscardText: Boolean; // Prop handlers - function GetDisplayFileName: WideString; + function GetDisplayFileName: UnicodeString; public // Props // -- Name of the file being edited, always not empty - property DisplayFileName: WideString read GetDisplayFileName; + property DisplayFileName: UnicodeString read GetDisplayFileName; end; var @@ -125,11 +120,7 @@ TfMain = class(TTntForm) implementation {$R *.dfm} uses - StrUtils, TntSystem, TntClasses, TntSysUtils - {$IFDEF COMPILER_7_UP} - , XPMan - {$ENDIF} - ; + XPMan, System.Types; procedure TfMain.aEditCopyExecute(Sender: TObject); begin @@ -148,19 +139,19 @@ implementation procedure TfMain.aEditFindExecute(Sender: TObject); begin - { Find not implemented since there's no TTntFindDialog yet } + { Find not implemented } end; procedure TfMain.aEditFindNextExecute(Sender: TObject); begin - { Find not implemented since there's no TTntFindDialog yet } + { Find not implemented } end; procedure TfMain.aEditGoToLineExecute(Sender: TObject); - var ws: WideString; + var ws: UnicodeString; begin ws := IntToStr(mMain.CaretPos.y+1); - if WideInputQuery(DKLangConstW('SDlgTitle_GoToLine'), DKLangConstW('SGoToLinePrompt'), ws) then begin + if InputQuery(DKLangConstW('SDlgTitle_GoToLine'), DKLangConstW('SGoToLinePrompt'), ws) then begin mMain.CaretPos := Point(0, StrToInt(ws)-1); mMain.Perform(EM_SCROLLCARET, 0, 0); end; @@ -173,7 +164,7 @@ implementation procedure TfMain.aEditReplaceExecute(Sender: TObject); begin - { Replace not implemented since there's no TTntReplaceDialog yet } + { Replace not implemented } end; procedure TfMain.aEditSelectAllExecute(Sender: TObject); @@ -196,7 +187,6 @@ implementation if CanDiscardText then begin mMain.Clear; mMain.Modified := False; - FIsUnicodeFile := True; FFileName := ''; UpdateState; end; @@ -211,13 +201,12 @@ implementation procedure TfMain.aFileSaveAsExecute(Sender: TObject); begin sdMain.FileName := FFileName; - if FIsUnicodeFile then sdMain.FilterIndex := 2 else sdMain.FilterIndex := 1; - if sdMain.Execute then DoSaveFile(sdMain.FileName, sdMain.FilterIndex=2); + if sdMain.Execute then DoSaveFile(sdMain.FileName); end; procedure TfMain.aFileSaveExecute(Sender: TObject); begin - if FFileName='' then aFileSaveAs.Execute else DoSaveFile(FFileName, FIsUnicodeFile); + if FFileName='' then aFileSaveAs.Execute else DoSaveFile(FFileName); end; procedure TfMain.aFormatFontExecute(Sender: TObject); @@ -236,7 +225,7 @@ implementation begin MessageBoxW( Application.Handle, - PWideChar(WideFormat( + PWideChar(Format( '%s v1.00'#13#10'%s', [DKLangConstW('SApplicationName'), DKLangConstW('SCopyright')])), PWideChar(DKLangConstW('SDlgTitle_About')), MB_ICONINFORMATION or MB_OK); @@ -263,28 +252,23 @@ implementation end; end; - procedure TfMain.DoLoadFile(const wsFileName: WideString); + procedure TfMain.DoLoadFile(const wsFileName: UnicodeString); begin mMain.Lines.LoadFromFile(wsFileName); mMain.Modified := False; - FIsUnicodeFile := mMain.Lines.LastFileCharSet in [csUnicode, csUnicodeSwapped]; FFileName := wsFileName; UpdateState; end; - procedure TfMain.DoSaveFile(const wsFileName: WideString; bUnicode: Boolean); + procedure TfMain.DoSaveFile(const wsFileName: UnicodeString); begin - if bUnicode then - mMain.Lines.SaveToFile(wsFileName) - else - mMain.Lines.AnsiStrings.SaveToFile(wsFileName); + mMain.Lines.SaveToFile(wsFileName); mMain.Modified := False; - FIsUnicodeFile := bUnicode; FFileName := wsFileName; UpdateState; end; - function TfMain.GetDisplayFileName: WideString; + function TfMain.GetDisplayFileName: UnicodeString; begin Result := FFileName; if Result='' then Result := DKLangConstW('SDefaultFileName'); @@ -297,30 +281,28 @@ implementation UpdateState; end; - procedure TfMain.TntFormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure TfMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose := CanDiscardText; end; - procedure TfMain.TntFormCreate(Sender: TObject); + procedure TfMain.FormCreate(Sender: TObject); procedure CreateLanguageMenu; var i: Integer; - mi: TTntMenuItem; + mi: TMenuItem; begin for i := 0 to LangManager.LanguageCount-1 do begin - mi := WideNewItem(LangManager.LanguageNames[i], 0, False, True, LanguageItemClick, 0, ''); + mi := NewItem(LangManager.LanguageNames[i], 0, False, True, LanguageItemClick, 0, ''); mi.Tag := LangManager.LanguageIDs[i]; smViewLanguage.Add(mi); end; end; begin - // Initially we prefer Unicode files - FIsUnicodeFile := True; // Scan for language files in the app directory and register them in the LangManager object - LangManager.ScanForLangFiles(WideExtractFileDir(WideParamStr(0)), '*.lng', False); + LangManager.ScanForLangFiles(ExtractFileDir(ParamStr(0)), '*.lng', False); // Create available languages menu CreateLanguageMenu; // Update interface elements @@ -328,21 +310,21 @@ implementation end; procedure TfMain.UpdateState; - const awsModified: Array[Boolean] of WideString = ('', '*'); + const awsModified: Array[Boolean] of UnicodeString = ('', '*'); procedure UpdateLanguageMark; var i: Integer; - CurLang: LANGID; + CurLang: LANGID; // To avoid excess synch calls begin - CurLang := LangManager.LanguageID; // To avoid excess synch calls + CurLang := LangManager.LanguageID; for i := 0 to smViewLanguage.Count-1 do with smViewLanguage[i] do Checked := Tag=CurLang; end; begin // Update form caption - Caption := WideFormat( + Caption := Format( '[%s%s] - %s', [DisplayFileName, awsModified[mMain.Modified], DKLangConstW('SApplicationName')]); Application.Title := Caption; // Update language menu diff --git a/Examples/Notepad/Russian.lng b/Examples/Notepad_VCL/Russian.lng similarity index 100% rename from Examples/Notepad/Russian.lng rename to Examples/Notepad_VCL/Russian.lng diff --git a/Examples/Resource/DKLang_Resource_Demo.cfg b/Examples/Resource/DKLang_Resource_Demo.cfg deleted file mode 100755 index 45f0861..0000000 --- a/Examples/Resource/DKLang_Resource_Demo.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Examples/Resource/DKLang_Resource_Demo.dklang b/Examples/Resource/DKLang_Resource_Demo.dklang deleted file mode 100644 index 2e1a8bb..0000000 --- a/Examples/Resource/DKLang_Resource_Demo.dklang +++ /dev/null @@ -1,5 +0,0 @@ -[fMain] -Caption=00000001,Sample Form -bCancel.Caption=00000003,Cancel -lSampleMessage.Caption=00000004,This is a sample message. - diff --git a/Examples/Resource/DKLang_Resource_Demo.dof b/Examples/Resource/DKLang_Resource_Demo.dof deleted file mode 100755 index c18dd98..0000000 --- a/Examples/Resource/DKLang_Resource_Demo.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOfficeXP;GR32_DSGN_D7;GR32_D7;tb2k_d7;tbx_d7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Examples/Resource/DKLang_Resource_Demo.res b/Examples/Resource/DKLang_Resource_Demo.res deleted file mode 100755 index 1228533..0000000 Binary files a/Examples/Resource/DKLang_Resource_Demo.res and /dev/null differ diff --git a/Examples/Resource/Main.dfm b/Examples/Resource/Main.dfm deleted file mode 100644 index 8af764a..0000000 --- a/Examples/Resource/Main.dfm +++ /dev/null @@ -1,53 +0,0 @@ -object fMain: TfMain - Left = 438 - Top = 199 - BorderStyle = bsDialog - Caption = 'Sample Form' - ClientHeight = 119 - ClientWidth = 280 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - OldCreateOrder = False - Position = poScreenCenter - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object lSampleMessage: TTntLabel - Left = 20 - Top = 44 - Width = 123 - Height = 13 - Caption = 'This is a sample message.' - end - object bCancel: TTntButton - Left = 104 - Top = 76 - Width = 75 - Height = 25 - Caption = 'Cancel' - TabOrder = 0 - end - object cbLanguage: TTntComboBox - Left = 8 - Top = 8 - Width = 261 - Height = 21 - Style = csDropDownList - ItemHeight = 13 - TabOrder = 1 - OnChange = cbLanguageChange - end - object lcMain: TDKLanguageController - Left = 240 - Top = 48 - LangData = { - 0500664D61696E010100000001000000070043617074696F6E01030000000700 - 6243616E63656C010100000003000000070043617074696F6E000E006C53616D - 706C654D657373616765010100000004000000070043617074696F6E000A0063 - 624C616E67756167650000} - end -end diff --git a/Examples/Resource_FireMonkey_Mobile/AndroidManifest.template.xml b/Examples/Resource_FireMonkey_Mobile/AndroidManifest.template.xml new file mode 100644 index 0000000..3dde458 --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/AndroidManifest.template.xml @@ -0,0 +1,35 @@ + + + + + + +<%uses-permission%> + + + + + + + + + + + + + + diff --git a/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.deployproj b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.deployproj new file mode 100644 index 0000000..17ea14f --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.deployproj @@ -0,0 +1,666 @@ + + + + 12 + + + + DKLang_Resource_FMX_Mobile_Demo\assets\internal\ + Russian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\assets\internal\ + Korean.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\res\drawable-xhdpi\ + ic_launcher.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\res\drawable-ldpi\ + ic_launcher.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\library\lib\armeabi\ + gdbserver + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\res\drawable-mdpi\ + ic_launcher.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\assets\internal\ + Italian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\assets\internal\ + German.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + AndroidManifest.xml + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\classes\ + classes.dex + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\res\drawable-xxhdpi\ + ic_launcher.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\assets\internal\ + Spanish.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + AndroidManifest.xml + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\res\drawable-hdpi\ + ic_launcher.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo\assets\internal\ + French.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\library\lib\armeabi\ + libDKLang_LocalFileStorage_FMX_Mobile_Demo.so + 1 + + + True + + + DKLang_Resource_FMX_Mobile_Demo\library\lib\armeabi\ + libDKLang_LocalFileStorage_FMX_Mobile_Demo.so + 1 + + + True + + + DKLang_Resource_FMX_Mobile_Demo\assets\internal\ + Japanese.lng + 0 + + + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + ResourceRules.plist + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Russian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Korean.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Italian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + German.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Spanish.lng + 0 + + + + + $(PROJECTNAME).app.dSYM\Contents\Resources\DWARF\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + French.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Entitlements.plist + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Japanese.lng + 0 + + + + + + + DKLang_Resource_FMX_Mobile_Demo\ + Russian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + Korean.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + Italian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + German.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + Spanish.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + French.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo\ + Japanese.lng + 0 + + + + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Contents\MacOS\ + libcgunwind.1.0.dylib + 1 + + + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_57x57.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Landscape@2x.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Russian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Korean.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SettingIcon_58x58.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-568h@2x.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_114x114.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_80x80.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_100x100.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_152x152.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Italian.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Info.plist + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + German.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_144x144.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_50x50.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SettingIcon_29x29.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Portrait@2x.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_76x76.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + DKLang_Resource_FMX_Mobile_Demo + 1 + + + True + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Portrait~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + DKLang_Resource_FMX_Mobile_Demo.rsm + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + libcgunwind.1.0.dylib + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default@2x.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Portrait@2x~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Spanish.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_120x120.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_60x60.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Landscape~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_40x40.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + French.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Landscape@2x~ipad.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Entitlements.plist + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\Startup\Documents\ + Japanese.lng + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Entitlements.plist + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_ApplicationIcon_72x72.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + FM_SpotlightSearchIcon_29x29.png + 0 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default~ipad.png + 1 + + + + + DKLang_Resource_FMX_Mobile_Demo.app\ + Default-Landscape.png + 1 + + + + + diff --git a/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dklang b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dklang new file mode 100644 index 0000000..374b939 Binary files /dev/null and b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dklang differ diff --git a/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dpr b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dpr new file mode 100644 index 0000000..aa84fe7 --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dpr @@ -0,0 +1,16 @@ +program DKLang_Resource_FMX_Mobile_Demo; + +{$R 'LangFiles.res' 'LangFiles.rc'} + +uses + System.StartUpCopy, + FMX.Forms, + Main in 'Main.pas' {fMain}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TfMain, fMain); + Application.Run; +end. diff --git a/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dproj b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dproj new file mode 100644 index 0000000..6464edc --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.dproj @@ -0,0 +1,908 @@ + + + {A3681FDF-9583-4FE3-86CB-386ED2BFFF97} + 15.2 + FMX + DKLang_Resource_FMX_Mobile_Demo.dpr + True + Debug + iOSSimulator + 88 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + true + true + true + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + true + true + true + true + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar + Debug + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + IndyIPClient;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;BeejComponentsXE5;DbxCommonDriver;dbxcds;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;OmniThreadLibraryRuntimeXE5;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;FileStorageBDS_XE5;dklangXE5;FrameViewerXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;ADOX_XE5;RichViewSpellingHunspell_XE5;FireDAC;inet;BeejTmsRvEditLinkXE5;CADSys5_XE5;RESTComponents;dbexpress;$(DCC_UsePackage) + + + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + Debug + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + + + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_50x50.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_58x58.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x748.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_29x29.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1496.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2008.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1004.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x1136.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_29x29.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_57x57.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_640x960.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_100x100.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_320x480.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_144x144.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=6.0;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_114x114.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_72x72.png + + + $(BDS)\bin\default_app.manifest + 1033 + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + IndyIPClient;JvGlobus;JvMM;tmsdXE5;JvManagedThreads;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;tmswizdXE5;inetdbbde;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;JvNet;BeejComponentsXE5;JvDotNetCtrls;DbxCommonDriver;tdbf;vclimg;dbxcds;gtAdvGridExpD17;MetropolisUILiveTile;JvXPCtrls;vcldb;vcldsnap;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;JvCore;vclribbon;dsnap;IndyIPServer;OmniThreadLibraryRuntimeXE5;fmxase;vcl;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;CodeSiteExpressPkg;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;FileStorageBDS_XE5;JclDeveloperTools;dklangXE5;FrameViewerXE5;JvDocking;adortl;JvWizards;madBasic_;gtRichVwExpD17;FireDACASADriver;JvHMI;bindcompfmx;JvBands;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;madDisAsm_;JvSystem;xmlrtl;svnui;JvTimeFramework;JvControls;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;tmsxlsdXE5;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;ADOX_XE5;FireDACADSDriver;vcltouch;RichViewSpellingHunspell_XE5;madExcept_;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;BeejTmsRvEditLinkXE5;vclx;svn;tmsexdXE5;CADSys5_XE5;fmxdae;RESTComponents;bdertl;VirtualTreesR;dbexpress;FireDACMSAccDriver;JvBDE;$(DCC_UsePackage) + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + true + iPhoneAndiPad + + + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + +
LangFiles.res
+
+ +
fMain
+ fmx +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + DKLang_Resource_FMX_Mobile_Demo.dpr + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + + + + + + + + + Default-568h@2x.png + + + + + Default-Portrait@2x.png + + + + + + + + ResourceRules.plist + + + + + + + + assets\internal\ + Russian.lng + + + Startup\Documents\ + Russian.lng + + + Russian.lng + + + Startup\Documents\ + Russian.lng + + + + + assets\internal\ + Korean.lng + + + Startup\Documents\ + Korean.lng + + + Korean.lng + + + Startup\Documents\ + Korean.lng + + + + + Default~ipad.png + + + + + Default.png + + + + + + + + ic_launcher.png + + + + + + + + + + + + + + + + + ic_launcher.png + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + ic_launcher.png + + + + + Default-Landscape@2x.png + + + + + + + + + + + Info.plist + + + + + + + + + + + assets\internal\ + Italian.lng + + + Startup\Documents\ + Italian.lng + + + Italian.lng + + + Startup\Documents\ + Italian.lng + + + + + Info.plist + + + + + + + + Info.plist + + + + + + + + assets\internal\ + German.lng + + + Startup\Documents\ + German.lng + + + German.lng + + + Startup\Documents\ + German.lng + + + + + Default-Landscape.png + + + + + + + + Default-Portrait~ipad.png + + + + + + + + classes.dex + + + + + DKLang_Resource_FMX_Mobile_Demo.rsm + + + + + ic_launcher.png + + + + + + + + + Default-Portrait@2x~ipad.png + + + + + assets\internal\ + Spanish.lng + + + Startup\Documents\ + Spanish.lng + + + Spanish.lng + + + Startup\Documents\ + Spanish.lng + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo + + + + + + + + Default-Landscape~ipad.png + + + + + + + + ic_launcher.png + + + + + + + + DKLang_LocalFileStorage_FMX_Mobile_Demo.rsm + + + + + Default@2x.png + + + + + assets\internal\ + French.lng + + + Startup\Documents\ + French.lng + + + French.lng + + + Startup\Documents\ + French.lng + + + + + Default-Landscape@2x~ipad.png + + + + + Entitlements.plist + + + + + + + + Entitlements.plist + + + + + + + + assets\internal\ + Japanese.lng + + + Startup\Documents\ + Japanese.lng + + + Japanese.lng + + + Startup\Documents\ + Japanese.lng + + + + + Entitlements.plist + + + + + + + + 1 + .dylib + + + 0 + .bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + library\lib\armeabi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xhdpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + Contents\Resources + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + library\lib\armeabi + 1 + + + 0 + + + Contents\MacOS + 1 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + Contents\MacOS + 0 + + + 0 + + + + + 1 + + + 1 + + + + + res\drawable-ldpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + 1 + + + + + + + + + + + True + True + True + False + + + 12 + + + + +
diff --git a/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.res b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/Examples/Resource_FireMonkey_Mobile/DKLang_Resource_FMX_Mobile_Demo.res differ diff --git a/Examples/Resource/LangFiles.rc b/Examples/Resource_FireMonkey_Mobile/LangFiles.rc old mode 100755 new mode 100644 similarity index 100% rename from Examples/Resource/LangFiles.rc rename to Examples/Resource_FireMonkey_Mobile/LangFiles.rc diff --git a/Examples/Resource_FireMonkey_Mobile/LangFiles.res b/Examples/Resource_FireMonkey_Mobile/LangFiles.res new file mode 100644 index 0000000..f3145db Binary files /dev/null and b/Examples/Resource_FireMonkey_Mobile/LangFiles.res differ diff --git a/Examples/Resource_FireMonkey_Mobile/LangFiles/German.lng b/Examples/Resource_FireMonkey_Mobile/LangFiles/German.lng new file mode 100644 index 0000000..e49c7de --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/LangFiles/German.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: German.lng,v 1.6 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1031 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:26:51 + +[fMain] +00000001=Beispielform +00000002=Das ist eine Beispielmitteilung. +00000003=Abbrechen + +[$CONSTANTS] diff --git a/Examples/Resource_FireMonkey_Mobile/LangFiles/Russian.lng b/Examples/Resource_FireMonkey_Mobile/LangFiles/Russian.lng new file mode 100644 index 0000000..8fe251c --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/LangFiles/Russian.lng @@ -0,0 +1,20 @@ +;*********************************************************************************************************************** +; $Id: Russian.lng,v 1.6 2006-08-08 13:57:59 dale Exp $ +;----------------------------------------------------------------------------------------------------------------------- +; DKLang Localization Package +; Copyright 2002-2006 DK Software, http://www.dk-soft.org +;*********************************************************************************************************************** + +TargetApplication=DKLang_Simple_Demo +Author=Dmitry Kann +SourceLANGID=1033 +LANGID=1049 +Generator=DKLang Translation Editor v2.1 +LastModified=2004-09-08 18:18:27 + +[fMain] +00000001=Форма-пример +00000002=Это пример сообщения. +00000003=Отмена + +[$CONSTANTS] diff --git a/Examples/Resource_FireMonkey_Mobile/Main.fmx b/Examples/Resource_FireMonkey_Mobile/Main.fmx new file mode 100644 index 0000000..d6d6a9b --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/Main.fmx @@ -0,0 +1,52 @@ +object fMain: TfMain + Left = 0 + Top = 0 + Caption = 'Form2' + ClientHeight = 567 + ClientWidth = 384 + FormFactor.Width = 320 + FormFactor.Height = 480 + FormFactor.Devices = [dkDesktop] + OnCreate = FormCreate + DesignerMobile = True + DesignerWidth = 384 + DesignerHeight = 592 + DesignerDeviceName = 'Google Nexus 4' + DesignerOrientation = 0 + DesignerOSVersion = '' + object cbLanguage: TComboBox + Align = alTop + DisableFocusEffect = False + Height = 32.000000000000000000 + TabOrder = 0 + Width = 384.000000000000000000 + OnChange = cbLanguageChange + end + object lSampleMessage: TLabel + Height = 23.000000000000000000 + Position.X = 8.000000000000000000 + Position.Y = 64.000000000000000000 + Text = 'This is a sample message.' + Width = 361.000000000000000000 + Trimming = ttCharacter + end + object bCancel: TButton + Default = True + Height = 44.000000000000000000 + Position.X = 80.000000000000000000 + Position.Y = 128.000000000000000000 + TabOrder = 2 + Text = 'Cancel' + Trimming = ttCharacter + Width = 201.000000000000000000 + end + object lcMain: TDKLanguageController + Left = 280 + Top = 440 + LangData = { + 0500664D61696E010100000001000000070043617074696F6E01030000000A00 + 63624C616E677561676500000E006C53616D706C654D65737361676501010000 + 00020000000400546578740007006243616E63656C0101000000030000000400 + 5465787400} + end +end diff --git a/Examples/Resource_FireMonkey_Mobile/Main.pas b/Examples/Resource_FireMonkey_Mobile/Main.pas new file mode 100644 index 0000000..fa5bb04 --- /dev/null +++ b/Examples/Resource_FireMonkey_Mobile/Main.pas @@ -0,0 +1,53 @@ +unit Main; + +interface + +uses + System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, + FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, DKLang, + FMX.StdCtrls, FMX.ListBox, FMX.Layouts, FMX.Memo, DKLangStorage; + +type + TfMain = class(TForm) + cbLanguage: TComboBox; + lSampleMessage: TLabel; + bCancel: TButton; + lcMain: TDKLanguageController; + procedure cbLanguageChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + fMain: TfMain; + +implementation + +{$R *.fmx} +{.$R LangFiles.res} // <--- enable this resource include if you do NOT include LangFiles.rc in the project + + procedure TfMain.cbLanguageChange(Sender: TObject); + var iIndex: Integer; + begin + iIndex := cbLanguage.ItemIndex; + if iIndex<0 then iIndex := 0; // When there's no valid selection in cbLanguage we use the default language (Index=0) + LangManager.LanguageID := LangManager.LanguageIDs[iIndex]; + end; + + procedure TfMain.FormCreate(Sender: TObject); + var i: Integer; + begin + // Fill in the 'statically included' languages + LangManager.RegisterLangResource(HInstance, 'LNG_RUSSIAN', 1049); + LangManager.RegisterLangResource(HInstance, 'LNG_GERMAN', 1031); + + // Fill cbLanguage with available languages + for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNativeNames[i]); + // Index=0 always means the default language + cbLanguage.ItemIndex := 0; + end; + +end. diff --git a/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dklang b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dklang new file mode 100644 index 0000000..5c8355f Binary files /dev/null and b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dklang differ diff --git a/Examples/Resource/DKLang_Resource_Demo.dpr b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dpr old mode 100755 new mode 100644 similarity index 95% rename from Examples/Resource/DKLang_Resource_Demo.dpr rename to Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dpr index e2ec2a3..81e4022 --- a/Examples/Resource/DKLang_Resource_Demo.dpr +++ b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dpr @@ -4,7 +4,7 @@ // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** -program DKLang_Resource_Demo; +program DKLang_Resource_VCL_Demo; uses Forms, diff --git a/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dproj b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dproj new file mode 100644 index 0000000..9011641 --- /dev/null +++ b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.dproj @@ -0,0 +1,171 @@ + + + {CCD3416B-39C7-4A12-8DDC-859187314D0C} + DKLang_Resource_VCL_Demo.dpr + Debug + DCC32 + 15.2 + VCL + True + Win32 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + .\$(Platform)\$(Config) + $(Platform)\$(Config)\ + $(BDS)\bin\default_app.manifest + 1049 + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + DKLang_Resource_Demo_Icon.ico + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + DKLang_Resource_Demo.exe + 00400000 + vcl;rtl;vclx;vclactnband;xmlrtl;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;vclribbon;vclAbsDBd12;$(DCC_UsePackage) + x86 + + + 1033 + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + 1033 + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + DEBUG;$(DCC_Define) + + + 0 + 1033 + true + 3 + + + 0 + madExcept;$(DCC_Define) + 3 + + + + MainSource + + +
fMain
+
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DKLang_Resource_VCL_Demo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + False + True + True + + + 12 + + +
diff --git a/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.res b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.res new file mode 100644 index 0000000..0f3facb Binary files /dev/null and b/Examples/Resource_VCL/DKLang_Resource_VCL_Demo.res differ diff --git a/Examples/Resource/LangFiles.RES b/Examples/Resource_VCL/LangFiles.RES old mode 100755 new mode 100644 similarity index 100% rename from Examples/Resource/LangFiles.RES rename to Examples/Resource_VCL/LangFiles.RES diff --git a/Examples/Resource_VCL/LangFiles.rc b/Examples/Resource_VCL/LangFiles.rc new file mode 100644 index 0000000..3fb72b6 --- /dev/null +++ b/Examples/Resource_VCL/LangFiles.rc @@ -0,0 +1,2 @@ +LNG_RUSSIAN RCDATA LangFiles\Russian.lng +LNG_GERMAN RCDATA LangFiles\German.lng \ No newline at end of file diff --git a/Examples/Resource/LangFiles/German.lng b/Examples/Resource_VCL/LangFiles/German.lng similarity index 100% rename from Examples/Resource/LangFiles/German.lng rename to Examples/Resource_VCL/LangFiles/German.lng diff --git a/Examples/Resource/LangFiles/Russian.lng b/Examples/Resource_VCL/LangFiles/Russian.lng similarity index 100% rename from Examples/Resource/LangFiles/Russian.lng rename to Examples/Resource_VCL/LangFiles/Russian.lng diff --git a/Examples/Ansi/Main.dfm b/Examples/Resource_VCL/Main.dfm similarity index 98% rename from Examples/Ansi/Main.dfm rename to Examples/Resource_VCL/Main.dfm index 34f6c70..0482559 100644 --- a/Examples/Ansi/Main.dfm +++ b/Examples/Resource_VCL/Main.dfm @@ -37,7 +37,6 @@ object fMain: TfMain Width = 261 Height = 21 Style = csDropDownList - ItemHeight = 13 TabOrder = 1 OnChange = cbLanguageChange end diff --git a/Examples/Resource/Main.pas b/Examples/Resource_VCL/Main.pas similarity index 81% rename from Examples/Resource/Main.pas rename to Examples/Resource_VCL/Main.pas index f84e3cb..d190083 100644 --- a/Examples/Resource/Main.pas +++ b/Examples/Resource_VCL/Main.pas @@ -1,5 +1,5 @@ //********************************************************************************************************************** -// $Id: Main.pas,v 1.4 2006-08-11 12:15:51 dale Exp $ +// $Id: Main.pas,v 1.4 2006/08/11 12:15:51 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright (c)DK Software, http://www.dk-soft.org/ @@ -9,15 +9,15 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, TntForms, - Dialogs, DKLang, StdCtrls, TntStdCtrls; + Windows, Messages, Variants, Classes, Graphics, Controls, Forms, + Dialogs, DKLang, StdCtrls; type - TfMain = class(TTntForm) - bCancel: TTntButton; - cbLanguage: TTntComboBox; + TfMain = class(TForm) + bCancel: TButton; + cbLanguage: TComboBox; lcMain: TDKLanguageController; - lSampleMessage: TTntLabel; + lSampleMessage: TLabel; procedure cbLanguageChange(Sender: TObject); procedure FormCreate(Sender: TObject); end; @@ -26,10 +26,9 @@ TfMain = class(TTntForm) fMain: TfMain; implementation -{$R *.dfm} -uses TntSystem, TntSysUtils; -{$R LangFiles.res} // Notice this resource inclusion! +{$R *.dfm} +{$R LangFiles.res} procedure TfMain.cbLanguageChange(Sender: TObject); var iIndex: Integer; diff --git a/Examples/Simple/DKLang_Simple_Demo.cfg b/Examples/Simple/DKLang_Simple_Demo.cfg deleted file mode 100755 index 45f0861..0000000 --- a/Examples/Simple/DKLang_Simple_Demo.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/Examples/Simple/DKLang_Simple_Demo.dklang b/Examples/Simple/DKLang_Simple_Demo.dklang deleted file mode 100644 index 2e1a8bb..0000000 --- a/Examples/Simple/DKLang_Simple_Demo.dklang +++ /dev/null @@ -1,5 +0,0 @@ -[fMain] -Caption=00000001,Sample Form -bCancel.Caption=00000003,Cancel -lSampleMessage.Caption=00000004,This is a sample message. - diff --git a/Examples/Simple/DKLang_Simple_Demo.dof b/Examples/Simple/DKLang_Simple_Demo.dof deleted file mode 100755 index c18dd98..0000000 --- a/Examples/Simple/DKLang_Simple_Demo.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOfficeXP;GR32_DSGN_D7;GR32_D7;tb2k_d7;tbx_d7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Examples/Simple/DKLang_Simple_Demo.res b/Examples/Simple/DKLang_Simple_Demo.res deleted file mode 100755 index 1228533..0000000 Binary files a/Examples/Simple/DKLang_Simple_Demo.res and /dev/null differ diff --git a/Examples/Ansi/Arabic.lng b/Examples/Simple_VCL/Arabic.lng similarity index 88% rename from Examples/Ansi/Arabic.lng rename to Examples/Simple_VCL/Arabic.lng index b643897..fd1593b 100644 --- a/Examples/Ansi/Arabic.lng +++ b/Examples/Simple_VCL/Arabic.lng @@ -1,11 +1,11 @@ ;*********************************************************************************************************************** -; $Id: Arabic.lng,v 1.3 2006-08-08 13:46:11 dale Exp $ +; $Id: Arabic.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ ;----------------------------------------------------------------------------------------------------------------------- ; DKLang Localization Package ; Copyright 2002-2006 DK Software, http://www.dk-soft.org ;*********************************************************************************************************************** -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=1025 diff --git a/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dklang b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dklang new file mode 100644 index 0000000..5c8355f Binary files /dev/null and b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dklang differ diff --git a/Examples/Simple/DKLang_Simple_Demo.dpr b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dpr old mode 100755 new mode 100644 similarity index 95% rename from Examples/Simple/DKLang_Simple_Demo.dpr rename to Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dpr index 08c5e93..9226ce5 --- a/Examples/Simple/DKLang_Simple_Demo.dpr +++ b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dpr @@ -4,7 +4,7 @@ // DKLang Localization Package // Copyright 2002-2006 DK Software, http://www.dk-soft.org //********************************************************************************************************************** -program DKLang_Simple_Demo; +program DKLang_Simple_VCL_Demo; uses Forms, diff --git a/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dproj b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dproj new file mode 100644 index 0000000..d4e4e15 --- /dev/null +++ b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.dproj @@ -0,0 +1,210 @@ + + + {14FF19B1-0734-472D-B14B-CB76CF5CB40B} + DKLang_Simple_VCL_Demo.dpr + Debug + DCC32 + 15.2 + VCL + True + Win32 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + + .\$(Platform)\$(Config) + $(Platform)\$(Config)\ + $(BDS)\bin\default_app.manifest + 1049 + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + $(BDS)\bin\delphi_PROJECTICON.ico + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + DKLang_Simple_Demo.exe + 00400000 + vcl;rtl;vclx;vclactnband;xmlrtl;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;adortl;vclib;ibxpress;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_120;Intraweb_100_120;VclSmp;vclie;vclribbon;vclAbsDBd12;$(DCC_UsePackage) + x86 + + + 1033 + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + 1033 + true + $(BDS)\bin\delphi_PROJECTICON.ico + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + DEBUG;$(DCC_Define) + + + + MainSource + + +
fMain
+
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + + Delphi.Personality.12 + VCLApplication + + + + DKLang_Simple_VCL_Demo.dpr + + + False + True + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + False + True + True + + + 12 + + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + + + + False + + False + copy $(PROJECTDIR)\*.lng $(OUTPUTDIR) + False + +
diff --git a/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.res b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.res new file mode 100644 index 0000000..0f3facb Binary files /dev/null and b/Examples/Simple_VCL/DKLang_Simple_VCL_Demo.res differ diff --git a/Examples/Ansi/French.lng b/Examples/Simple_VCL/French.lng similarity index 87% rename from Examples/Ansi/French.lng rename to Examples/Simple_VCL/French.lng index b1ad733..ef53807 100644 --- a/Examples/Ansi/French.lng +++ b/Examples/Simple_VCL/French.lng @@ -1,11 +1,11 @@ ;*********************************************************************************************************************** -; $Id: French.lng,v 1.3 2006-08-08 14:00:24 dale Exp $ +; $Id: French.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ ;----------------------------------------------------------------------------------------------------------------------- ; DKLang Localization Package ; Copyright 2002-2006 DK Software, http://www.dk-soft.org ;*********************************************************************************************************************** -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=1036 diff --git a/Examples/Ansi/German.lng b/Examples/Simple_VCL/German.lng similarity index 88% rename from Examples/Ansi/German.lng rename to Examples/Simple_VCL/German.lng index 77e4282..da7a385 100644 --- a/Examples/Ansi/German.lng +++ b/Examples/Simple_VCL/German.lng @@ -1,11 +1,11 @@ ;*********************************************************************************************************************** -; $Id: German.lng,v 1.3 2006-08-08 14:00:24 dale Exp $ +; $Id: German.lng,v 1.8 2006-08-08 13:57:59 dale Exp $ ;----------------------------------------------------------------------------------------------------------------------- ; DKLang Localization Package ; Copyright 2002-2006 DK Software, http://www.dk-soft.org ;*********************************************************************************************************************** -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=1031 diff --git a/Examples/Ansi/Italian.lng b/Examples/Simple_VCL/Italian.lng similarity index 88% rename from Examples/Ansi/Italian.lng rename to Examples/Simple_VCL/Italian.lng index c7471d1..1018a50 100644 --- a/Examples/Ansi/Italian.lng +++ b/Examples/Simple_VCL/Italian.lng @@ -1,11 +1,11 @@ ;*********************************************************************************************************************** -; $Id: Italian.lng,v 1.3 2006-08-08 14:00:24 dale Exp $ +; $Id: Italian.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ ;----------------------------------------------------------------------------------------------------------------------- ; DKLang Localization Package ; Copyright 2002-2006 DK Software, http://www.dk-soft.org ;*********************************************************************************************************************** -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=1040 diff --git a/Examples/Ansi/Japanese.lng b/Examples/Simple_VCL/Japanese.lng similarity index 86% rename from Examples/Ansi/Japanese.lng rename to Examples/Simple_VCL/Japanese.lng index c255c96..44ac3a9 100644 --- a/Examples/Ansi/Japanese.lng +++ b/Examples/Simple_VCL/Japanese.lng @@ -1,4 +1,4 @@ -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=1041 diff --git a/Examples/Ansi/Korean.lng b/Examples/Simple_VCL/Korean.lng similarity index 88% rename from Examples/Ansi/Korean.lng rename to Examples/Simple_VCL/Korean.lng index bd0b97f..4378d31 100644 --- a/Examples/Ansi/Korean.lng +++ b/Examples/Simple_VCL/Korean.lng @@ -1,11 +1,11 @@ ;*********************************************************************************************************************** -; $Id: Korean.lng,v 1.3 2006-08-08 14:00:24 dale Exp $ +; $Id: Korean.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ ;----------------------------------------------------------------------------------------------------------------------- ; DKLang Localization Package ; Copyright 2002-2006 DK Software, http://www.dk-soft.org ;*********************************************************************************************************************** -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=1042 diff --git a/Examples/Simple/Main.dfm b/Examples/Simple_VCL/Main.dfm similarity index 80% rename from Examples/Simple/Main.dfm rename to Examples/Simple_VCL/Main.dfm index 8af764a..2d5064a 100644 --- a/Examples/Simple/Main.dfm +++ b/Examples/Simple_VCL/Main.dfm @@ -6,24 +6,24 @@ object fMain: TfMain ClientHeight = 119 ClientWidth = 280 Color = clBtnFace - Font.Charset = DEFAULT_CHARSET + Font.Charset = ANSI_CHARSET Font.Color = clWindowText Font.Height = -11 - Font.Name = 'Tahoma' + Font.Name = 'Arial Unicode MS' Font.Style = [] OldCreateOrder = False Position = poScreenCenter OnCreate = FormCreate PixelsPerInch = 96 - TextHeight = 13 - object lSampleMessage: TTntLabel + TextHeight = 15 + object lSampleMessage: TLabel Left = 20 Top = 44 - Width = 123 - Height = 13 + Width = 128 + Height = 15 Caption = 'This is a sample message.' end - object bCancel: TTntButton + object bCancel: TButton Left = 104 Top = 76 Width = 75 @@ -31,13 +31,13 @@ object fMain: TfMain Caption = 'Cancel' TabOrder = 0 end - object cbLanguage: TTntComboBox + object cbLanguage: TComboBox Left = 8 Top = 8 Width = 261 - Height = 21 + Height = 23 Style = csDropDownList - ItemHeight = 13 + ItemHeight = 15 TabOrder = 1 OnChange = cbLanguageChange end diff --git a/Examples/Ansi/Main.pas b/Examples/Simple_VCL/Main.pas similarity index 82% rename from Examples/Ansi/Main.pas rename to Examples/Simple_VCL/Main.pas index 24e7176..b4db054 100644 --- a/Examples/Ansi/Main.pas +++ b/Examples/Simple_VCL/Main.pas @@ -1,5 +1,5 @@ //********************************************************************************************************************** -// $Id: Main.pas,v 1.2 2006-08-11 07:00:08 dale Exp $ +// $Id: Main.pas,v 1.7 2006/08/11 12:15:51 dale Exp $ //---------------------------------------------------------------------------------------------------------------------- // DKLang Localization Package // Copyright (c)DK Software, http://www.dk-soft.org/ @@ -9,8 +9,8 @@ interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, - DKLang, StdCtrls, TntStdCtrls; + Windows, Messages, Variants, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, DKLang; type TfMain = class(TForm) @@ -27,6 +27,7 @@ TfMain = class(TForm) implementation {$R *.dfm} +uses SysUtils; procedure TfMain.cbLanguageChange(Sender: TObject); var iIndex: Integer; @@ -41,10 +42,10 @@ implementation begin // Scan for language files in the app directory and register them in the LangManager object LangManager.ScanForLangFiles(ExtractFileDir(ParamStr(0)), '*.lng', False); - // Fill cbLanguage with available languages. Notice that implicit Unicode-to-ANSI conversion will take place here + // Fill cbLanguage with available languages for i := 0 to LangManager.LanguageCount-1 do cbLanguage.Items.Add(LangManager.LanguageNames[i]); // Index=0 always means the default language - cbLanguage.ItemIndex := 0; + cbLanguage.ItemIndex := 0; end; end. diff --git a/Examples/Ansi/Russian.lng b/Examples/Simple_VCL/Russian.lng similarity index 88% rename from Examples/Ansi/Russian.lng rename to Examples/Simple_VCL/Russian.lng index a8a254e..1c8b8eb 100644 --- a/Examples/Ansi/Russian.lng +++ b/Examples/Simple_VCL/Russian.lng @@ -1,11 +1,11 @@ ;*********************************************************************************************************************** -; $Id: Russian.lng,v 1.3 2006-08-08 14:00:24 dale Exp $ +; $Id: Russian.lng,v 1.7 2006-08-08 13:57:59 dale Exp $ ;----------------------------------------------------------------------------------------------------------------------- ; DKLang Localization Package ; Copyright 2002-2006 DK Software, http://www.dk-soft.org ;*********************************************************************************************************************** -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=1049 diff --git a/Examples/Ansi/Spanish.lng b/Examples/Simple_VCL/Spanish.lng similarity index 88% rename from Examples/Ansi/Spanish.lng rename to Examples/Simple_VCL/Spanish.lng index 79014d3..aba8f97 100644 --- a/Examples/Ansi/Spanish.lng +++ b/Examples/Simple_VCL/Spanish.lng @@ -1,11 +1,11 @@ ;*********************************************************************************************************************** -; $Id: Spanish.lng,v 1.3 2006-08-08 14:00:24 dale Exp $ +; $Id: Spanish.lng,v 1.3 2006-08-08 13:57:59 dale Exp $ ;----------------------------------------------------------------------------------------------------------------------- ; DKLang Localization Package ; Copyright 2002-2006 DK Software, http://www.dk-soft.org ;*********************************************************************************************************************** -TargetApplication=DKLang_Ansi_Demo +TargetApplication=DKLang_Simple_Demo Author=Dmitry Kann SourceLANGID=1033 LANGID=3082 diff --git a/Examples/build_all.bat b/Examples/build_all.bat new file mode 100644 index 0000000..12def06 --- /dev/null +++ b/Examples/build_all.bat @@ -0,0 +1,45 @@ +echo off + +rem prepares for msbuild +call rsvars.bat + +rem VCL +msbuild Constants_VCL\DKLang_Constants_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 +msbuild Embedded_VCL\DKLang_Embedded_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 +msbuild Frames_VCL\DKLang_Frames_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 +msbuild MDI_VCL\DKLang_MDI_VCL_Demo\.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 +msbuild Notepad_VCL\DKLang_Notepad_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 +msbuild Resource_VCL\DKLang_Resource_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 +msbuild Simple_VCL\DKLang_Simple_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 + +msbuild Constants_VCL\DKLang_Constants_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 +msbuild Embedded_VCL\DKLang_Embedded_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 +msbuild Frames_VCL\DKLang_Frames_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 +msbuild MDI_VCL\DKLang_MDI_VCL_Demo\.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 +msbuild Notepad_VCL\DKLang_Notepad_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 +msbuild Resource_VCL\DKLang_Resource_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 +msbuild Simple_VCL\DKLang_Simple_VCL_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 + +rem FMX Desktop +msbuild Constants_FireMonkey_Desktop\DKLang_Constants_FMX_Desktop_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win32 +msbuild Constants_FireMonkey_Desktop\DKLang_Constants_FMX_Desktop_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Win64 +msbuild Constants_FireMonkey_Desktop\DKLang_Constants_FMX_Desktop_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=OSX32 + +rem FMX Mobile +msbuild Constants_FireMonkey_Mobile\DKLang_Constants_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Android +msbuild Embedded_FireMonkey_Mobile\DKLang_Embedded_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Android +msbuild LocalFileStorage_FireMonkey_Mobile\DKLang_LocalFileStorage_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Android +msbuild Resource_FireMonkey_Mobile\DKLang_Resource_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=Android + +msbuild Constants_FireMonkey_Mobile\DKLang_Constants_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSSimulator +msbuild Embedded_FireMonkey_Mobile\DKLang_Embedded_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSSimulator +msbuild LocalFileStorage_FireMonkey_Mobile\DKLang_LocalFileStorage_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSSimulator +msbuild Resource_FireMonkey_Mobile\DKLang_Resource_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSSimulator + +msbuild Constants_FireMonkey_Mobile\DKLang_Constants_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSDevice +msbuild Embedded_FireMonkey_Mobile\DKLang_Embedded_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSDevice +msbuild LocalFileStorage_FireMonkey_Mobile\DKLang_LocalFileStorage_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSDevice +msbuild Resource_FireMonkey_Mobile\DKLang_Resource_FMX_Mobile_Demo.dproj /t:Rebuild /p:Config=Debug;Platform=iOSDevice + +rem keep window open +pause diff --git a/Help/ChmDoc.pl b/Help/ChmDoc.pl deleted file mode 100644 index 76927ed..0000000 --- a/Help/ChmDoc.pl +++ /dev/null @@ -1,519 +0,0 @@ -#!/usr/bin/perl -#**************************************************************** -# $Id: ChmDoc.pl,v 1.2 2006-08-11 06:16:56 dale Exp $ -#**************************************************************** -# Requires the following environment variables to be set: -# CHM_API_FILE_PREFIX -# HELP_COMPILER -# - -use strict; -use locale; - - # Declare constants -my $usr_short_name = 'DKLang API'; - -my $src_path = 'C:/Delphi/CVSpro~1/dale/DKLang'; -my $out_path = 'C:/Delphi/CVSpro~1/dale/DKLang/Help'; -my $file_prefix = $ENV{'CHM_API_FILE_PREFIX'}; -my $css_file = 'main.css'; -my $toc_file = $file_prefix.'index.html'; -my $typeidx_file = $file_prefix.'types.html'; -my $source_hhp_file = 'dklang.hhp'; -my $hhp_file = $file_prefix.'project.hhp'; -my $source_hhc_file = 'dklang.hhc'; -my $hhc_file = $file_prefix.'contents.hhc'; -my $hhk_file = $file_prefix.'keywords.hhk'; -my $hh_compiler = $ENV{'HELP_COMPILER'}; -my $insert_contents_after = 'DKLang API Reference'; # , - # Validate external variables -die("ERROR: CHM_API_FILE_PREFIX environment variable should be set.\n") unless ($file_prefix); -die("ERROR: HELP_COMPILER environment variable should be set.\n") unless ($hh_compiler); - -my %units; # -> -> -my %allobjs; # -my @htmlfiles; # HTML- - # -my @types = ( - { CHAR => 'I', - NAME => 'Interfaces', - TITLE => 'interface', - PRINTER => sub { qq|$_[0]->{NAME} = interface($_[0]->{DECL})|; } - }, - { CHAR => 'C', - NAME => 'Classes', - TITLE => 'class', - PRINTER => sub { qq|$_[0]->{NAME} = class($_[0]->{DECL})|; } - }, - { CHAR => 'R', - NAME => 'Records', - TITLE => 'record', - PRINTER => sub { qq|$_[0]->{NAME} = $_[0]->{DECL}|; } - }, - { CHAR => 'P', - NAME => 'Pointers', - TITLE => 'pointer', - PRINTER => sub { qq|$_[0]->{NAME} = ^$_[0]->{DECL}|; } - }, - { CHAR => 'E', - NAME => 'Enumerations', - TITLE => 'enumeration', - PRINTER => sub { qq|$_[0]->{NAME} = $_[0]->{DECL}|; } - } - ); - # typechar -my %typebychar; -foreach(@types) { $typebychar{$_->{CHAR}} = $_; } - - # Delphi -my %keywords; -foreach( - split ' ', - 'and array as asm at automated begin case class const constructor destructor dispinterface div '. - 'do downto else end except exports file finalization finally for function goto if implementation '. - 'in inherited initialization inline interface is label library mod nil not object of on or out '. - 'packed private procedure program property protected public published raise read record repeat '. - 'resourcestring set shl shr string then threadvar to try type unit until uses var while with write xor' - ) { $keywords{$_} = 1; } - - # -foreach(glob "$src_path/*.pas") { processFileCallback($_); } -if (%units){ - # - mkdir $out_path, 0777; - # - print "Writing HTML files...\n"; - writeHTML(); - # - print "Writing type index...\n"; - writeTypeIndex(); - # HTML Help - print "Writing HTML Help Project...\n"; - writeHHP(); - print "Writing HTML Help Project Contents...\n"; - writeHHC(); - print "Writing HTML Help Project Keywords...\n"; - writeHHK(); - print "Generating HTML Help...\n"; - my $dos_hhp = "$out_path/$hhp_file"; - $dos_hhp =~ s|/|\\|g; - print `"$hh_compiler" $dos_hhp`; - # - print "Removing generated files...\n"; - my $dos_remove_pattern = "$out_path/$file_prefix*.*"; - $dos_remove_pattern =~ s|/|\\|g; - `del $dos_remove_pattern`; - print "Done\n"; - exit 0; -} else { - print "No files found\n"; - exit 1; -} - -###################################################################################################################### - -sub hiliteKeyword { - my ($word, $pre) = @_; - if ($pre !~ /.*<[^>]*$/) { - if ($keywords{lc($word)}) { - $word = "$word"; - } elsif (my $refobj = $allobjs{$word}) { - $word = qq|$word|; - } - } - return $word; -} -sub hiliteSymbol { - my ($sym, $pre) = @_; - return ($pre !~ /.*<[^>]*$/)?"$sym":$sym; -} - - # : (String): String -sub highlight($) { - my $str = shift; - $str =~ s|(\w+)|hiliteKeyword($1, $`)|ge; # - $str =~ s|([^\w<> ]+)|hiliteSymbol($1, $`)|ge; # - return $str; -} - - # : (RefUnit, ObjName, ObjTypeChar, ObjDecl, ObjComment) -sub regObj { - my $refobj = { - REFUNIT => $_[0], - NAME => $_[1], - HTMLFILE => "$file_prefix$_[0]->{NAME}-$_[1].html", - TYPE => $_[2], - DECL => $_[3], - COMMENT => $_[4], - ATTRS => {} - }; - $_[0]->{OBJECTS}->{$_[1]} = $refobj; - $allobjs{$_[1]} = $refobj; - return $refobj; -} - - # Callback-, . , . %units -sub processFileCallback { - if (-s && /\.pas$/i) { - my $file = shift; #$File::Find::name; - # Parse the input file - open(FI, $file) or die "Cannot open $file for reading: $!"; - my $intf_clause = 0; - my $type_clause = 0; - my $header_processed = 0; - my $comment = ''; - my $refunit; - my $refobject; - while(){ - chomp; - # , - if (m|^\s*//\s*(?:--)?\s*(.*[A-Za-z-].*)| && !m(\$Id:|///|Props|Prop handlers|Prop storage|Message handlers|Events)i) { - $comment .= ($comment?' ':'').$1; - # : unit XXXXX; - } elsif (/^\s*unit\s+(\w+)\;/i) { - $refunit = { - NAME => $1, - HTMLFILE => $file_prefix."unit-$1.html", - SIZE => -s $file, - COMMENT => $comment, - OBJECTS => {} - }; - $units{$1} = $refunit; - # 'interface' section - } elsif ($refunit && /^\s*interface\s*$/i) { - $intf_clause = 1; - # 'type' section - } elsif ($intf_clause && /^\s*type\s*$/i) { - $type_clause = 1; - # end of 'type' section - } elsif ($type_clause && /^\s*(?:const|var|resourcestring|threadvar)\s*$/i) { - $type_clause = 0; - # 'implementation' section - } elsif (/^\s*implementation\s*$/i) { - last; - # - } elsif ($type_clause && /\b(\w+)\s*=\s*(class|interface)\(\s*([\w, ]+)\s*\)/i) { - $refobject = regObj($refunit, $1, uc(substr($2, 0, 1)), $3, $comment); - $comment = ''; - # - } elsif ($type_clause && /\b(\w+)\s*=\s*((?:packed\s*)?record)/i) { - $refobject = regObj($refunit, $1, 'R', $2, $comment); - $comment = ''; - # - } elsif ($type_clause && /\b(\w+)\s*=\s*\^\s*(\w+)/) { - $refobject = regObj($refunit, $1, 'P', $2, $comment); - $comment = ''; - # - } elsif ($type_clause && /\b(\w+)\s*=\s*(\([\s\w.,]+\))/) { - $refobject = regObj($refunit, $1, 'E', $2, $comment); - $comment = ''; - # - } elsif ($refobject && /^\s*(property|function|procedure)\s*(\w+)\s*(.*;)/i) { - $refobject->{ATTRS}->{$2} = { - NAME => $2, - KIND => $1, - DECL => $3, - COMMENT => $comment - }; - $comment = ''; - # - } elsif ($refobject && $refobject->{TYPE} eq 'R' && /^\s*(\w+)\s*:\s*(\w+)\s*;\s*(?:\/\/\s*)?(.*)/) { - $refobject->{ATTRS}->{$1} = { - NAME => $1, - KIND => '', - DECL => ': '.$2, - COMMENT => $3 - }; - $comment = ''; - # - } elsif ($refobject && /\bend\s*;/) { - undef $refobject; - $comment = ''; - } elsif (/\w+/ && !/^\s*type\s*$/i) { - $comment = ''; - } - } - close(FI); - } -} - - # HTML- (FileHandle) -sub writeFileFooter($) { - my $fh = shift; - print $fh < - - -END -} - - # HTML- (FileHandle, Title, Header, Comment) -sub writeFileHeader { - my ($fh, $title, $header, $comment) = @_; - print $fh < - - - $title - - - -

$header

-

$comment -

-END -} - - # HTML Help Project Contents -sub writeHHC { - # API reference - my $new_contents = - qq|
    \n|. - qq|
  • \n|. - qq|
      \n|; - # -- - foreach my $unitname(sort keys %units) { - my $refunit = $units{$unitname}; - $new_contents .= - qq|
    • \n|. - qq|
        \n|; - # - my %objects = %{$refunit->{OBJECTS}}; - foreach my $objname(sort keys %objects) { - my $refobj = $objects{$objname}; - $new_contents .= qq|
      • \n|; - } - $new_contents .= qq|
      \n|; - }; - # -- - $new_contents .= - qq|
    \n|. - qq|
  • \n|. - qq|
\n|; - # - # -- - open(FH_In, "$out_path/$source_hhc_file") or die "Cannot open $out_path/$source_hhc_file for reading: $!\n"; - # -- - open(FH_Out, ">$out_path/$hhc_file") or die "Cannot open $out_path/$hhc_file for writing: $!\n"; - my $insertion_point_found = 0; - while() { - # - print FH_Out $_; - # , - - $insertion_point_found = 1 if(//i); - # - if($insertion_point_found && /<\/object>/i) { - $insertion_point_found = 0; - print FH_Out $new_contents; - } - } - close(FH_Out); - close(FH_In); -} - - # HTML Help Project Keywords -sub writeHHK { - open(FHK, ">$out_path/$hhk_file") or die "Cannot open $out_path/$hhk_file for writing: $!\n"; - # - print FHK < - - - -
    -END - # - foreach my $kw(sort (keys %units, keys %allobjs)) { - my $refobj = $allobjs{$kw}; - my $file = $refobj ? $refobj->{HTMLFILE} : $units{$kw}->{HTMLFILE}; - print FHK qq|
  • \n|; - }; - # - print FHK - qq|
\n|. - qq|\n|; - close(FHK); -} - - # HTML Help Project -sub writeHHP { - # - # -- - open(FH_In, "$out_path/$source_hhp_file") or die "Cannot open $out_path/$source_hhp_file for reading: $!\n"; - # -- - open(FH_Out, ">$out_path/$hhp_file") or die "Cannot open $out_path/$hhp_file for writing: $!\n"; - while() { - # - s/^(Contents file=).*/$1$hhc_file\n/; - # - print FH_Out $_; - # [OPTIONS] - print FH_Out "Index file=$hhk_file\n" if(/\[OPTIONS\]/i); - # [FILES] - print FH_Out join("\n", @htmlfiles), "\n" if(/\[FILES\]/i); - } - close(FH_Out); - close(FH_In); -} - - # HTML- -sub writeHTML{ - # TOC - push @htmlfiles, $toc_file; - open(FHTOC, ">$out_path/$toc_file") or die "Cannot open $out_path/$toc_file for writing: $!\n"; - writeFileHeader( - \*FHTOC, - 'Unit Reference', - 'Unit Reference', - qq|List of $usr_short_name units in alphabetical order - Type Index|); - # - print FHTOC - "\n". - "\n"; - my $idx_unit = 0; - foreach my $unitname(sort keys %units) { - my $refunit = $units{$unitname}; - # / - my $type_nav_html = ''; - foreach my $reftype(@types) { - my $typechar = $reftype->{CHAR}; - # - my $objcount = 0; - foreach my $objname(keys %{$refunit->{OBJECTS}}) { $objcount++ if $refunit->{OBJECTS}->{$objname}->{TYPE} eq $typechar; } - # - - $type_nav_html .= - qq| $typechar$objcount| - if $objcount; - } - # TOC - my $unit_color = $idx_unit%2?' bgcolor=#f0f0f0':''; - print FHTOC - qq|\n|. - qq| \n|. - qq| \n|. - qq| \n|. - qq|\n|; - # HTML- - writeUnit($refunit); - # - $idx_unit++; - }; - # - print FHTOC "
UnitSizeDescription
$unitname
$type_nav_html
$refunit->{SIZE}$refunit->{COMMENT}
\n"; - # TOC - writeFileFooter(\*FHTOC); - close(FHTOC); -} - - # HTML- : (RefUnit, RefObj) -sub writeObj { - my ($refunit, $refobj) = @_; - # HTML- - push @htmlfiles, $refobj->{HTMLFILE}; - open(FHO, ">$out_path/$refobj->{HTMLFILE}") or die "Cannot open $out_path/$refobj->{HTMLFILE} for writing: $!\n"; - writeFileHeader( - \*FHO, - "$refunit->{NAME} / $refobj->{NAME}", - qq|$usr_short_name / $refunit->{NAME} / $refobj->{NAME} $typebychar{$refobj->{TYPE}}->{TITLE}|, - $refobj->{COMMENT}); - # - my $idx_attr = 0; - print FHO "\n"; - foreach my $attrname(sort keys %{$refobj->{ATTRS}}) { - my $refattr = $refobj->{ATTRS}->{$attrname}; - my $attr_color = $idx_attr%2?' bgcolor=#f0f0f0':''; - my $attr_html = highlight("$refattr->{KIND} $attrname$refattr->{DECL}"); - print FHO - qq|\n|. - qq| \n|. - qq| \n|. - qq|\n|; - $idx_attr++; - } - print FHO "
\n|. - qq| $attr_html\n|. - qq| $refattr->{COMMENT}
\n"; - print FHO qq|

$refunit->{NAME} unit - contents - type index|; - # HTML- - writeFileFooter(\*FHO); - close(FHO); -} - - # -sub writeTypeIndex { - push @htmlfiles, $typeidx_file; - open(FHTI, ">$out_path/$typeidx_file") or die "Cannot open $out_path/$typeidx_file for writing: $!\n"; - writeFileHeader(\*FHTI, 'Type Index', qq|$usr_short_name / Type Index|, "List of all $usr_short_name types in alphabetical order"); - # - print FHTI - "\n". - "\n"; - my $idx_type = 0; - foreach my $typename(sort keys %allobjs) { - my $type_color = $idx_type%2?' bgcolor=#f0f0f0':''; - my $refobj = $allobjs{$typename}; - print FHTI - qq|\n|. - qq| \n|. - qq| \n|. - qq| \n|. - qq| \n|. - qq|\n|; - $idx_type++; - }; - # - print FHTI "
TypeObjectUnitComments
$typebychar{$refobj->{TYPE}}->{TITLE}$refobj->{NAME}$refobj->{REFUNIT}->{NAME}$refobj->{COMMENT}
\n"; - # - writeFileFooter(\*FHTI); - close(FHTI); -} - - # HTML- : (RefUnit) -sub writeUnit { - my ($refunit) = @_; - # HTML- - push @htmlfiles, $refunit->{HTMLFILE}; - open(FHU, ">$out_path/$refunit->{HTMLFILE}") or die "Cannot open $out_path/$refunit->{HTMLFILE} for writing: $!\n"; - writeFileHeader( - \*FHU, - "$refunit->{NAME}", - qq|$usr_short_name / $refunit->{NAME} unit|, - "$refunit->{COMMENT}
Size: $refunit->{SIZE}"); - # - foreach my $reftype(@types) { - my $typechar = $reftype->{CHAR}; - # - my $idx_obj = 0; - my $obj_html = ''; - foreach my $objname(sort keys %{$refunit->{OBJECTS}}) { - my $refobj = $refunit->{OBJECTS}->{$objname}; - # - if ($refobj->{TYPE} eq $typechar) { - my $obj_color = $idx_obj%2?' bgcolor=#f0f0f0':''; - my $obj_printed = highlight(&{sub{$typebychar{$refobj->{TYPE}}->{PRINTER}}}->($refobj)); - $obj_html .= - qq|\n|. - qq| \n|. - qq| $obj_printed\n|. - qq| \n|. - qq| $refobj->{COMMENT}\n|. - qq|\n|; - # HTML- - writeObj($refunit, $refobj); - $idx_obj++; - } - } - # - - if ($obj_html) { - print FHU - qq|\n|. - qq|\n|. - qq|$obj_html|. - qq|
$reftype->{NAME}
\n|; - } - } - print FHU qq|

contents - type index|; - # HTML- - writeFileFooter(\*FHU); - close(FHU); -} diff --git a/Help/dklang-001-en-88x31.gif b/Help/dklang-001-en-88x31.gif deleted file mode 100644 index 49be0b2..0000000 Binary files a/Help/dklang-001-en-88x31.gif and /dev/null differ diff --git a/Help/dklang-002-en-88x31.gif b/Help/dklang-002-en-88x31.gif deleted file mode 100644 index 64a75f8..0000000 Binary files a/Help/dklang-002-en-88x31.gif and /dev/null differ diff --git a/Help/dklang.hhc b/Help/dklang.hhc deleted file mode 100644 index 2fc096c..0000000 --- a/Help/dklang.hhc +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - -

    -
  • - - - -
      -
    • - - - - -
    • - - - -
        -
      • - - - -
      • - - - -
      -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    -
  • - - - -
      -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    • - - - -
    -
  • - - -
- diff --git a/Help/dklang.hhp b/Help/dklang.hhp deleted file mode 100644 index 74ed296..0000000 --- a/Help/dklang.hhp +++ /dev/null @@ -1,47 +0,0 @@ -;*********************************************************************************************************************** -; $Id: dklang.hhp,v 1.3 2006-08-11 17:54:25 dale Exp $ -;----------------------------------------------------------------------------------------------------------------------- -; DKLang Translation Editor -; Copyright 2002-2006 DK Software, http://www.dk-soft.org/ -;*********************************************************************************************************************** -[OPTIONS] -Auto Index=Yes -Compatibility=1.1 or later -Compiled file=dklang.chm -Contents file=dklang.hhc -Default topic=index.html -Display compile notes=No -Display compile progress=No -Full-text search=Yes -Language=0x409 () -Title=DKLang Localization Package Help - - -[FILES] -example-ansi.html -example-constants.html -example-frames.html -example-mdi.html -example-notepad.html -example-resource.html -example-simple.html -index.html -lgpl-2.1.txt -main-banners.html -main-contributors.html -main-general-description.html -main-installation.html -main-issues-drawbacks.html -main-legal-info.html -main-package-contents.html -main-package-features.html -main-release-notes-3.0.html -main-requirements.html -main-revision-history.html -main-supplied-examples.html -main-technology-and-background.html -main-upgrading.html -mpl-1.1.txt - -[INFOTYPES] - diff --git a/Help/dklang100x100.jpg b/Help/dklang100x100.jpg deleted file mode 100644 index 03381aa..0000000 Binary files a/Help/dklang100x100.jpg and /dev/null differ diff --git a/Help/example-ansi.html b/Help/example-ansi.html deleted file mode 100644 index 8ed85a0..0000000 --- a/Help/example-ansi.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Ansi Example - - -

Ansi Example

-
- - -

File: Examples\Ansi\DKLang_Ansi_Demo.dpr - -

This example resembles Simple one except that it uses only conventional VCL - controls instead of Tnt Unicode Controls so it can't correcty display any interface language with character set other - than currently set default for non-Unicode programs. - -

Notice that the following line causes implicit Unicode-to-ANSI conversion: -

-cbLanguage.Items.Add(LangManager.LanguageNames[i]); -
- -

This is because LangManager.LanguageNames[] returns a WideString while cbLanguage.Items.Add() takes an AnsiString - as an argument. Implicit WideString to AnsiString and back conversions always use system default code page set for - Unicode-unaware software (configured in Regional Settings application of Control Panel). This is the best what we - might do here because language names returned by LangManager.LanguageNames[] are also taken from the system, being - produced in the current interface language. There's a good chance this language is the same as language being used for - non-Unicode programs, but if they differ, we again can't ensure language list is displayed correctly. - - -

- - \ No newline at end of file diff --git a/Help/example-constants.html b/Help/example-constants.html deleted file mode 100644 index 665711a..0000000 --- a/Help/example-constants.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Constants Example - - -

Constants Example

-
- - -

File: Examples\Constants\DKLang_Constants_Demo.dpr - -

This is a little bit more advanced example on DKLang Package usage. - -

When you click the Test button, a message box is displayed, with the text taken from a constant. You can edit - the project constants ONLY by using Project | Edit project constants... menu item. Don't edit the .dklang file - directly as its contents is generated and updated automatically! - -

Notice constant resource link directive in the project source file (.dpr): - -

{$R *.dkl_const.res}
- - -
- - \ No newline at end of file diff --git a/Help/example-frames.html b/Help/example-frames.html deleted file mode 100644 index c58b19a..0000000 --- a/Help/example-frames.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Frames Example - - -

Frames Example

-
- - -

File: Examples\Frames\DKLang_Frames_Demo.dpr - -

This is a basic example on how you use frames with DKLang Package. The three frames are translated from a single - language file section. This is achieved by assigning the SectionName property in the base frame class - (TfrFontSettings) so all three its descendants (inlined in the main form) also have the same value for - SectionName. This way all tree frames are associated with the same translation. - -

This is only one of four possible methods of translating frames. - -

The second method would use empty value for SectionName thus causing the section to bear name frFontSettings; - for the inlined frame to be translated automatically, the frame component should be named the same, ie. - frFontSettings. Obviously, this allows for having only one instance of a frame on a form. - -

The third method assumes you turn off autosaving (exclude dklcoAutoSaveLangSource from lcMain.Options) - in the base frame class, but turning it back on in the inlined descendant frames. This way you can have several frame - instances on a form, but each frame is translated separately. Do not forget to exclude frame properties from form's - language controller (inspect this fMain.lcMain.IgnoreList to learn how you do it). - -

And finally you can have no controller at all in the base frame, but rather serve all the form component hierarchy, - including inlined frames' components, with the only form's controller. This way you also can have several frame - instances with each property translated separately. - -

It's up to you to decide which method is more suitable for your needs; you can use different methods in a project. - -

Also this example demonstrates project constants usage. - - -

- - \ No newline at end of file diff --git a/Help/example-mdi.html b/Help/example-mdi.html deleted file mode 100644 index 4796cd9..0000000 --- a/Help/example-mdi.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - MDI Example - - -

MDI Example

-
- - -

File: Examples\MDI\DKLang_MDI_Demo.dpr - -

This is a simple example on using DKLang Package in an MDI application. While it seems to be a quite general task, - there's a trick to make it live. - -

The point is that each MDI child is created owned by the parent form (fMain). VCL requires that all owned - components have unique names across their owner, so you would never be able to have two (or more) instances of a form - owned by fMain if they aren't renamed. - -

VCL offers a cheap solution for this: it renames the second instance of fMDIChild to fMDIChild_1, third to - fMDIChild_2 and so on. - -

But we want all of the forms being translated from the same section of the language file, don't we? So our answer to - VCL's behaviour is that we set fMDIChild.lcMain.SectionName to 'fMDIChild', and now that works. - - -

- - \ No newline at end of file diff --git a/Help/example-notepad.html b/Help/example-notepad.html deleted file mode 100644 index ab83c69..0000000 --- a/Help/example-notepad.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Notepad Example - - -

Notepad Example

-
- - -

File: Examples\Simple\DKLang_Notepad_Demo.dpr - -

This is a more functional example of a localizable application written in the spirit of Windows Notepad. - - -

- - \ No newline at end of file diff --git a/Help/example-resource.html b/Help/example-resource.html deleted file mode 100644 index f3c046f..0000000 --- a/Help/example-resource.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Resource Example - - -

Resource Example

-
- - -

File: Examples\Resource\DKLang_Resource_Demo.dpr - -

This is an example on using DKLang Package with language files built in application's resources. - -

The supplied LangFiles.rc file is a source resource script. Being compiled with Borland Resource Compiler, - brcc32.exe (found in Delphi's Bin directory), it produces a corresponding resource binary, - LangFiles.res. - -

The latter is linked into the application using the $R directive located at Main.pas. - -

Note that you can also keep using the conventional method of scanning for .lng files in conjunction with having some - language files residing in the executable's resources. - - -

- - \ No newline at end of file diff --git a/Help/example-simple.html b/Help/example-simple.html deleted file mode 100644 index 05e655c..0000000 --- a/Help/example-simple.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Simple Example - - -

Simple Example

-
- - -

File: Examples\Simple\DKLang_Simple_Demo.dpr - -

This is a most simple example on how DKLang Package works. Only GUI elements are localized in this example. - -

Notice that in contrast with Ansi Example all controls used are Unicode-aware - controls (Tnt controls), so on an Unicode-enabled platform (NT, 2000 or XP) they will correctly display any language - (provided system font has an appropriate code page). - - -

- - \ No newline at end of file diff --git a/Help/index.html b/Help/index.html deleted file mode 100644 index 4e1dc6f..0000000 --- a/Help/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - DKLang Localization Package Help - - -

DKLang Localization Package

-
- - -

DKLang Logo - -

Copyright ©2002-2006 Dmitry Kann, - http://www.dk-soft.org/. - - -

- - \ No newline at end of file diff --git a/Help/lgpl-2.1.txt b/Help/lgpl-2.1.txt deleted file mode 100644 index 5ab7695..0000000 --- a/Help/lgpl-2.1.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/Help/main-banners.html b/Help/main-banners.html deleted file mode 100644 index b44b5b7..0000000 --- a/Help/main-banners.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Banners - - - -

Banners

-
- - -

You can use these banners to indicate that your application has been localized with DKLang, and thus promote the - package. - -

Click a banner to view the code: - -

- DKLang: an opensource localization package for Delphi - DKLang: an opensource localization package for Delphi - -

Banner code: -

- - -
- - \ No newline at end of file diff --git a/Help/main-contributors.html b/Help/main-contributors.html deleted file mode 100644 index 1ed7be4..0000000 --- a/Help/main-contributors.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Contributors - - -

Contributors

-
- - -

The initial Unicode-enabled version of DKLang was developed by Bruce J. Miller. - -

DKLang uses Unicode support routines and classes from Tnt Delphi Unicode - Controls by Troy Wolbrink. - - -

- - \ No newline at end of file diff --git a/Help/main-general-description.html b/Help/main-general-description.html deleted file mode 100644 index 4f48596..0000000 --- a/Help/main-general-description.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - General Description - - -

General Description

-
- - -

DKLang Localization Package is a set of classes intended to simplify localization of applications written in - Delphi. - -

What are the benefits of DKLang compared to Borland's ITE (Integrated Translation Environment)? - -

    -
  • First, DKLang is completely free while ITE is only supplied with Delphi Enterprise Edition. Moreover, - DKLang is open-source so you always can see 'how the wind blows'. -
  • Second, DKLang is very lightweight and runtime-optimized. You always get predictable results as the implemented - technology is obvious and transparent. -
  • Third, DKLang allows transparent language switching at any time while ITE relies on a resource DLL with predefined - extension when loading the program and you cannot change the language further. -
  • Fourth, Application using DKLang can consist of the only executable which includes any number of languages in its - resource; it allows you to decide yourself which language should be included 'statically' and which ones are - linked when program runs. In contrast, ITE always requires that a DLL with predefined extension for each language - resides in the program directory: this means you should redistribute all the language DLLs with each copy of the - program. -
  • And finally, language files are plain-text files so one can edit them with any text editor supporting Unicode. ITE - uses only compiled resource DLLs prepared with using special Translation Manager. -
- - -
- - \ No newline at end of file diff --git a/Help/main-installation.html b/Help/main-installation.html deleted file mode 100644 index 5454ec6..0000000 --- a/Help/main-installation.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Installation - - -

Installation

-
- - -
    -
  1. Unpack the package files into a directory. -
  2. Start Delphi IDE. -
  3. Open Packages\dklangN.dpk (where N is your Delphi version: 6 for Delphi 6, 7 for Delphi 7, 9 for BDS - 2005, 10 for BDS 2006) and click Compile. -
  4. Open Packages\dcldklangN.dpk (where N is again your Delphi version), click Compile, then - click Install. -
  5. Close the files (don't save the changes if any). -
  6. Add the path to DKLang.pas to the IDE library path. -
- -

Notice that both compiled packages (dklangN.bpl and dcldklangN.bpl) must reside in a directory listed - in system PATH (usually packages are compiled to ...\Borland\DelphiN\Projects\Bpl (Delphi 6 and 7) or - personal folder\Borland Studio Projects\Bpl (Delphi 8+)). - -

If you're upgrading: don't forget to read Upgrading from previous versions - section. - - -

- - \ No newline at end of file diff --git a/Help/main-issues-drawbacks.html b/Help/main-issues-drawbacks.html deleted file mode 100644 index 1228508..0000000 --- a/Help/main-issues-drawbacks.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Issues/Drawbacks - - -

Issues/Drawbacks

-
- - -
    -
  • The implemented localization mechanism doesn't support VFI (visual form inheritance). It is recommended to put - language controller onto a final, derived form, and not onto the common ancestor form, since there's no means to - track the origin of a property value. -
  • No support for custom-defined properties implemented (ie. ones defined with DefineProperties() method). - Implementing such a feature would require knowing and analyzing all the form (visual) ancestors, which is a - somewhat hard task. -
  • You cannot properly handle the forms open in the IDE as standalone files. DKLang package requires that you have an - active project open. -
- - -
- - \ No newline at end of file diff --git a/Help/main-legal-info.html b/Help/main-legal-info.html deleted file mode 100644 index 66a94fb..0000000 --- a/Help/main-legal-info.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Legal Info - - -

Legal Info

-
- - -

The contents of this package are subject to the Mozilla Public License Version 1.1 (the - License); you may not use this package except in compliance with the License. - -

Alternatively, you may redistribute this library, use and/or modify it under the terms of the GNU Lesser General - Public License as published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - -

Software distributed under the License is distributed on an as is basis, without warranty of any kind, - either express or implied. See the License for the specific language governing rights and limitations under the - License. - -

The initial developer of the original code is Dmitry Kann, - http://www.dk-soft.org/. - - -

- - \ No newline at end of file diff --git a/Help/main-package-contents.html b/Help/main-package-contents.html deleted file mode 100644 index 174cd71..0000000 --- a/Help/main-package-contents.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Package Contents - - -

Package Contents

-
- - - - - - - - - - - - - - - - - - - -
DKLang.pasA package source file
DKLangReg.dcrA package source file
DKLangReg.pasA package source file
DKL_ConstEditor.dfmA package source file
DKL_ConstEditor.pasA package source file
DKL_Expt.pasA package source file
dklang.chmThis help file
Converter_v2/Converter for upgrading from version 2.x (source files)
Examples/Demo projects
Packages/Package files
- - -
- - \ No newline at end of file diff --git a/Help/main-package-features.html b/Help/main-package-features.html deleted file mode 100644 index 0902ab5..0000000 --- a/Help/main-package-features.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - Package Features - - -

Package Features

-
- - -
    -
  • Ease of use. Put a TDKLanguageController on the form, save the project (this will automatically create a - language source file) and add a couple of lines to program code: you get a functional multilanguage application! - See the included examples to learn the details. -
  • Full integration with Delphi VCL component library. A possibility of automated change tracking in structure or - properties of forms, frames, data modules etc., and owned components. -
  • Complete Unicode support (on a robust basement of Tnt Delphi Unicode Controls). -
  • Storing property values for String (AnsiString), ShortString and WideString properties. - Storing property values of class TStrings, TWideStrings, TCollection item properties and - property values of TPersistent descendants. Only the properties recognized by Delphi streaming mechanism as - stored are processed to avoid storing excessive data. -
  • A possibility for defining a set of string constants for a project. A constant is referred to by its name (binary - name search is implemented). See the Constants Example. -
  • Storing translations in plain-text (ANSI or Unicode) files, which can be edited with any text editor. However, - there's a much more convenient tool available for creating the translations, - DKLang Translation - Editor. -
  • Synchronous language switching in all displayed forms by changing the current language of global - TDKLanguageManager instance. -
  • Events fired in a non-visual component just before and after the language change. -
  • A possibility for ignoring any properties, as well as a list of forcibly stored properties recognized as not - stored. Both lists are formed using name masks (eg, *.Font.Name). -
  • Automated saving the localization data for the whole project into a so-called language source file (a file having - .dklang extension). -
  • A possibility of using the localization mechanism when no visual forms instantiated (for localizing constants - only). A possibility of building the project with DKLang runtime package. -
  • A thread-safe design allowing for proper functioning in multithreaded environment. This allows non-blocking data - read access with a number of threads at once. -
- -

Read Technology And Background section to learn the details. - - -

- - \ No newline at end of file diff --git a/Help/main-release-notes-3.0.html b/Help/main-release-notes-3.0.html deleted file mode 100644 index 4f3ad73..0000000 --- a/Help/main-release-notes-3.0.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Release notes - - -

Release notes: DKLang version 3.0

-
- - -

This is a major update to the package. - -

The main novelty is complete Unicode support at design level, so package handles all language data as Unicode strings - (WideString). This resulted in Unicode .dklang (and .lng) files being created and loaded. - -

You are strongly recommended to upgrade your - DKLang Translation - Editor to version 3.0 as well. This is also because of Unicode support. - -

The problem with constant editor in Delphi 2005+ is resolved by using a separate resource file. This requires - converting your old project using constants. So, if you were using DKLang version 2.x, please carefully read - Upgrading from previous versions prior to installing. - -

Version 3.0 introduces support for Delphi 2006, but it isn't tested yet (simply because I don't have it). I believe - it should be okay though. - -

Further details you can find in Revision History section. - -

Dmitry Kann - - -

P. S. I would be thankful if you send me translations for my examples - in your native language (Unicode files only please). - - -

- - \ No newline at end of file diff --git a/Help/main-requirements.html b/Help/main-requirements.html deleted file mode 100644 index df1ef74..0000000 --- a/Help/main-requirements.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Requirements - - -

Requirements

-
- - -

The Package was designed for the following versions of Borland IDE (all with the latest updates applied): -

    -
  • Delphi 6 -
  • Delphi 7 -
  • BDS 2005 -
  • BDS 2006 (didn't tested yet) -
- -

DKLang Localization Package requires Tnt Delphi Unicode Controls by Troy Wolbrink. You can freely download and - install Tnt Controls package from http://www.tntware.com/. - -

Tnt Controls package is necessary for both runtime and designtime parts of DKLang. - - -

- - \ No newline at end of file diff --git a/Help/main-revision-history.html b/Help/main-revision-history.html deleted file mode 100644 index c493634..0000000 --- a/Help/main-revision-history.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Revision History - - -

Revision History

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
DKLang 3.01
- [Aug 22, 2006]
-
    -
  • Updated for BDS 2006 compatibility, thanks to - Robert Lee. -
-
DKLang 3.0
- [Aug 08, 2006]
-
    -
  • The package is rewritten to implement full Unicode support; initial Unicode-enabled version is developed by - Bruce J. Miller: -
      -
    • String values became WideString (component property values, constants and all others - except component, property and constant names). -
    • Added new TDKLanguageManager properties: CodePage, ConstantValueA[], ConstantValueW[]. -
    • Added new TDKLanguageController options: dklcoIgnoreNonAlphaProps (ignore all properties with no alpha - characters), dklcoIgnoreFontProps (ignore all TFont properties). -
    • Added new global functions for retrieving constant values: DKLangConstW(), DKLangConstA(). -
    • Removed function GetLangIDName(); WideGetLocaleStr() should be used instead. -
    -
  • Constants are no longer stored in project resource file (.res). Instead, they are stored in a separate - resource file (.dkl_const.res). -
  • New examples: Ansi, Notepad. -
  • Converted all readme files into single .chm including API reference. -
  • Added support for BDS 2006. -
-
DKLang 2.4
- [Jun 23, 2005]
-
    -
  • Added property TDKLanguageController.SectionName which allows customizing section which stores language - data. -
  • Added properties TDKLanguageManager.LanguageIndex, TDKLanguageManager.LanguageResources[]. -
  • Bug fix: TDKLanguageManager.IndexOfLanguageID() returned value less by 1 than correct value for non-default - languages. -
  • New examples: Frames, MDI, Resource. -
-
DKLang 2.3
- [Dec 21, 2004]
-
    -
  • DKLang now uses a double licensing system. You may use, modify or redistribute it either under Mozilla - Public License 1.1, or under GNU Lesser General Public License 2.1 terms. In particular, this - means the library can be used in any GPL-licensed application or library. -
  • Fixed dcldklang* installation problem under non-English versions of Delphi. -
-
DKLang 2.2
- [Nov 27, 2004]
-
    -
  • Added support for Delphi 2005. -
  • Changed the order of applying a language: first constants are updated, then controllers. This allows to read - correct constant values in controllers' OnLanguageChanged event handlers. -
-
DKLang 2.1
- [Sep 26, 2004]
The first public release (all prior versions were only for private use).
- - -
- - \ No newline at end of file diff --git a/Help/main-supplied-examples.html b/Help/main-supplied-examples.html deleted file mode 100644 index b41a228..0000000 --- a/Help/main-supplied-examples.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - Supplied Examples - - -

Supplied Examples

-
- - -

The following examples are included with this package: - -

- - -
- - \ No newline at end of file diff --git a/Help/main-technology-and-background.html b/Help/main-technology-and-background.html deleted file mode 100644 index ea32008..0000000 --- a/Help/main-technology-and-background.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - Technology And Background - - -

Technology And Background

-
- - -

VCL integration

- -

The package introduces a non-visual VCL component called TDKLanguageController, which is to be placed on each - form you wish to localize. Language controller automatically maintains an internal list of all components and their - properties of type String (also known as AnsiString or long string), ShortString and WideString (complete Unicode - support is implemented). There's a little chance you will ever need another type of data to be changed in synch with - language change. - -

So, the language controller keeps a list of component properties, each having assigned a form-wide unique natural - number identifier (ID). This is done transparently by the controller so you don't need to bother when you add or - remove components to/from the form, or change their property values. - -

Additionally, if a controller's Options include dklcoAutoSaveLangSource (this is the default), the - controller saves its data in a plain text file (starting with version 3.0 of the package the file encoding is Unicode) - into the so-called project language source, each time you save modifications to the form the controller is on. The - project language source is a file named the same as the project (.dpr) file, but having .dklang extension. Each - controller replaces the corresponding section in that file when it saves its data. If autosave is off you are still - able to save the controller data by right-clicking the component on the form and selecting the Save data to project - language source item. You may also select the Project | Update project language source main menu item, this - will force all the contollers available for the project to update their language source in project's .dklang file. - -

Language Manager

- -

The package also introduces TDKLanguageManager class an instance of which is accessible via global function - LangManager. The manager is instantiated first time the function is called. This will happen once a form having - a controller will be instantiated, or when you invoke the LangManager e. g. to scan for language files (see the - provided examples). Language manager performs all tasks of maintaining the - list of available languages or switching between them. - -

Understanding constants

- -

Constants are often used to display messages, titles, labels etc. in language that should match the program - language. DKLang offers a simple yet functional solution of implementing constants. - -

You define a set of constants in the default language of your project using Project | Edit project - constants... IDE menu item (a project must be open in IDE). This opens DKLang Constant Editor dialog - allowing you to review, edit, add or remove constants. - -

In order to link constant resource file to your project add the following line to project source file (.dpr):
-

{$R *.dkl_const.res}
- -

A constant entry consists of a name and a value.
- Constant name must meet the standard Delphi identifier naming requirements, i. e. consist of alphanumric, - digit and underscore characters only and not start with a digit; the name must be unique (case makes no sense) over - the whole list.
- Constant value is a WideString (Unicode) value which can also be empty. - -

To read value of a constant you use its name (again, case-insensitively) and obtain an Unicode (original) or ANSI - value (converted from Unicode using appropriate code pade) using these functions: - -

DKLangConstW('MyConstant') // Unicode
-DKLangConstA('MyConstant') // ANSI
- -

Making a translation

- -

You may use freeware DKLang - Translation Editor application to open the language source files (.dklang), and to create new translations (.lng - files) based on them. - -

NB: Do not edit .dklang files directly since the contents of these files is controlled automatically by - language controllers and constant editor. Any changes to property mappings or constant values will be lost once the - file is updated!
- Nevertheless, you can add your custom comments (each line starting with a semicolon) at the top of the file. The - package leaves such comments intact. - - -

- - \ No newline at end of file diff --git a/Help/main-upgrading.html b/Help/main-upgrading.html deleted file mode 100644 index d9a66ce..0000000 --- a/Help/main-upgrading.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Upgrading from previous versions - - -

Upgrading from previous versions

-
- - -

Upgrading from 2.x

- -

The following moments should be considered: -

    -
  1. DKLang starting with version 3.0 outputs language source files (.dklang) solely in Unicode. It is also preferable - to use Unicode translation files (.lng) as well, but the package still can read ANSI files produced by version - 2.x. It uses LANGID parameter value to properly convert file contents into Unicode, so loading a translation takes - a bit longer because the loading occurs twice (first time to determine the language ID, and second time to load - the file with a correct code page).
    - To be able to load Unicode .dklang and save Unicode .lng files you have to upgrade DKLang Translation Editor to - version 3.0 or later (if available). The program will warn you if you will try to save ANSI translation based on - an Unicode source, and vice versa. -
  2. DKLang starting with version 3.0 stores constants in a separate resource file (project_name.dkl_const.res) - instead of project resource file (project_name.res). This allows editing constants in Delphi 2005 and later - thus overcoming inaccessibility of project resource interface (IOTAProjectResource) in those IDEs (this bug was - introduced in BDS 2005 and still persists in BDS 2006).
    - If you were using DKLang 2.x constants, you should convert all your projects using the - Converter, and add the following line to project source files (.dpr):
    -
    {$R *.dkl_const.res}
    -
- -

Converter from 2.x

- -

File: Converter_v2\DKLang_Converter_v2.dpr - -

Compile the converter using your IDE (most recent DKLang version must be installed before) and use it to split - project resource file project_name.res to DKLang constant resource file project_name.dkl_const.res, and - optionally to remove constant resources from the project file (you must remove it or duplicate resource name will be - reported). - -

You can also download a - precompiled Converter executable. - - -

- - \ No newline at end of file diff --git a/Help/main.css b/Help/main.css deleted file mode 100644 index 939844f..0000000 --- a/Help/main.css +++ /dev/null @@ -1,107 +0,0 @@ -/* $Id: main.css,v 1.2 2006-08-11 06:16:56 dale Exp $ */ - -body { - font-family: Verdana,Arial,serif; - font-size: 8pt; - margin: 0; - padding: 0; -} -table { - font-family: Verdana,Arial,serif; - font-size: 8pt; - border-collapse: collapse; -} -td { - vertical-align: top; - margin: 0; - padding: 2px 4px; -} -th { - font-weight: bold; - margin: 0; - padding: 2px 4px; - background-color: #e0e0e0; -} -table.framed { - border: 1px solid gray; -} -table.framed td { - border: 1px solid gray; -} -table.framed th { - border: 1px solid gray; -} -h1 { - font-family: Trebuchet MS,Verdana,Arial,serif; - font-size: 12pt; - text-align: center; - margin: 0; - padding: 8px; - background-color: #f0f0f0; - border-bottom: 1px solid gray; -} -h2 { - font-family: Trebuchet MS,Verdana,Arial,serif; - font-size: 10pt; - text-align: left; - border-bottom: 1px solid silver; -} -h3 { - font-size: 8pt; - font-weight: bold; - text-align: left; - padding-bottom: 3px; -} -a { - color: blue; - text-decoration: none; -} -a:hover { - color: red; -} -div.code { - font-family: monospace; - margin: 5px; - padding: 12px; - background-color: #f0f0ff; - border: 1px dotted gray; -} -div.pagebody { - margin: 0; - padding: 8px; -} -p { - margin: 0; - padding: 8px 0; -} - /* API Reference specific styles */ -table.decl { - background-color: silver; -} -td.comment { - color: #408040; -} -td.declmain { - width: 40%; -} -span.declaration { - color: gray; -} -span.keywd { - font-weight: bold; - color: black; -} -span.framed { - font-weight: bold; - border: 1 black solid; - padding: 0 2px; - background-color: #e0e0ff; -} -span.sub { - font-weight: normal; - font-size: 5pt; -} -span.symbol { - font-weight: normal; - color: #905000; -} diff --git a/Help/mpl-1.1.txt b/Help/mpl-1.1.txt deleted file mode 100644 index 7714141..0000000 --- a/Help/mpl-1.1.txt +++ /dev/null @@ -1,470 +0,0 @@ - MOZILLA PUBLIC LICENSE - Version 1.1 - - --------------- - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] - diff --git a/Install/exclude_list.txt b/Install/exclude_list.txt deleted file mode 100644 index 2407179..0000000 --- a/Install/exclude_list.txt +++ /dev/null @@ -1,13 +0,0 @@ -*.~* -*.dcu -*.ddp -*.dsk -*.exe -*.bat -*.pl -*.bpg -Entries -Entries.* -Repository -Root -CVS diff --git a/Install/include_list.txt b/Install/include_list.txt deleted file mode 100644 index a01b60a..0000000 --- a/Install/include_list.txt +++ /dev/null @@ -1,14 +0,0 @@ -..\*.* - -..\Packages\*.* - -..\Examples\Ansi\*.* -..\Examples\Constants\*.* -..\Examples\Frames\*.* -..\Examples\MDI\*.* -..\Examples\Notepad\*.* -..\Examples\Resource\*.* -..\Examples\Resource\LangFiles\*.* -..\Examples\Simple\*.* - -..\Converter_v2\*.* \ No newline at end of file diff --git a/MapMaker/DKL_MapMaker.cfg b/MapMaker/DKL_MapMaker.cfg deleted file mode 100644 index 45f0861..0000000 --- a/MapMaker/DKL_MapMaker.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/MapMaker/DKL_MapMaker.dof b/MapMaker/DKL_MapMaker.dof deleted file mode 100644 index 372b93b..0000000 --- a/MapMaker/DKL_MapMaker.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;VirtualExplorerListviewExD7;VirtualTreesD7;visualclx;dac70;dklang7;odacvcl70;odac70;RxCtl7;synedhilite7;syned7;sznrtl7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/MapMaker/DKL_MapMaker.dpr b/MapMaker/DKL_MapMaker.dpr deleted file mode 100644 index 5efee9b..0000000 --- a/MapMaker/DKL_MapMaker.dpr +++ /dev/null @@ -1,42 +0,0 @@ -///********************************************************************************************************************* -/// $Id: DKL_MapMaker.dpr,v 1.2 2006-06-17 04:19:28 dale Exp $ -///--------------------------------------------------------------------------------------------------------------------- -/// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org -///********************************************************************************************************************* -/// -/// The contents of this package are subject to the Mozilla Public License -/// Version 1.1 (the "License"); you may not use this file except in compliance -/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ -/// -/// Alternatively, you may redistribute this library, use and/or modify it under the -/// terms of the GNU Lesser General Public License as published by the Free Software -/// Foundation; either version 2.1 of the License, or (at your option) any later -/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ -/// -/// Software distributed under the License is distributed on an "AS IS" basis, -/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -/// specific language governing rights and limitations under the License. -/// -/// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ -/// -///********************************************************************************************************************** -program DKL_MapMaker; - -{$APPTYPE CONSOLE} - -uses - SysUtils, - DKL_MapMakerTypes in 'DKL_MapMakerTypes.pas'; - -begin - if ParamCount<1 then begin - Writeln('Usage: DKL_MapMaker '); - Halt(1); - end else if DKLang_MakeResMap(PChar(ParamStr(1))) then - Writeln(ParamStr(1)+' processed OK.') - else begin - Writeln('Error processing '+ParamStr(1)); - Halt(1); - end; -end. diff --git a/MapMaker/DKL_MapMakerTypes.pas b/MapMaker/DKL_MapMakerTypes.pas deleted file mode 100644 index 430c995..0000000 --- a/MapMaker/DKL_MapMakerTypes.pas +++ /dev/null @@ -1,37 +0,0 @@ -///********************************************************************************************************************* -/// $Id: DKL_MapMakerTypes.pas,v 1.2 2006-06-17 04:19:28 dale Exp $ -///--------------------------------------------------------------------------------------------------------------------- -/// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org -///********************************************************************************************************************* -/// -/// The contents of this package are subject to the Mozilla Public License -/// Version 1.1 (the "License"); you may not use this file except in compliance -/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ -/// -/// Alternatively, you may redistribute this library, use and/or modify it under the -/// terms of the GNU Lesser General Public License as published by the Free Software -/// Foundation; either version 2.1 of the License, or (at your option) any later -/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ -/// -/// Software distributed under the License is distributed on an "AS IS" basis, -/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -/// specific language governing rights and limitations under the License. -/// -/// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ -/// -///********************************************************************************************************************** -unit DKL_MapMakerTypes; - -interface - -const - SDKLang_ResMapMakerDLL = 'dklmapmk.dll'; - - function DKLang_MakeResMap(pcExeName: PAnsiChar): LongBool; stdcall; - -implementation - - function DKLang_MakeResMap; external SDKLang_ResMapMakerDLL name 'MakeResMap'; - -end. diff --git a/MapMaker/DLL/Main.pas b/MapMaker/DLL/Main.pas deleted file mode 100644 index e9e6752..0000000 --- a/MapMaker/DLL/Main.pas +++ /dev/null @@ -1,92 +0,0 @@ -///********************************************************************************************************************* -/// $Id: Main.pas,v 1.2 2006-06-17 04:19:28 dale Exp $ -///--------------------------------------------------------------------------------------------------------------------- -/// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org -///********************************************************************************************************************* -/// -/// The contents of this package are subject to the Mozilla Public License -/// Version 1.1 (the "License"); you may not use this file except in compliance -/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ -/// -/// Alternatively, you may redistribute this library, use and/or modify it under the -/// terms of the GNU Lesser General Public License as published by the Free Software -/// Foundation; either version 2.1 of the License, or (at your option) any later -/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ -/// -/// Software distributed under the License is distributed on an "AS IS" basis, -/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the -/// specific language governing rights and limitations under the License. -/// -/// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ -/// -///********************************************************************************************************************** -unit Main; - -interface - -const - SResourceMapFileExtension = '.drc'; - - - // Exported function. Processes the file named the same as pcExeName but with the .drc extension (those files are - // created automatically by the IDE during compile; you should either have turned on Detailed map Linker option, or - // supply -GD or --drc option to the command-line compiler). The created map is then written into the executable's - // resources. - // Returns True on successful completion, False otherwise. - function MakeResMap(pcExeName: PAnsiChar): LongBool; stdcall; - -implementation -uses SysUtils, Classes; - - function MakeResMap(pcExeName: PAnsiChar): LongBool; - var - SLInputText, SLResourceMap: TStringList; - i: Integer; - sLine, sName, sIdent: String; - - // Extract and returns the first (trimmed) word from space-delimited string s - function ExtractWord(var s: String): String; - var i: Integer; - begin - i := Pos(' ', s); - if i=0 then i := Length(s)+1; - Result := Trim(Copy(s, 1, i-1)); - Delete(s, 1, i); - end; - - begin - Result := True; - try - SLInputText := TStringList.Create; - try - SLResourceMap := TStringList.Create; - try - // Read the .drc file - SLInputText.LoadFromFile(ChangeFileExt(pcExeName, SResourceMapFileExtension)); - // Parse the file line-by-line - for i := 0 to SLInputText.Count-1 do begin - sLine := SLInputText[i]; - // If it's the #define map entry - if ExtractWord(sLine)='#define' then begin - sName := ExtractWord(sLine); - sIdent := ExtractWord(sLine); - // If there are valid values, translate it into the form 'Ident=Name' - if IsValidIdent(sName) and (StrToIntDef(sIdent, 0)>0) then - SLResourceMap.Add(Format('%s=%s', [sIdent, sName])); - end; - end; - {!!!}SLResourceMap.SaveToFile(ChangeFileExt(pcExeName, '.resmap')); - finally - SLResourceMap.Free; - end; - finally - SLInputText.Free; - end; - except - Result := False; - end; - end; - -end. - \ No newline at end of file diff --git a/MapMaker/DLL/dklmapmk.cfg b/MapMaker/DLL/dklmapmk.cfg deleted file mode 100644 index 45f0861..0000000 --- a/MapMaker/DLL/dklmapmk.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Bpl" --LN"c:\program files\borland\delphi7\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/MapMaker/DLL/dklmapmk.dof b/MapMaker/DLL/dklmapmk.dof deleted file mode 100644 index 372b93b..0000000 --- a/MapMaker/DLL/dklmapmk.dof +++ /dev/null @@ -1,132 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=0 -UnsafeCode=0 -UnsafeCast=0 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;teeui;teedb;tee;dss;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;VirtualExplorerListviewExD7;VirtualTreesD7;visualclx;dac70;dklang7;odacvcl70;odac70;RxCtl7;synedhilite7;syned7;sznrtl7 -Conditionals= -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams= -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= diff --git a/Packages/Install.txt b/Packages/Install.txt new file mode 100644 index 0000000..85fef0c --- /dev/null +++ b/Packages/Install.txt @@ -0,0 +1,44 @@ +============================================================================== +Installation notes for DKLang Localization Package +============================================================================== +written 2013.12.06 (XE5) - bjm +updated 2014.05.21 (XE6) - bjm +updated 2014.09.30 (XE7) - bjm +updated 2016.04.23 (10.1 Berlin) - bjm + +There are two packages to install (where XXX represents the lib suffix for the + version you are installing): + * dklangXXX.dpk - runtime package + * dcldklangXXX.dpk - design time package + +The runtime package contains the code necessary for your application. +The design package installs the language controller component, and some + utilities into the IDE. + +============================================================================== +Installing the packages +============================================================================== + +The packages need to be installed in the correct order because the design time + package depends on the runtime package. The runtime package is the only one + that needs to be built multiple times to support multiple platforms. The + design time package only needs to be built for the IDE platform (win32). + + * load dklangXXX.dpk and dcldklangXXX.dpk into the IDE + * build the runtime package dklangXXX.dpk + * build and install the design time package dcldklangXXX.dpk: + +============================================================================== +Setting library paths +============================================================================== +Your code will need to be able to find dklang.pas. This can be done by + adding library paths to the IDE. + +To add a library path to dklang.pas for each platform: + under Tools|Options : + Environment Options|Delphi Options|Library + for each platform: + change "Selected Platform" to the platform + add the path to dklang.pas to "Library path" + + \ No newline at end of file diff --git a/Packages/dcldklang10.bdsproj b/Packages/dcldklang10.bdsproj deleted file mode 100644 index 8603e22..0000000 --- a/Packages/dcldklang10.bdsproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - dcldklang10.dpk - - - 7.0 - - - 8 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - True - True - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - - False - - True - True - False - True - True - False - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - False - False - False - True - True - True - - - 0 - 0 - 1 - False - False - False - 16384 - 1048576 - 622854144 - DKLang Localization Package - - - - - - - - - - - False - - - - - - False - - - - - - False - - - - $00000000 - - - - True - False - 3 - 0 - 0 - 16 - False - False - False - False - True - 1033 - 1252 - - - DK Software - DKLang designtime package - 3.0.0.16 - dcldklang10 - Copyright ©2002-2006 DK Software - - dcldklang10.bpl - DKLang Localization Package - 3.0 - http://www.dk-soft.org/ - - - diff --git a/Packages/dcldklang10.dpk b/Packages/dcldklang10.dpk deleted file mode 100644 index d70735b..0000000 --- a/Packages/dcldklang10.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldklang10; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $25200000} -{$DESCRIPTION 'DKLang Localization Package'} -{$DESIGNONLY} -{$IMPLICITBUILD ON} - -requires - designide, - TntUnicodeVcl, - dklang10; - -contains - DKLangReg in '..\DKLangReg.pas', - DKL_Expt in '..\DKL_Expt.pas', - DKL_ConstEditor in '..\DKL_ConstEditor.pas' {dDKL_ConstEditor}, - DKL_ResFile in '..\DKL_ResFile.pas'; - -end. diff --git a/Packages/dcldklang10.res b/Packages/dcldklang10.res deleted file mode 100644 index 4e2a4ba..0000000 Binary files a/Packages/dcldklang10.res and /dev/null differ diff --git a/Packages/dcldklang180_XE4.dpk b/Packages/dcldklang180_XE4.dpk new file mode 100644 index 0000000..374c2d6 --- /dev/null +++ b/Packages/dcldklang180_XE4.dpk @@ -0,0 +1,44 @@ +package dcldklang180_XE4; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package - IDE Tools'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + + +requires + designide, + dklang180_XE4; + +contains + DKL_ResFile in '..\src\DKL_ResFile.pas', + DKL_Expt in '..\src\DKL_Expt.pas', + DKL_ConstEditor in '..\src\DKL_ConstEditor.pas' {dDKL_ConstEditor}, + DKLangReg in '..\src\DKLangReg.pas', + DKL_StorageEditor in '..\src\DKL_StorageEditor.pas' {DKLangTranslationStorageEditor}; + +end. diff --git a/Packages/dcldklang190.dpk b/Packages/dcldklang190.dpk new file mode 100644 index 0000000..27cd079 --- /dev/null +++ b/Packages/dcldklang190.dpk @@ -0,0 +1,44 @@ +package dcldklang190; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package - IDE Tools'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + + +requires + designide, + dklang190; + +contains + DKL_ResFile in '..\src\DKL_ResFile.pas', + DKL_Expt in '..\src\DKL_Expt.pas', + DKL_ConstEditor in '..\src\DKL_ConstEditor.pas' {dDKL_ConstEditor}, + DKLangReg in '..\src\DKLangReg.pas', + DKL_StorageEditor in '..\src\DKL_StorageEditor.pas' {DKLangTranslationStorageEditor}; + +end. diff --git a/Packages/dcldklang200.dpk b/Packages/dcldklang200.dpk new file mode 100644 index 0000000..892cc2a --- /dev/null +++ b/Packages/dcldklang200.dpk @@ -0,0 +1,44 @@ +package dcldklang200; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package - IDE Tools'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + + +requires + designide, + dklang200; + +contains + DKL_ResFile in '..\src\DKL_ResFile.pas', + DKL_Expt in '..\src\DKL_Expt.pas', + DKL_ConstEditor in '..\src\DKL_ConstEditor.pas' {dDKL_ConstEditor}, + DKLangReg in '..\src\DKLangReg.pas', + DKL_StorageEditor in '..\src\DKL_StorageEditor.pas' {DKLangTranslationStorageEditor}; + +end. diff --git a/Packages/dcldklang210.dpk b/Packages/dcldklang210.dpk new file mode 100644 index 0000000..7b1e263 --- /dev/null +++ b/Packages/dcldklang210.dpk @@ -0,0 +1,44 @@ +package dcldklang210; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package - IDE Tools'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + + +requires + designide, + dklang210; + +contains + DKL_ResFile in '..\src\DKL_ResFile.pas', + DKL_Expt in '..\src\DKL_Expt.pas', + DKL_ConstEditor in '..\src\DKL_ConstEditor.pas' {dDKL_ConstEditor}, + DKLangReg in '..\src\DKLangReg.pas', + DKL_StorageEditor in '..\src\DKL_StorageEditor.pas' {DKLangTranslationStorageEditor}; + +end. diff --git a/Packages/dcldklang220.dpk b/Packages/dcldklang220.dpk new file mode 100644 index 0000000..7349a85 --- /dev/null +++ b/Packages/dcldklang220.dpk @@ -0,0 +1,44 @@ +package dcldklang220; + +{$R *.res} +{$R *.otares} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package - IDE Tools'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + designide, + dklang220; + +contains + DKL_ResFile in '..\src\DKL_ResFile.pas', + DKL_Expt in '..\src\DKL_Expt.pas', + DKL_ConstEditor in '..\src\DKL_ConstEditor.pas' {dDKL_ConstEditor}, + DKLangReg in '..\src\DKLangReg.pas', + DKL_StorageEditor in '..\src\DKL_StorageEditor.pas' {DKLangTranslationStorageEditor}; + +end. diff --git a/Packages/dcldklang230.dpk b/Packages/dcldklang230.dpk new file mode 100644 index 0000000..4153ee5 --- /dev/null +++ b/Packages/dcldklang230.dpk @@ -0,0 +1,44 @@ +package dcldklang230; + +{$R *.res} +{$R *.otares} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package - IDE Tools'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + designide, + dklang230; + +contains + DKL_ResFile in '..\src\DKL_ResFile.pas', + DKL_Expt in '..\src\DKL_Expt.pas', + DKL_ConstEditor in '..\src\DKL_ConstEditor.pas' {dDKL_ConstEditor}, + DKLangReg in '..\src\DKLangReg.pas', + DKL_StorageEditor in '..\src\DKL_StorageEditor.pas' {DKLangTranslationStorageEditor}; + +end. diff --git a/Packages/dcldklang240.dpk b/Packages/dcldklang240.dpk new file mode 100644 index 0000000..4ac7bc5 --- /dev/null +++ b/Packages/dcldklang240.dpk @@ -0,0 +1,44 @@ +package dcldklang240; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package - IDE Tools'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + + +requires + designide, + dklang240; + +contains + DKL_ResFile in '..\src\DKL_ResFile.pas', + DKL_Expt in '..\src\DKL_Expt.pas', + DKL_ConstEditor in '..\src\DKL_ConstEditor.pas' {dDKL_ConstEditor}, + DKLangReg in '..\src\DKLangReg.pas', + DKL_StorageEditor in '..\src\DKL_StorageEditor.pas' {DKLangTranslationStorageEditor}; + +end. diff --git a/Packages/dcldklang6.dpk b/Packages/dcldklang6.dpk deleted file mode 100755 index 6f75774..0000000 --- a/Packages/dcldklang6.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldklang6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $25200000} -{$DESCRIPTION 'DKLang Localization Package'} -{$DESIGNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl, - designide, - dklang6, - vcl; - -contains - DKLangReg in '..\DKLangReg.pas', - DKL_Expt in '..\DKL_Expt.pas', - DKL_ConstEditor in '..\DKL_ConstEditor.pas' {dDKL_ConstEditor}; - -end. diff --git a/Packages/dcldklang6.res b/Packages/dcldklang6.res deleted file mode 100755 index 0477d3c..0000000 Binary files a/Packages/dcldklang6.res and /dev/null differ diff --git a/Packages/dcldklang7.dpk b/Packages/dcldklang7.dpk deleted file mode 100644 index bc14000..0000000 --- a/Packages/dcldklang7.dpk +++ /dev/null @@ -1,40 +0,0 @@ -package dcldklang7; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $25200000} -{$DESCRIPTION 'DKLang Localization Package'} -{$DESIGNONLY} -{$IMPLICITBUILD ON} - -requires - designide, - TntUnicodeVcl_R70, - dklang7; - -contains - DKLangReg in '..\DKLangReg.pas', - DKL_Expt in '..\DKL_Expt.pas', - DKL_ConstEditor in '..\DKL_ConstEditor.pas' {dDKL_ConstEditor}, - DKL_ResFile in '..\DKL_ResFile.pas'; - -end. diff --git a/Packages/dcldklang7.res b/Packages/dcldklang7.res deleted file mode 100644 index 9c8925a..0000000 Binary files a/Packages/dcldklang7.res and /dev/null differ diff --git a/Packages/dcldklang9.bdsproj b/Packages/dcldklang9.bdsproj deleted file mode 100644 index 0b59392..0000000 --- a/Packages/dcldklang9.bdsproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - dcldklang9.dpk - - - 7.0 - - - 8 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - True - True - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - - False - - True - True - False - True - True - False - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - False - False - False - True - True - True - - - 0 - 0 - 1 - False - False - False - 16384 - 1048576 - 622854144 - DKLang Localization Package - - - - - - - - - - - False - - - - - - False - - - - - - False - - - - $00000000 - - - - True - False - 3 - 0 - 0 - 16 - False - False - False - False - True - 1033 - 1252 - - - DK Software - DKLang designtime package - 3.0.0.16 - dcldklang9 - Copyright ©2002-2006 DK Software - - dcldklang9.bpl - DKLang Localization Package - 3.0 - http://www.dk-soft.org/ - - - diff --git a/Packages/dcldklang9.res b/Packages/dcldklang9.res deleted file mode 100644 index 4e2a4ba..0000000 Binary files a/Packages/dcldklang9.res and /dev/null differ diff --git a/Packages/dklang.dpk b/Packages/dklang.dpk new file mode 100644 index 0000000..ca1c893 --- /dev/null +++ b/Packages/dklang.dpk @@ -0,0 +1,62 @@ +package dklang; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +// Library suffix defines to simplify upgrading to new versions of Delphi +// (at least until EMB gives us "{$LIBSUFFIX AUTO}"!) + +// XE5 +{$IFDEF VER260} +{$LIBSUFFIX '190'} +{$ENDIF} + +// XE6 +{$IFDEF VER270} +{$LIBSUFFIX '200'} +{$ENDIF} + +// these are purely speculative!!!!! +{$IFDEF VER280} +{$LIBSUFFIX '210'} +{$ENDIF} + +{$IFDEF VER290} +{$LIBSUFFIX '220'} +{$ENDIF} + +requires + rtl; + +contains + DKLang in '..\src\DKLang.pas', + DKLangStorage in '..\src\DKLangStorage.pas', + DKL_LanguageCodes in '..\src\DKL_LanguageCodes.pas'; + +end. diff --git a/Packages/dklang10.bdsproj b/Packages/dklang10.bdsproj deleted file mode 100644 index 4eb5183..0000000 --- a/Packages/dklang10.bdsproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - dklang10.dpk - - - 7.0 - - - 8 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - True - True - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - - False - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - False - False - False - True - True - True - - - 0 - 0 - 1 - False - False - False - 16384 - 1048576 - 621805568 - DKLang Localization Package - - - - - - - - - - - False - - - - - - False - - - - - - False - - - - $00000000 - - - - True - False - 3 - 0 - 0 - 16 - False - False - False - False - True - 1033 - 1252 - - - DK Software - DKLang runtime package - 3.0.0.16 - dklang10 - Copyright ©2002-2006 DK Software - - dklang10.bpl - DKLang Localization Package - 3.0 - http://www.dk-soft.org/ - - - diff --git a/Packages/dklang10.res b/Packages/dklang10.res deleted file mode 100644 index e5d7112..0000000 Binary files a/Packages/dklang10.res and /dev/null differ diff --git a/Packages/dklang7.dpk b/Packages/dklang190.dpk similarity index 55% rename from Packages/dklang7.dpk rename to Packages/dklang190.dpk index 2c15837..c40ad42 100644 --- a/Packages/dklang7.dpk +++ b/Packages/dklang190.dpk @@ -1,37 +1,40 @@ -package dklang7; +package dklang190; {$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} -{$DEBUGINFO ON} +{$DEBUGINFO OFF} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} -{$OPTIMIZATION ON} +{$OPTIMIZATION OFF} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} +{$STACKFRAMES ON} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} -{$IMAGEBASE $25100000} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} {$DESCRIPTION 'DKLang Localization Package'} {$RUNONLY} {$IMPLICITBUILD ON} requires - vcl, - rtl, - TntUnicodeVcl_R70; + rtl; contains - DKLang in '..\DKLang.pas'; + DKLang in '..\src\DKLang.pas', + DKLangStorage in '..\src\DKLangStorage.pas', + DKL_LanguageCodes in '..\src\DKL_LanguageCodes.pas'; end. diff --git a/Packages/dklang10.dpk b/Packages/dklang200.dpk similarity index 55% rename from Packages/dklang10.dpk rename to Packages/dklang200.dpk index 24e85dd..3a09f03 100644 --- a/Packages/dklang10.dpk +++ b/Packages/dklang200.dpk @@ -1,37 +1,40 @@ -package dklang10; +package dklang200; {$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} -{$DEBUGINFO ON} +{$DEBUGINFO OFF} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} -{$OPTIMIZATION ON} +{$OPTIMIZATION OFF} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} +{$STACKFRAMES ON} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} -{$IMAGEBASE $25100000} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} {$DESCRIPTION 'DKLang Localization Package'} {$RUNONLY} {$IMPLICITBUILD ON} requires - vcl, - rtl, - TntUnicodeVcl; + rtl; contains - DKLang in '..\DKLang.pas'; + DKLang in '..\src\DKLang.pas', + DKLangStorage in '..\src\DKLangStorage.pas', + DKL_LanguageCodes in '..\src\DKL_LanguageCodes.pas'; end. diff --git a/Packages/dklang9.dpk b/Packages/dklang210.dpk similarity index 55% rename from Packages/dklang9.dpk rename to Packages/dklang210.dpk index 3e445cb..5285d22 100644 --- a/Packages/dklang9.dpk +++ b/Packages/dklang210.dpk @@ -1,37 +1,40 @@ -package dklang9; +package dklang210; {$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} -{$DEBUGINFO ON} +{$DEBUGINFO OFF} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} -{$OPTIMIZATION ON} +{$OPTIMIZATION OFF} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} +{$STACKFRAMES ON} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} -{$IMAGEBASE $25100000} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} {$DESCRIPTION 'DKLang Localization Package'} {$RUNONLY} {$IMPLICITBUILD ON} requires - vcl, - rtl, - TntUnicodeVcl_R90; + rtl; contains - DKLang in '..\DKLang.pas'; + DKLang in '..\src\DKLang.pas', + DKLangStorage in '..\src\DKLangStorage.pas', + DKL_LanguageCodes in '..\src\DKL_LanguageCodes.pas'; end. diff --git a/Packages/dcldklang9.dpk b/Packages/dklang220.dpk similarity index 54% rename from Packages/dcldklang9.dpk rename to Packages/dklang220.dpk index 4864c55..3db8923 100644 --- a/Packages/dcldklang9.dpk +++ b/Packages/dklang220.dpk @@ -1,40 +1,40 @@ -package dcldklang9; +package dklang220; {$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} {$ALIGN 8} {$ASSERTIONS ON} {$BOOLEVAL OFF} -{$DEBUGINFO ON} +{$DEBUGINFO OFF} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} -{$OPTIMIZATION ON} +{$OPTIMIZATION OFF} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} +{$STACKFRAMES ON} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} -{$IMAGEBASE $25200000} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} {$DESCRIPTION 'DKLang Localization Package'} -{$DESIGNONLY} +{$RUNONLY} {$IMPLICITBUILD ON} requires - designide, - TntUnicodeVcl_R90, - dklang9; + rtl; contains - DKLangReg in '..\DKLangReg.pas', - DKL_Expt in '..\DKL_Expt.pas', - DKL_ConstEditor in '..\DKL_ConstEditor.pas' {dDKL_ConstEditor}, - DKL_ResFile in '..\DKL_ResFile.pas'; + DKLang in '..\src\DKLang.pas', + DKLangStorage in '..\src\DKLangStorage.pas', + DKL_LanguageCodes in '..\src\DKL_LanguageCodes.pas'; end. diff --git a/Packages/dklang230.dpk b/Packages/dklang230.dpk new file mode 100644 index 0000000..41e6987 --- /dev/null +++ b/Packages/dklang230.dpk @@ -0,0 +1,41 @@ +package dklang230; + +{$R *.res} +{$R *.otares} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +requires + rtl; + +contains + DKLang in '..\src\DKLang.pas', + DKLangStorage in '..\src\DKLangStorage.pas', + DKL_LanguageCodes in '..\src\DKL_LanguageCodes.pas'; + +end. diff --git a/Packages/dklang240.dpk b/Packages/dklang240.dpk new file mode 100644 index 0000000..efa0bda --- /dev/null +++ b/Packages/dklang240.dpk @@ -0,0 +1,40 @@ +package dklang240; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'DKLang Localization Package'} +{$RUNONLY} +{$IMPLICITBUILD ON} + +requires + rtl; + +contains + DKLang in '..\src\DKLang.pas', + DKLangStorage in '..\src\DKLangStorage.pas', + DKL_LanguageCodes in '..\src\DKL_LanguageCodes.pas'; + +end. diff --git a/Packages/dklang6.dpk b/Packages/dklang6.dpk deleted file mode 100755 index 8783b34..0000000 --- a/Packages/dklang6.dpk +++ /dev/null @@ -1,35 +0,0 @@ -package dklang6; - -{$R *.res} -{$ALIGN 8} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO ON} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION ON} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES OFF} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $25100000} -{$DESCRIPTION 'DKLang Localization Package'} -{$RUNONLY} -{$IMPLICITBUILD OFF} - -requires - rtl; - -contains - DKLang in '..\DKLang.pas'; - -end. diff --git a/Packages/dklang6.res b/Packages/dklang6.res deleted file mode 100755 index 36a4ef3..0000000 Binary files a/Packages/dklang6.res and /dev/null differ diff --git a/Packages/dklang7.res b/Packages/dklang7.res deleted file mode 100644 index 7bf45d3..0000000 Binary files a/Packages/dklang7.res and /dev/null differ diff --git a/Packages/dklang9.bdsproj b/Packages/dklang9.bdsproj deleted file mode 100644 index ce772e2..0000000 --- a/Packages/dklang9.bdsproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - dklang9.dpk - - - 7.0 - - - 8 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 1 - 1 - 1 - True - True - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - - False - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - False - False - False - True - True - True - - - 0 - 0 - 1 - False - False - False - 16384 - 1048576 - 621805568 - DKLang Localization Package - - - - - - - - - - - False - - - - - - False - - - - - - False - - - - $00000000 - - - - True - False - 3 - 0 - 0 - 16 - False - False - False - False - True - 1033 - 1252 - - - DK Software - DKLang runtime package - 3.0.0.16 - dklang9 - Copyright ©2002-2006 DK Software - - dklang9.bpl - DKLang Localization Package - 3.0 - http://www.dk-soft.org/ - - - diff --git a/Packages/dklang9.res b/Packages/dklang9.res deleted file mode 100644 index e5d7112..0000000 Binary files a/Packages/dklang9.res and /dev/null differ diff --git a/README b/README new file mode 100644 index 0000000..4603299 --- /dev/null +++ b/README @@ -0,0 +1,11 @@ +DKLang Localization Package +=========================== + +DKLang Localization Package is a set of classes intended to simplify the +localization of applications written in Delphi. + +At Version 5.0 DKLang Localization Package has been rewritten to work on +all current (XE5) platforms: VCL (win32 & win64) & FireMonkey (win32, +win64, OSX, Android & iOS). + +For details see https://yktoo.com/en/software/dklang-localization-package and read the wiki. diff --git a/Src/DKL_ConstEditor.dfm b/Src/DKL_ConstEditor.dfm new file mode 100644 index 0000000..aebb6e6 --- /dev/null +++ b/Src/DKL_ConstEditor.dfm @@ -0,0 +1,199 @@ +object dDKL_ConstEditor: TdDKL_ConstEditor + Left = 357 + Top = 191 + ActiveControl = gMain + BorderIcons = [biSystemMenu, biMaximize] + Caption = 'DKLang Constant Editor' + ClientHeight = 875 + ClientWidth = 1066 + Color = clBtnFace + Constraints.MinHeight = 415 + Constraints.MinWidth = 831 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Shell Dlg 2' + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + OnCreate = FormCreate + DesignSize = ( + 1066 + 875) + PixelsPerInch = 130 + TextHeight = 19 + object lCount: TLabel + Left = 11 + Top = 838 + Width = 63 + Height = 19 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Anchors = [akLeft, akBottom] + Caption = '' + ExplicitTop = 565 + end + object lDeleteHint: TLabel + Left = 11 + Top = 783 + Width = 306 + Height = 19 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Anchors = [akLeft, akBottom] + Caption = 'Use Ctrl+Delete to delete the current entry.' + ExplicitTop = 510 + end + object lblSearchPos: TLabel + Left = 437 + Top = 11 + Width = 123 + Height = 19 + Caption = '' + end + object gMain: TStringGrid + Left = 12 + Top = 38 + Width = 1045 + Height = 737 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Margins.Bottom = 4 + Anchors = [akLeft, akTop, akRight, akBottom] + ColCount = 2 + DefaultRowHeight = 22 + FixedCols = 0 + RowCount = 2 + Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing, goEditing, goAlwaysShowEditor, goThumbTracking] + ScrollBars = ssVertical + TabOrder = 0 + OnDrawCell = gMainDrawCell + OnKeyDown = gMainKeyDown + OnMouseUp = gMainMouseUp + OnSelectCell = gMainSelectCell + ColWidths = ( + 286 + 284) + end + object bOK: TButton + Left = 506 + Top = 832 + Width = 104 + Height = 32 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Margins.Bottom = 4 + Anchors = [akRight, akBottom] + Caption = '&OK' + Default = True + TabOrder = 2 + OnClick = bOKClick + end + object bCancel: TButton + Left = 617 + Top = 832 + Width = 104 + Height = 32 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Margins.Bottom = 4 + Anchors = [akRight, akBottom] + Cancel = True + Caption = '&Cancel' + ModalResult = 2 + TabOrder = 3 + end + object bLoad: TButton + Left = 839 + Top = 832 + Width = 103 + Height = 32 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Margins.Bottom = 4 + Anchors = [akRight, akBottom] + Caption = '&Load...' + TabOrder = 5 + OnClick = bLoadClick + end + object bSave: TButton + Left = 949 + Top = 832 + Width = 104 + Height = 32 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Margins.Bottom = 4 + Anchors = [akRight, akBottom] + Caption = '&Save...' + TabOrder = 6 + OnClick = bSaveClick + end + object cbSaveToLangSource: TCheckBox + Left = 11 + Top = 805 + Width = 1039 + Height = 23 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Margins.Bottom = 4 + Anchors = [akLeft, akRight, akBottom] + Caption = + '&Also save the constants into the project language source file (' + + '*.dklang)' + TabOrder = 1 + end + object bErase: TButton + Left = 728 + Top = 832 + Width = 104 + Height = 32 + Margins.Left = 4 + Margins.Top = 4 + Margins.Right = 4 + Margins.Bottom = 4 + Anchors = [akRight, akBottom] + Caption = '&Erase' + TabOrder = 4 + OnClick = bEraseClick + end + object edtSearch: TEdit + Left = 11 + Top = 7 + Width = 214 + Height = 27 + ParentShowHint = False + ShowHint = False + TabOrder = 7 + TextHint = 'Search...' + OnChange = edtSearchChange + end + object btnGotoFirstMatch: TButton + Left = 231 + Top = 7 + Width = 109 + Height = 27 + Caption = '<- &Previous' + TabOrder = 8 + TabStop = False + OnClick = btnGotoFirstMatchClick + end + object btnGotoNextMatch: TButton + Left = 346 + Top = 7 + Width = 85 + Height = 27 + Caption = '&Next ->' + TabOrder = 9 + TabStop = False + OnClick = btnGotoNextMatchClick + end +end diff --git a/DKL_ConstEditor.pas b/Src/DKL_ConstEditor.pas old mode 100755 new mode 100644 similarity index 63% rename from DKL_ConstEditor.pas rename to Src/DKL_ConstEditor.pas index 1d8083b..d9f926a --- a/DKL_ConstEditor.pas +++ b/Src/DKL_ConstEditor.pas @@ -1,8 +1,8 @@ ///********************************************************************************************************************* -/// $Id: DKL_ConstEditor.pas,v 1.13 2006-08-05 21:42:34 dale Exp $ +/// $Id: DKL_ConstEditor.pas 2013-12-06 00:00:00Z bjm $ ///--------------------------------------------------------------------------------------------------------------------- /// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org +/// Copyright 2002-2013 DK Software, http://www.dk-soft.org ///********************************************************************************************************************* /// /// The contents of this package are subject to the Mozilla Public License @@ -20,17 +20,24 @@ /// /// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ /// +/// Upgraded to Delphi 2009 by Bruce J. Miller, rules-of-thumb.com Dec 2008 +/// +/// Upgraded to Delphi XE5 (for FireMonkey) by Bruce J. Miller, rules-of-thumb.com Nov 2013 +/// ///********************************************************************************************************************** // Designtime project constant editor dialog declaration // +// + unit DKL_ConstEditor; interface uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, TntDialogs, DKLang, - StdCtrls, - TntGrids, Grids; + WinApi.Windows, System.SysUtils, System.Classes, + VCL.Controls, VCL.Forms, VCL.Dialogs,VCL.StdCtrls, VCL.Grids, + DKLang, {Edwin_Searchability}Vcl.Graphics{Edwin_Searchability end}, + System.Generics.Collections; type TdDKL_ConstEditor = class(TForm) @@ -40,21 +47,37 @@ TdDKL_ConstEditor = class(TForm) bOK: TButton; bSave: TButton; cbSaveToLangSource: TCheckBox; - gMain: TTntStringGrid; + gMain: TStringGrid; lCount: TLabel; lDeleteHint: TLabel; + edtSearch: TEdit; + btnGotoFirstMatch: TButton; + btnGotoNextMatch: TButton; + lblSearchPos: TLabel; + procedure FormCreate(Sender: TObject); procedure bEraseClick(Sender: TObject); procedure bLoadClick(Sender: TObject); procedure bOKClick(Sender: TObject); procedure bSaveClick(Sender: TObject); + procedure btnGotoFirstMatchClick(Sender: TObject); + procedure btnGotoNextMatchClick(Sender: TObject); + procedure edtSearchChange(Sender: TObject); + procedure gMainDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); procedure gMainKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure gMainMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure gMainSelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean); + strict private + function IsRowMatch(aRow: Integer; aSearchStr: string): Boolean; private // The constants being edited FConsts: TDKLang_Constants; // True if the constants are to be erased from the project resources FErase: Boolean; + // Edwin_Searchability + // Stores all the matching row numbers. + FMatchingRows: TList; + FCurrentMatchingIndex: Integer; + // Edwin_Searchability end. // Initializes the dialog procedure InitializeDialog(AConsts: TDKLang_Constants; bEraseAllowed: Boolean); // Updates the count info @@ -76,11 +99,16 @@ TdDKL_ConstEditor = class(TForm) procedure DeleteEntry(iIndex: Integer); // Prop handlers function GetEntryCount: Integer; - function GetEntryNames(Index: Integer): String; - function GetEntryValues(Index: Integer; bEncoded: Boolean): WideString; + function GetEntryNames(Index: Integer): UnicodeString; + function GetEntryValues(Index: Integer; bEncoded: Boolean): UnicodeString; procedure SetEntryCount(iCount: Integer); - procedure SetEntryNames(Index: Integer; const sValue: String); - procedure SetEntryValues(Index: Integer; bEncoded: Boolean; const wsValue: WideString); + procedure SetEntryNames(Index: Integer; const wsValue: UnicodeString); + procedure SetEntryValues(Index: Integer; bEncoded: Boolean; const wsValue: UnicodeString); + procedure PerformSearch; + function GotoFirstMatchingRow: Boolean; + procedure SetCurrentMatchingIndex(const Value: Integer); + procedure ShowCurrentSearchLocation; + procedure GotoNextMatchingRow(const aStep: Integer = 1); protected procedure DoClose(var Action: TCloseAction); override; procedure DoShow; override; @@ -90,10 +118,12 @@ TdDKL_ConstEditor = class(TForm) // -- Entry (constant) count property EntryCount: Integer read GetEntryCount write SetEntryCount; // -- Constant names by index - property EntryNames[Index: Integer]: String read GetEntryNames write SetEntryNames; + property EntryNames[Index: Integer]: UnicodeString read GetEntryNames write SetEntryNames; // -- Constant names by index. If bEncoded=True, the constant value is represented 'encoded', with no literal // control chars; if bEncoded=False, the value is represented 'as is', with linebreaks, tabs, etc. in it - property EntryValues[Index: Integer; bEncoded: Boolean]: WideString read GetEntryValues write SetEntryValues; + property EntryValues[Index: Integer; bEncoded: Boolean]: UnicodeString read GetEntryValues write SetEntryValues; + // Pointer to FMatchingRows. + property CurrentMatchingIndex: Integer read FCurrentMatchingIndex write SetCurrentMatchingIndex; end; const @@ -107,7 +137,7 @@ TdDKL_ConstEditor = class(TForm) implementation {$R *.dfm} -uses Registry, TntClasses; +uses System.Win.Registry, System.StrUtils; const // gMain's column indexes @@ -126,6 +156,18 @@ implementation end; end; +procedure TdDKL_ConstEditor.FormCreate(Sender: TObject); +begin + // Edwin_Searchability + FMatchingRows := TList.Create; + FCurrentMatchingIndex := -1; + lblSearchPos.Caption := ''; + + // Allow pressing TAB to jump between columns. + gMain.Options := gMain.Options + [goTabs]; + // Edwin_Searchability end. +end; + //=================================================================================================================== // TdDKL_ConstEditor //=================================================================================================================== @@ -140,12 +182,12 @@ implementation procedure TdDKL_ConstEditor.bLoadClick(Sender: TObject); - procedure DoLoad(const wsFileName: WideString); + procedure DoLoad(const wsFileName: UnicodeString); var - SL: TTntStringList; + SL: TStringList; i: Integer; begin - SL := TTntStringList.Create; + SL := TStringList.Create; try SL.LoadFromFile(wsFileName); EntryCount := SL.Count; @@ -159,7 +201,7 @@ implementation end; begin - with TTntOpenDialog.Create(Self) do + with TOpenDialog.Create(Self) do try DefaultExt := 'txt'; Filter := 'All files (*.*)|*.*'; @@ -185,14 +227,15 @@ implementation procedure TdDKL_ConstEditor.bSaveClick(Sender: TObject); - procedure DoSave(const wsFileName: WideString); + procedure DoSave(const wsFileName: UnicodeString); var - SL: TTntStringList; + SL: TStringList; i: Integer; begin - SL := TTntStringList.Create; + SL := TStringList.Create; try for i := 0 to EntryCount-1 do SL.Add(EntryNames[i]+'='+EntryValues[i, True]); + SL.Sort; SL.SaveToFile(wsFileName); finally SL.Free; @@ -200,7 +243,7 @@ implementation end; begin - with TTntSaveDialog.Create(Self) do + with TSaveDialog.Create(Self) do try DefaultExt := 'txt'; Filter := 'All files (*.*)|*.*'; @@ -212,25 +255,35 @@ implementation end; end; +procedure TdDKL_ConstEditor.btnGotoFirstMatchClick(Sender: TObject); +begin + GotoNextMatchingRow(-1); +end; + +procedure TdDKL_ConstEditor.btnGotoNextMatchClick(Sender: TObject); +begin + GotoNextMatchingRow(1); +end; + procedure TdDKL_ConstEditor.CheckEntryIndexValidity(iIndex: Integer); begin - if (iIndex<0) or (iIndex>=EntryCount) then DKLangError('Invalid entry index (%d)', [iIndex]); + if (iIndex<0) or (iIndex>=EntryCount) then raise EDKLangError.CreateFmt('Invalid entry index (%d)', [iIndex]); end; procedure TdDKL_ConstEditor.CheckNamesValid; var - SL: TStringList; // No need to deal with wide strings here - s: String; + SL: TStringList; + ws: UnicodeString; i: Integer; begin SL := TStringList.Create; try SL.Sorted := True; for i := 0 to EntryCount-1 do begin - s := EntryNames[i]; - if s='' then DKLangError('Constant name cannot be empty'); - if not IsValidIdent(s) then DKLangError('Invalid constant name: "%s"', [s]); - if SL.IndexOf(s)<0 then SL.Add(s) else DKLangError('Duplicate constant name: "%s"', [s]); + ws := EntryNames[i]; + if ws='' then raise EDKLangError.Create('Constant name cannot be empty'); + if not IsValidIdent(ws) then raise EDKLangError.CreateFmt('Invalid constant name: "%s"', [ws]); + if SL.IndexOf(ws)<0 then SL.Add(ws) else raise EDKLangError.CreateFmt('Duplicate constant name: "%s"', [ws]); end; finally SL.Free; @@ -277,25 +330,37 @@ implementation Result := gMain.RowCount-2; // One for the header, one more for the virtual row end; - function TdDKL_ConstEditor.GetEntryNames(Index: Integer): String; + function TdDKL_ConstEditor.GetEntryNames(Index: Integer): UnicodeString; begin CheckEntryIndexValidity(Index); Result := Trim(gMain.Cells[IColIdx_Name, Index+1]); // One more row to skip the header end; - function TdDKL_ConstEditor.GetEntryValues(Index: Integer; bEncoded: Boolean): WideString; + function TdDKL_ConstEditor.GetEntryValues(Index: Integer; bEncoded: Boolean): UnicodeString; begin CheckEntryIndexValidity(Index); Result := Trim(gMain.Cells[IColIdx_Value, Index+1]); // One more row to skip the header if not bEncoded then Result := DecodeControlChars(Result); end; + procedure TdDKL_ConstEditor.gMainKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin - if (Key=VK_DELETE) and (Shift=[ssCtrl]) and (gMain.Row; begin FConsts := AConsts; cbSaveToLangSource.Checked := FConsts.AutoSaveLangSource; @@ -322,10 +389,19 @@ implementation gMain.Cells[IColIdx_Name, 0] := 'Constant name'; gMain.Cells[IColIdx_Value, 0] := 'Constant value'; // Copy the constans into the editor - EntryCount := FConsts.Count; - for i := 0 to FConsts.Count-1 do begin - EntryNames [i] := FConsts[i].sName; - EntryValues[i, False] := FConsts[i].wsValue; + // TDictionary is not sorted, so get keys and sort + keys := TList.Create(FConsts.Keys); + try + keys.Sort; + EntryCount := FConsts.Count; + i :=0; + for key in keys do begin + EntryNames [i] := FConsts[key].wsName; + EntryValues[i, False] := FConsts[key].wsValue; + inc(i); + end; + finally + keys.Free; end; // Update count info UpdateCount; @@ -394,14 +470,14 @@ implementation gMain.Cells[IColIdx_Value, iCount+1] := ''; end; - procedure TdDKL_ConstEditor.SetEntryNames(Index: Integer; const sValue: String); + procedure TdDKL_ConstEditor.SetEntryNames(Index: Integer; const wsValue: UnicodeString); begin CheckEntryIndexValidity(Index); - gMain.Cells[IColIdx_Name, Index+1] := sValue; // One more row to skip the header + gMain.Cells[IColIdx_Name, Index+1] := wsValue; // One more row to skip the header end; - procedure TdDKL_ConstEditor.SetEntryValues(Index: Integer; bEncoded: Boolean; const wsValue: WideString); - var ws: WideString; + procedure TdDKL_ConstEditor.SetEntryValues(Index: Integer; bEncoded: Boolean; const wsValue: UnicodeString); + var ws: UnicodeString; begin CheckEntryIndexValidity(Index); ws := wsValue; @@ -427,4 +503,134 @@ implementation gMain.ColWidths[IColIdx_Value] := iwClient-iwName-2; end; +procedure TdDKL_ConstEditor.gMainDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: + TGridDrawState); +var + mySearch: string; + myStr: string; +begin + //Edwin_Searchability + if (EntryCount < 1) or (ARow < 1) then + Exit; + + // if ACol = IColIdx_Name then + // myStr := gMain.Cells[IColIdx_Name, ARow] + // else + // myStr := gMain.Cells[IColIdx_Value, ARow]; + myStr := gMain.Cells[ACol, ARow]; + + mySearch := Trim(edtSearch.Text); + + //highlight the matching items with red + //if SameText(myStr, mySearch) or ContainsText(myStr, mySearch) then + if FMatchingRows.Contains(ARow) then + begin + gMain.Canvas.Font.Color := clRed; + gMain.Canvas.Font.Style := [fsBold]; + gMain.Canvas.TextRect(Rect, Rect.Left + 2, Rect.Top + 2, myStr); + end; + // Edwin_Searchability end. +end; + +procedure TdDKL_ConstEditor.edtSearchChange(Sender: TObject); +begin + // Edwin_Searchability + PerformSearch; + // Edwin_Searchability end. +end; + +// Edwin_Searchability end. + +// Edwin_Searchability +function TdDKL_ConstEditor.IsRowMatch(aRow: Integer; aSearchStr: string): Boolean; +begin + Result := ContainsText(gMain.Cells[IColIdx_Name, ARow], aSearchStr) + or ContainsText(gMain.Cells[IColIdx_Value, ARow], aSearchStr); +end; +// Edwin_Searchability END. + +// Edwin_Searchability +procedure TdDKL_ConstEditor.PerformSearch; +var + i: Integer; + searchStr: string; +begin + CurrentMatchingIndex := -1; + FMatchingRows.Clear; + + searchStr := Trim(edtSearch.Text); + for i := 1 to gMain.RowCount do + begin + if IsRowMatch(i, searchStr) then + begin + FMatchingRows.Add(i); + end; + end; + + // Locate the first matching row if any. + if not GotoFirstMatchingRow then + begin + gMain.Invalidate; + ShowCurrentSearchLocation; + end; +end; +// Edwin_Searchability end. + +// Edwin_Searchability +function TdDKL_ConstEditor.GotoFirstMatchingRow: Boolean; +begin + Result := False; + if FMatchingRows.Count < 1 then + Exit; + + CurrentMatchingIndex := 0; + Result := True; +end; +// Edwin_Searchability end. + +// Edwin_Searchability +procedure TdDKL_ConstEditor.SetCurrentMatchingIndex(const Value: Integer); +begin + FCurrentMatchingIndex := Value; + + if (FCurrentMatchingIndex >= 0) and (FCurrentMatchingIndex < FMatchingRows.Count) then + begin + gMain.Row := FMatchingRows[FCurrentMatchingIndex]; + gMain.Invalidate; + end; + + + ShowCurrentSearchLocation; +end; +// Edwin_Searchability end. + + +procedure TdDKL_ConstEditor.ShowCurrentSearchLocation; +const + // Something like '1 of 5 matches'. + cSearchLocationString = '%d of %d matches'; +begin + lblSearchPos.Caption := Format(cSearchLocationString, [FCurrentMatchingIndex + 1, self.FMatchingRows.Count]); +end; +// Edwin_Searchability end. + +// Edwin_Searchability +procedure TdDKL_ConstEditor.GotoNextMatchingRow(const aStep: Integer = 1); +var + newIdx: Integer; +begin + if FMatchingRows.Count < 1 then + Exit; + + newIdx := CurrentMatchingIndex + aStep; + if newIdx > (FMatchingRows.Count - 1) then + newIdx := FMatchingRows.Count - 1; + if newIdx < 0 then + newIdx := 0; + + CurrentMatchingIndex := newIdx; + gMain.SetFocus; +end; +// Edwin_Searchability end. + end. diff --git a/DKL_Expt.pas b/Src/DKL_Expt.pas similarity index 78% rename from DKL_Expt.pas rename to Src/DKL_Expt.pas index 6eefd36..1f14b32 100644 --- a/DKL_Expt.pas +++ b/Src/DKL_Expt.pas @@ -1,8 +1,8 @@ ///********************************************************************************************************************* -/// $Id: DKL_Expt.pas,v 1.21 2006-08-22 13:17:35 dale Exp $ +/// $Id: DKL_Expt.pas 2013-12-06 00:00:00Z bjm $ ///--------------------------------------------------------------------------------------------------------------------- /// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org +/// Copyright 2002-2013 DK Software, http://www.dk-soft.org ///********************************************************************************************************************* /// /// The contents of this package are subject to the Mozilla Public License @@ -20,12 +20,15 @@ /// /// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ /// +/// Upgraded to Delphi 2009 by Bruce J. Miller, rules-of-thumb.com Dec 2008 +/// +/// Upgraded to Delphi XE5 (for FireMonkey) by Bruce J. Miller, rules-of-thumb.com Nov 2013 +/// ///********************************************************************************************************************** // Declarations of the core IDE integration component - DKLang Expert // -unit DKL_Expt; -{$INCLUDE TntCompilers.inc} +unit DKL_Expt; interface uses Classes, ToolsAPI, DesignEditors; @@ -38,7 +41,7 @@ interface TDKLangControllerEditor = class(TComponentEditor) public procedure ExecuteVerb(Index: Integer); override; - function GetVerb(Index: Integer): string; override; + function GetVerb(Index: Integer): String; override; function GetVerbCount: Integer; override; end; @@ -55,43 +58,21 @@ TDKLangControllerEditor = class(TComponentEditor) SDKLExptMsg_LCsUpdated = '%d language controllers have updated the project language source.'; - SDKLExptMenuItem_EditConstants = 'Edit pro&ject constants...'; - SDKLExptMenuItem_UpdateLangSource = 'Update project lan&guage source'; + SDKLExptMenuItem_EditConstants = 'DKLang - Edit pro&ject constants...'; + SDKLExptMenuItem_UpdateLangSource = 'DKLang - Update project lan&guage source'; implementation //======================================================================================================= + uses - SysUtils, Windows, Registry, Menus, Graphics, Dialogs, DesignIntf, TypInfo, Forms, RTLConsts, + VCL.Menus, VCL.Dialogs, VCL.Graphics, + System.SysUtils, System.Types, System.TypInfo, DesignIntf, Winapi.Windows, DKLang, DKL_ConstEditor, DKL_ResFile; - {$IFNDEF COMPILER_7_UP} - - // The below functions were introduced only in Delphi 7 - - function GetActiveProjectGroup: IOTAProjectGroup; - var - ModuleServices: IOTAModuleServices; - i: Integer; - begin - ModuleServices := BorlandIDEServices as IOTAModuleServices; - for i := 0 to ModuleServices.ModuleCount-1 do - if Supports(ModuleServices.Modules[i], IOTAProjectGroup, Result) then Exit; - Result := nil; - end; - - function GetActiveProject: IOTAProject; - var ProjectGroup: IOTAProjectGroup; - begin - ProjectGroup := GetActiveProjectGroup; - if ProjectGroup=nil then Result := nil else Result := ProjectGroup.ActiveProject; - end; - - {$ENDIF} - // Returns the current active project, if any; raises an exception otherwise function GetActualProject: IOTAProject; begin Result := GetActiveProject; - if Result=nil then DKLangError(SDKLExptErr_CannotFindProject); + if Result=nil then raise EDKLangError.Create(SDKLExptErr_CannotFindProject); end; // Stores the LSObject's language source data in the current project's language source file. Returns True if @@ -142,7 +123,7 @@ TDKLang_FormNotifier = class(TNotifierObject, IOTANotifier, IOTAFormNotifier) // IOTAFormNotifier procedure FormActivated; procedure FormSaving; - procedure ComponentRenamed(ComponentHandle: TOTAHandle; const OldName, NewName: String); + procedure ComponentRenamed(ComponentHandle: TOTAHandle; const OldName, NewName: UnicodeString); public constructor Create(AModule: IOTAModule); end; @@ -156,7 +137,7 @@ TDKLang_OTAIDENotifier = class(TNotifierObject, IOTAIDENotifier) // Expert owner FExpert: TDKLang_Expert; // IOTAIDENotifier - procedure FileNotification(NotifyCode: TOTAFileNotification; const FileName: string; var Cancel: Boolean); + procedure FileNotification(NotifyCode: TOTAFileNotification; const FileName: UnicodeString; var Cancel: Boolean); procedure BeforeCompile(const Project: IOTAProject; var Cancel: Boolean); procedure AfterCompile(Succeeded: Boolean); public @@ -181,18 +162,16 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) FItem_EditConstants: TMenuItem; FItem_UpdateLangSource: TMenuItem; // Adds and returns a menu item - function NewMenuItem(const sCaption: String; Menu: TMenuItem; AOnClick: TNotifyEvent): TMenuItem; + function NewMenuItem(const wsCaption: UnicodeString; Menu: TMenuItem; AOnClick: TNotifyEvent): TMenuItem; // Menu item click events procedure ItemClick_EditConstants(Sender: TObject); procedure ItemClick_UpdateLangSource(Sender: TObject); // Invokes the constant editor for editing constant data in the project resources. Returns True if user saved the // changes function EditConstantsResource: Boolean; - // Callback function for obtaining current language ID - function GetLangIDCallback: LANGID; // IOTAWizard - function GetIDString: string; - function GetName: string; + function GetIDString: UnicodeString; + function GetName: UnicodeString; function GetState: TWizardState; procedure Execute; public @@ -204,7 +183,7 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) // TDKLang_FormNotifier //=================================================================================================================== - procedure TDKLang_FormNotifier.ComponentRenamed(ComponentHandle: TOTAHandle; const OldName, NewName: String); + procedure TDKLang_FormNotifier.ComponentRenamed(ComponentHandle: TOTAHandle; const OldName, NewName: UnicodeString); begin { stub } end; @@ -259,7 +238,7 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) FExpert := AExpert; end; - procedure TDKLang_OTAIDENotifier.FileNotification(NotifyCode: TOTAFileNotification; const FileName: string; var Cancel: Boolean); + procedure TDKLang_OTAIDENotifier.FileNotification(NotifyCode: TOTAFileNotification; const FileName: UnicodeString; var Cancel: Boolean); var Module: IOTAModule; OTAFormEditor: IOTAFormEditor; @@ -286,9 +265,9 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) begin inherited Create; // Obtain needed IDE interfaces - if not Supports(BorlandIDEServices, INTAServices, FNTAServices) then DKLangError(SDKLExptErr_CannotObtainNTAIntf); - if not Supports(BorlandIDEServices, IOTAServices, FOTAServices) then DKLangError(SDKLExptErr_CannotObtainOTAIntf); - if not Supports(BorlandIDEServices, IOTAModuleServices, FModServices) then DKLangError(SDKLExptErr_CannotObtainModSvcIntf); + if not Supports(BorlandIDEServices, INTAServices, FNTAServices) then raise EDKLangError.Create(SDKLExptErr_CannotObtainNTAIntf); + if not Supports(BorlandIDEServices, IOTAServices, FOTAServices) then raise EDKLangError.Create(SDKLExptErr_CannotObtainOTAIntf); + if not Supports(BorlandIDEServices, IOTAModuleServices, FModServices) then raise EDKLangError.Create(SDKLExptErr_CannotObtainModSvcIntf); // Register OTA services notifier FOTANotifierIndex := FOTAServices.AddNotifier(TDKLang_OTAIDENotifier.Create(Self)); // Find 'Project' menu @@ -300,7 +279,7 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) Break; end; end; - if mi=nil then DKLangError(SDKLExptErr_CannotFindProjectMenu); + if mi=nil then raise EDKLangError.Create(SDKLExptErr_CannotFindProjectMenu); // Create a dummy menu item owner component FMenuOwner := TComponent.Create(nil); // Insert a separator @@ -309,13 +288,13 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) FItem_EditConstants := NewMenuItem(SDKLExptMenuItem_EditConstants, mi, ItemClick_EditConstants); FItem_UpdateLangSource := NewMenuItem(SDKLExptMenuItem_UpdateLangSource, mi, ItemClick_UpdateLangSource); // Set the designtime flag - IsDesignTime := True; + DKLang_IsDesignTime := True; end; destructor TDKLang_Expert.Destroy; begin // Clear the designtime flag - IsDesignTime := False; + DKLang_IsDesignTime := False; // Remove menu items FMenuOwner.Free; // Release the OTA notifier @@ -325,33 +304,41 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) function TDKLang_Expert.EditConstantsResource: Boolean; var - sResFileName: String; + wsResFileName,s: UnicodeString; ResFile: TDKLang_ResFile; ConstantResEntry: TDKLang_ResEntry; Consts: TDKLang_Constants; bErase: Boolean; + projectSource: TStringList; + i: Integer; // Returns file name for constant resource file - function GetResFileName: String; + function GetResFileName: UnicodeString; begin Result := ChangeFileExt(GetActualProject.FileName, SDKLExpt_ConstantResFileEnding) end; + function GetProjectDprFileName: UnicodeString; + begin + Result := ChangeFileExt(GetActualProject.FileName, '.dpr') + end; + begin // Determine the constant resource file name - sResFileName := GetResFileName; + wsResFileName := GetResFileName; // Create the resource file ResFile := TDKLang_ResFile.Create; try // Load the resource file if it exists - if FileExists(sResFileName) then ResFile.LoadFromFile(sResFileName); + if FileExists(wsResFileName) then ResFile.LoadFromFile(wsResFileName); // Create constant list object - Consts := TDKLang_Constants.Create(GetLangIDCallback); + Consts := TDKLang_Constants.Create; try // Try to find the constant resource entry ConstantResEntry := ResFile.FindEntry(IntToStr(Integer(RT_RCDATA)), SDKLang_ConstResourceName); // If constant resource exists, load the constant list from it - if ConstantResEntry<>nil then Consts.AsRawString := ConstantResEntry.RawData; + if ConstantResEntry<>nil then + Consts.AsRawString := ConstantResEntry.RawData; bErase := ConstantResEntry<>nil; Result := EditConstants(Consts, bErase); // If changes made @@ -376,9 +363,31 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) // Update the data ConstantResEntry.RawData := Consts.AsRawString; // Save the resource file - ResFile.SaveToFile(sResFileName); + ResFile.SaveToFile(wsResFileName); // Update the project language source file if needed - if Consts.AutoSaveLangSource and not UpdateProjectLangSource(Consts) then DKLangError(SDKLExptErr_CannotSaveLangSource); + if Consts.AutoSaveLangSource and not UpdateProjectLangSource(Consts) then raise EDKLangError.Create(SDKLExptErr_CannotSaveLangSource); + // maybe update the project source to include {$R *.dkl_const.res} + if FileExists(GetProjectDprFileName) then begin + projectSource := TStringList.Create; + try + projectSource.LoadFromFile(GetProjectDprFileName); + s := LowerCase(projectSource.Text); + if (Pos(LowerCase(SDKLExpt_ConstantResFileEnding),s)=0) then begin + // not already there, so insert it + // insert right after {$R *.res} + s := '{$r *.res}'; + for i:=0 to projectSource.Count-1 do begin + if Pos('{$r *.res}',LowerCase(projectSource[i]))>0 then begin + projectSource.Insert(i+1,'{$R *' + SDKLExpt_ConstantResFileEnding + '}');//{$R *.dkl_const.res} + projectSource.SaveToFile(GetProjectDprFileName); + break; + end; + end; + end; + finally + projectSource.Free; + end; + end; end; finally Consts.Free; @@ -393,17 +402,12 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) { stub } end; - function TDKLang_Expert.GetIDString: string; + function TDKLang_Expert.GetIDString: UnicodeString; begin Result := 'DKSoftware.DKLang_IDE_Expert'; end; - function TDKLang_Expert.GetLangIDCallback: LANGID; - begin - Result := GetThreadLocale; // Implicit LCID to LANGID conversion - end; - - function TDKLang_Expert.GetName: string; + function TDKLang_Expert.GetName: UnicodeString; begin Result := 'DKLang IDE Expert'; end; @@ -445,13 +449,20 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) ShowMessage(Format(SDKLExptMsg_LCsUpdated, [iLCUpdated])); end; - function TDKLang_Expert.NewMenuItem(const sCaption: String; Menu: TMenuItem; AOnClick: TNotifyEvent): TMenuItem; + function TDKLang_Expert.NewMenuItem(const wsCaption: UnicodeString; Menu: TMenuItem; AOnClick: TNotifyEvent): TMenuItem; + var bitmap: VCL.Graphics.TBitmap; begin Result := TMenuItem.Create(FMenuOwner); - with Result do begin - Caption := sCaption; - OnClick := AOnClick; + Result.Caption := wsCaption; + Result.OnClick := AOnClick; + bitmap := VCL.Graphics.TBitmap.Create; + try + bitmap.LoadFromResourceName(HInstance,'DKLangMenuIcon'); + Result.ImageIndex := Menu.GetParentMenu.Images.AddMasked(bitmap, bitmap.TransparentColor); + finally + bitmap.Free; end; + Menu.Add(Result); end; @@ -465,7 +476,7 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) LC := Component as TDKLanguageController; case Index of // Save the controller's data into project language source file - 0: if not UpdateProjectLangSource(LC) then DKLangError(SDKLExptErr_CannotSaveLangSource); + 0: if not UpdateProjectLangSource(LC) then raise EDKLangError.Create(SDKLExptErr_CannotSaveLangSource); // Save the controller's data into selected language source file 1: with TSaveDialog.Create(nil) do @@ -481,7 +492,7 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) end; end; - function TDKLangControllerEditor.GetVerb(Index: Integer): string; + function TDKLangControllerEditor.GetVerb(Index: Integer): UnicodeString; begin case Index of 0: Result := 'Save data to pro&ject language source'; @@ -502,4 +513,18 @@ TDKLang_Expert = class(TNotifierObject, IOTAWizard) Result := TDKLang_Expert.Create; end; + procedure DKLang_AddSplashText; + var + bmp: VCL.Graphics.TBitmap; + begin + bmp := VCL.Graphics.TBitmap.Create; + bmp.LoadFromResourceName(HInstance, 'TDKLanguageController'); + SplashScreenServices.AddPluginBitmap('DKLang Localization Package 2013 by Yktoo',bmp.Handle,false,'Open Source!','v5'); + bmp.Free; + end; + + +initialization + DKLang_AddSplashText; + end. diff --git a/Src/DKL_LanguageCodes.inc b/Src/DKL_LanguageCodes.inc new file mode 100644 index 0000000..4627ab9 --- /dev/null +++ b/Src/DKL_LanguageCodes.inc @@ -0,0 +1,451 @@ +///********************************************************************************************************************* +/// $Id: DKL_LanguageCodes.inc 2013-12-06 00:00:00Z bjm $ +///--------------------------------------------------------------------------------------------------------------------- +/// DKLang Localization Package +/// Copyright 2013 Bruce J Miller, Rules of Thumb,inc., http://rules-of-thumb.com/ +///********************************************************************************************************************* +/// +/// The contents of this package are subject to the Mozilla Public License +/// Version 1.1 (the "License"); you may not use this file except in compliance +/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ +/// +/// Alternatively, you may redistribute this library, use and/or modify it under the +/// terms of the GNU Lesser General Public License as published by the Free Software +/// Foundation; either version 2.1 of the License, or (at your option) any later +/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ +/// +/// Software distributed under the License is distributed on an "AS IS" basis, +/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the +/// specific language governing rights and limitations under the License. +/// +///********************************************************************************************************************* +// +// this unit auto-generated on 2013-11-21 14:36:14 +// + + ISO_639_1_LangCodesIndexedByLANGID: array[1..147] of String = ( + 'ar', + 'bg', + 'ca', + 'zh', + 'cs', + 'da', + 'de', + 'el', + 'en', + 'es', + 'fi', + 'fr', + 'he', + 'hu', + 'is', + 'it', + 'ja', + 'ko', + 'nl', + 'no', + 'pl', + 'pt', + 'rm', + 'ro', + 'ru', + 'sr', + 'sk', + 'sq', + 'sv', + 'th', + 'tr', + 'ur', + 'id', + 'uk', + 'be', + 'sl', + 'et', + 'lv', + 'lt', + 'tg', + 'fa', + 'vi', + 'hy', + 'az', + 'eu', + 'dsb', + 'mk', + 'st', + 'ts', + 'tn', + 've', + 'xh', + 'zu', + 'af', + 'ka', + 'fo', + 'hi', + 'mt', + 'se', + 'ga', + 'yi', + 'ms', + 'kk', + 'ky', + 'sw', + 'tk', + 'uz', + 'tt', + 'bn', + 'pa', + 'gu', + 'or', + 'ta', + 'te', + 'kn', + 'ml', + 'as', + 'mr', + 'sa', + 'mn', + 'bo', + 'cy', + 'km', + 'lo', + 'my', + 'gl', + 'kok', + 'mni', + 'sd', + 'syr', + 'si', + 'chr', + 'iu', + 'am', + 'tzm', + 'ks', + 'ne', + 'fy', + 'ps', + 'fil', + 'dv', + 'bin', + 'ff', + 'ha', + 'ibb', + 'yo', + 'quz', + 'nso', + 'ba', + 'lb', + 'kl', + 'ig', + 'kr', + 'om', + 'ti', + 'gn', + 'haw', + 'la', + 'so', + 'ii', + 'pap', + 'arn', + '', + 'moh', + '', + 'br', + '', + 'ug', + 'mi', + 'oc', + 'co', + 'gsw', + 'sah', + 'qut', + 'rw', + 'wo', + '', + '', + '', + 'prs', + '', + '', + '', + '', + 'gd', + 'ku', + 'quc' + ); + + LangRecs: array[0..273-1] of TLangRec = ( + (lcid: 54; cultureCode:'af' ;cultureName:'Afrikaans' ;langName:'Afrikaans' ;nativeLangName:'Afrikaans'), + (lcid: 1078; cultureCode:'af-ZA' ;cultureName:'Afrikaans (South Africa)' ;langName:'Afrikaans' ;nativeLangName:'Afrikaans (Suid Afrika)'), + (lcid: 28; cultureCode:'sq' ;cultureName:'Albanian' ;langName:'Albanian' ;nativeLangName:'shqipe'), + (lcid: 1052; cultureCode:'sq-AL' ;cultureName:'Albanian (Albania)' ;langName:'Albanian' ;nativeLangName:'shqipe (Shqipëria)'), + (lcid: 1156; cultureCode:'gsw-FR' ;cultureName:'Alsatian (France)' ;langName:'Alsatian' ;nativeLangName:'Elsässisch (Frànkrisch)'), + (lcid: 1118; cultureCode:'am-ET' ;cultureName:'Amharic (Ethiopia)' ;langName:'Amharic' ;nativeLangName:'አማርኛ (ኢትዮጵያ)'), + (lcid: 1; cultureCode:'ar' ;cultureName:'Arabic‎' ;langName:'Arabic' ;nativeLangName:'العربية‏'), + (lcid: 5121; cultureCode:'ar-DZ' ;cultureName:'Arabic (Algeria)‎' ;langName:'Arabic' ;nativeLangName:'العربية (الجزائر)‏'), + (lcid:15361; cultureCode:'ar-BH' ;cultureName:'Arabic (Bahrain)‎' ;langName:'Arabic' ;nativeLangName:'العربية (البحرين)‏'), + (lcid: 3073; cultureCode:'ar-EG' ;cultureName:'Arabic (Egypt)‎' ;langName:'Arabic' ;nativeLangName:'العربية (مصر)‏'), + (lcid: 2049; cultureCode:'ar-IQ' ;cultureName:'Arabic (Iraq)‎' ;langName:'Arabic' ;nativeLangName:'العربية (العراق)‏'), + (lcid:11265; cultureCode:'ar-JO' ;cultureName:'Arabic (Jordan)‎' ;langName:'Arabic' ;nativeLangName:'العربية (الأردن)‏'), + (lcid:13313; cultureCode:'ar-KW' ;cultureName:'Arabic (Kuwait)‎' ;langName:'Arabic' ;nativeLangName:'العربية (الكويت)‏'), + (lcid:12289; cultureCode:'ar-LB' ;cultureName:'Arabic (Lebanon)‎' ;langName:'Arabic' ;nativeLangName:'العربية (لبنان)‏'), + (lcid: 4097; cultureCode:'ar-LY' ;cultureName:'Arabic (Libya)‎' ;langName:'Arabic' ;nativeLangName:'العربية (ليبيا)‏'), + (lcid: 6145; cultureCode:'ar-MA' ;cultureName:'Arabic (Morocco)‎' ;langName:'Arabic' ;nativeLangName:'العربية (المملكة المغربية)‏'), + (lcid: 8193; cultureCode:'ar-OM' ;cultureName:'Arabic (Oman)‎' ;langName:'Arabic' ;nativeLangName:'العربية (عمان)‏'), + (lcid:16385; cultureCode:'ar-QA' ;cultureName:'Arabic (Qatar)‎' ;langName:'Arabic' ;nativeLangName:'العربية (قطر)‏'), + (lcid: 1025; cultureCode:'ar-SA' ;cultureName:'Arabic (Saudi Arabia)‎' ;langName:'Arabic' ;nativeLangName:'العربية (المملكة العربية السعودية)‏'), + (lcid:10241; cultureCode:'ar-SY' ;cultureName:'Arabic (Syria)‎' ;langName:'Arabic' ;nativeLangName:'العربية (سوريا)‏'), + (lcid: 7169; cultureCode:'ar-TN' ;cultureName:'Arabic (Tunisia)‎' ;langName:'Arabic' ;nativeLangName:'العربية (تونس)‏'), + (lcid:14337; cultureCode:'ar-AE' ;cultureName:'Arabic (U.A.E.)‎' ;langName:'Arabic' ;nativeLangName:'العربية (الإمارات العربية المتحدة)‏'), + (lcid: 9217; cultureCode:'ar-YE' ;cultureName:'Arabic (Yemen)‎' ;langName:'Arabic' ;nativeLangName:'العربية (اليمن)‏'), + (lcid: 43; cultureCode:'hy' ;cultureName:'Armenian' ;langName:'Armenian' ;nativeLangName:'Հայերեն'), + (lcid: 1067; cultureCode:'hy-AM' ;cultureName:'Armenian (Armenia)' ;langName:'Armenian' ;nativeLangName:'Հայերեն (Հայաստան)'), + (lcid: 1101; cultureCode:'as-IN' ;cultureName:'Assamese (India)' ;langName:'Assamese' ;nativeLangName:'অসমীয়া (ভাৰত)'), + (lcid: 44; cultureCode:'az' ;cultureName:'Azeri' ;langName:'Azeri (Latin)' ;nativeLangName:'Azərbaycan­ılı'), + (lcid: 2092; cultureCode:'az-Cyrl-AZ';cultureName:'Azeri (Cyrillic, Azerbaijan)' ;langName:'Azeri (Cyrillic)' ;nativeLangName:'Азәрбајҹан (Азәрбајҹан)'), + (lcid: 1068; cultureCode:'az-Latn-AZ';cultureName:'Azeri (Latin, Azerbaijan)' ;langName:'Azeri (Latin)' ;nativeLangName:'Azərbaycan­ılı (Azərbaycanca)'), + (lcid: 1133; cultureCode:'ba-RU' ;cultureName:'Bashkir (Russia)' ;langName:'Bashkir' ;nativeLangName:'Башҡорт (Россия)'), + (lcid: 45; cultureCode:'eu' ;cultureName:'Basque' ;langName:'Basque' ;nativeLangName:'euskara'), + (lcid: 1069; cultureCode:'eu-ES' ;cultureName:'Basque (Basque)' ;langName:'Basque' ;nativeLangName:'euskara (euskara)'), + (lcid: 35; cultureCode:'be' ;cultureName:'Belarusian' ;langName:'Belarusian' ;nativeLangName:'Беларускі'), + (lcid: 1059; cultureCode:'be-BY' ;cultureName:'Belarusian (Belarus)' ;langName:'Belarusian' ;nativeLangName:'Беларускі (Беларусь)'), + (lcid: 2117; cultureCode:'bn-BD' ;cultureName:'Bengali (Bangladesh)' ;langName:'Bengali' ;nativeLangName:'বাংলা (বাংলা)'), + (lcid: 1093; cultureCode:'bn-IN' ;cultureName:'Bengali (India)' ;langName:'Bengali' ;nativeLangName:'বাংলা (ভারত)'), + (lcid: 8218; cultureCode:'bs-Cyrl-BA';cultureName:'Bosnian (Cyrillic, Bosnia and Herzegovina)';langName:'Bosnian (Cyrillic)' ;nativeLangName:'босански (Босна и Херцеговина)'), + (lcid: 5146; cultureCode:'bs-Latn-BA';cultureName:'Bosnian (Latin, Bosnia and Herzegovina)' ;langName:'Bosnian (Latin)' ;nativeLangName:'bosanski (Bosna i Hercegovina)'), + (lcid: 1150; cultureCode:'br-FR' ;cultureName:'Breton (France)' ;langName:'Breton' ;nativeLangName:'brezhoneg (Frañs)'), + (lcid: 2; cultureCode:'bg' ;cultureName:'Bulgarian' ;langName:'Bulgarian' ;nativeLangName:'български'), + (lcid: 1026; cultureCode:'bg-BG' ;cultureName:'Bulgarian (Bulgaria)' ;langName:'Bulgarian' ;nativeLangName:'български (България)'), + (lcid: 3; cultureCode:'ca' ;cultureName:'Catalan' ;langName:'Catalan' ;nativeLangName:'català'), + (lcid: 1027; cultureCode:'ca-ES' ;cultureName:'Catalan (Catalan)' ;langName:'Catalan' ;nativeLangName:'català (català)'), + (lcid: 3076; cultureCode:'zh-HK' ;cultureName:'Chinese (Hong Kong S.A.R.)' ;langName:'Chinese' ;nativeLangName:'中文(香港特别行政區)'), + (lcid: 5124; cultureCode:'zh-MO' ;cultureName:'Chinese (Macao S.A.R.)' ;langName:'Chinese' ;nativeLangName:'中文(澳門特别行政區)'), + (lcid: 2052; cultureCode:'zh-CN' ;cultureName:'Chinese (People''s Republic of China)' ;langName:'Chinese' ;nativeLangName:'中文(中华人民共和国)'), + (lcid: 4; cultureCode:'zh-Hans' ;cultureName:'Chinese (Simplified)' ;langName:'Chinese' ;nativeLangName:'中文(简体)'), + (lcid: 4100; cultureCode:'zh-SG' ;cultureName:'Chinese (Singapore)' ;langName:'Chinese' ;nativeLangName:'中文(新加坡)'), + (lcid: 1028; cultureCode:'zh-TW' ;cultureName:'Chinese (Taiwan)' ;langName:'Chinese' ;nativeLangName:'中文(台灣)'), + (lcid:31748; cultureCode:'zh-Hant' ;cultureName:'Chinese (Traditional)' ;langName:'Chinese' ;nativeLangName:'中文(繁體)'), + (lcid: 1155; cultureCode:'co-FR' ;cultureName:'Corsican (France)' ;langName:'Corsican' ;nativeLangName:'Corsu (France)'), + (lcid: 26; cultureCode:'hr' ;cultureName:'Croatian' ;langName:'Croatian' ;nativeLangName:'hrvatski'), + (lcid: 1050; cultureCode:'hr-HR' ;cultureName:'Croatian (Croatia)' ;langName:'Croatian' ;nativeLangName:'hrvatski (Hrvatska)'), + (lcid: 4122; cultureCode:'hr-BA' ;cultureName:'Croatian (Latin, Bosnia and Herzegovina)' ;langName:'Croatian (Latin)' ;nativeLangName:'hrvatski (Bosna i Hercegovina)'), + (lcid: 5; cultureCode:'cs' ;cultureName:'Czech' ;langName:'Czech' ;nativeLangName:'čeština'), + (lcid: 1029; cultureCode:'cs-CZ' ;cultureName:'Czech (Czech Republic)' ;langName:'Czech' ;nativeLangName:'čeština (Česká republika)'), + (lcid: 6; cultureCode:'da' ;cultureName:'Danish' ;langName:'Danish' ;nativeLangName:'dansk'), + (lcid: 1030; cultureCode:'da-DK' ;cultureName:'Danish (Denmark)' ;langName:'Danish' ;nativeLangName:'dansk (Danmark)'), + (lcid: 1164; cultureCode:'prs-AF' ;cultureName:'Dari (Afghanistan)' ;langName:'Dari' ;nativeLangName:'درى (افغانستان)'), + (lcid: 101; cultureCode:'div' ;cultureName:'Divehi‎' ;langName:'Divehi' ;nativeLangName:'ދިވެހިބަސް‏'), + (lcid: 1125; cultureCode:'div-MV' ;cultureName:'Divehi (Maldives)‎' ;langName:'Divehi' ;nativeLangName:'ދިވެހިބަސް (ދިވެހި ރާއްޖެ)‏'), + (lcid: 19; cultureCode:'nl' ;cultureName:'Dutch' ;langName:'Dutch' ;nativeLangName:'Nederlands'), + (lcid: 2067; cultureCode:'nl-BE' ;cultureName:'Dutch (Belgium)' ;langName:'Dutch' ;nativeLangName:'Nederlands (België)'), + (lcid: 1043; cultureCode:'nl-NL' ;cultureName:'Dutch (Netherlands)' ;langName:'Dutch' ;nativeLangName:'Nederlands (Nederland)'), + (lcid: 9; cultureCode:'en' ;cultureName:'English' ;langName:'English' ;nativeLangName:'English'), + (lcid: 3081; cultureCode:'en-AU' ;cultureName:'English (Australia)' ;langName:'English' ;nativeLangName:'English (Australia)'), + (lcid:10249; cultureCode:'en-BZ' ;cultureName:'English (Belize)' ;langName:'English' ;nativeLangName:'English (Belize)'), + (lcid: 4105; cultureCode:'en-CA' ;cultureName:'English (Canada)' ;langName:'English' ;nativeLangName:'English (Canada)'), + (lcid: 9225; cultureCode:'en-029' ;cultureName:'English (Caribbean)' ;langName:'English' ;nativeLangName:'English (Caribbean)'), + (lcid:16393; cultureCode:'en-IN' ;cultureName:'English (India)' ;langName:'English' ;nativeLangName:'English (India)'), + (lcid: 6153; cultureCode:'en-IE' ;cultureName:'English (Ireland)' ;langName:'English' ;nativeLangName:'English (Eire)'), + (lcid: 8201; cultureCode:'en-JM' ;cultureName:'English (Jamaica)' ;langName:'English' ;nativeLangName:'English (Jamaica)'), + (lcid:17417; cultureCode:'en-MY' ;cultureName:'English (Malaysia)' ;langName:'English' ;nativeLangName:'English (Malaysia)'), + (lcid: 5129; cultureCode:'en-NZ' ;cultureName:'English (New Zealand)' ;langName:'English' ;nativeLangName:'English (New Zealand)'), + (lcid:13321; cultureCode:'en-PH' ;cultureName:'English (Republic of the Philippines)' ;langName:'English' ;nativeLangName:'English (Philippines)'), + (lcid:18441; cultureCode:'en-SG' ;cultureName:'English (Singapore)' ;langName:'English' ;nativeLangName:'English (Singapore)'), + (lcid: 7177; cultureCode:'en-ZA' ;cultureName:'English (South Africa)' ;langName:'English' ;nativeLangName:'English (South Africa)'), + (lcid:11273; cultureCode:'en-TT' ;cultureName:'English (Trinidad and Tobago)' ;langName:'English' ;nativeLangName:'English (Trinidad y Tobago)'), + (lcid: 2057; cultureCode:'en-GB' ;cultureName:'English (United Kingdom)' ;langName:'English' ;nativeLangName:'English (United Kingdom)'), + (lcid: 1033; cultureCode:'en-US' ;cultureName:'English (United States)' ;langName:'English' ;nativeLangName:'English (United States)'), + (lcid:12297; cultureCode:'en-ZW' ;cultureName:'English (Zimbabwe)' ;langName:'English' ;nativeLangName:'English (Zimbabwe)'), + (lcid: 37; cultureCode:'et' ;cultureName:'Estonian' ;langName:'Estonian' ;nativeLangName:'eesti'), + (lcid: 1061; cultureCode:'et-EE' ;cultureName:'Estonian (Estonia)' ;langName:'Estonian' ;nativeLangName:'eesti (Eesti)'), + (lcid: 56; cultureCode:'fo' ;cultureName:'Faroese' ;langName:'Faroese' ;nativeLangName:'føroyskt'), + (lcid: 1080; cultureCode:'fo-FO' ;cultureName:'Faroese (Faroe Islands)' ;langName:'Faroese' ;nativeLangName:'føroyskt (Føroyar)'), + (lcid: 1124; cultureCode:'fil-PH' ;cultureName:'Filipino (Philippines)' ;langName:'Filipino' ;nativeLangName:'Filipino (Pilipinas)'), + (lcid: 11; cultureCode:'fi' ;cultureName:'Finnish' ;langName:'Finnish' ;nativeLangName:'suomi'), + (lcid: 1035; cultureCode:'fi-FI' ;cultureName:'Finnish (Finland)' ;langName:'Finnish' ;nativeLangName:'suomi (Suomi)'), + (lcid: 12; cultureCode:'fr' ;cultureName:'French' ;langName:'French' ;nativeLangName:'français'), + (lcid: 2060; cultureCode:'fr-BE' ;cultureName:'French (Belgium)' ;langName:'French' ;nativeLangName:'français (Belgique)'), + (lcid: 3084; cultureCode:'fr-CA' ;cultureName:'French (Canada)' ;langName:'French' ;nativeLangName:'français (Canada)'), + (lcid: 1036; cultureCode:'fr-FR' ;cultureName:'French (France)' ;langName:'French' ;nativeLangName:'français (France)'), + (lcid: 5132; cultureCode:'fr-LU' ;cultureName:'French (Luxembourg)' ;langName:'French' ;nativeLangName:'français (Luxembourg)'), + (lcid: 6156; cultureCode:'fr-MC' ;cultureName:'French (Principality of Monaco)' ;langName:'French' ;nativeLangName:'français (Principauté de Monaco)'), + (lcid: 4108; cultureCode:'fr-CH' ;cultureName:'French (Switzerland)' ;langName:'French' ;nativeLangName:'français (Suisse)'), + (lcid: 1122; cultureCode:'fy-NL' ;cultureName:'Frisian (Netherlands)' ;langName:'Frisian' ;nativeLangName:'Frysk (Nederlân)'), + (lcid: 86; cultureCode:'gl' ;cultureName:'Galician' ;langName:'Galician' ;nativeLangName:'galego'), + (lcid: 1110; cultureCode:'gl-ES' ;cultureName:'Galician (Galician)' ;langName:'Galician' ;nativeLangName:'galego (galego)'), + (lcid: 55; cultureCode:'ka' ;cultureName:'Georgian' ;langName:'Georgian' ;nativeLangName:'ქართული'), + (lcid: 1079; cultureCode:'ka-GE' ;cultureName:'Georgian (Georgia)' ;langName:'Georgian' ;nativeLangName:'ქართული (საქართველო)'), + (lcid: 7; cultureCode:'de' ;cultureName:'German' ;langName:'German' ;nativeLangName:'Deutsch'), + (lcid: 3079; cultureCode:'de-AT' ;cultureName:'German (Austria)' ;langName:'German' ;nativeLangName:'Deutsch (Österreich)'), + (lcid: 1031; cultureCode:'de-DE' ;cultureName:'German (Germany)' ;langName:'German' ;nativeLangName:'Deutsch (Deutschland)'), + (lcid: 5127; cultureCode:'de-LI' ;cultureName:'German (Liechtenstein)' ;langName:'German' ;nativeLangName:'Deutsch (Liechtenstein)'), + (lcid: 4103; cultureCode:'de-LU' ;cultureName:'German (Luxembourg)' ;langName:'German' ;nativeLangName:'Deutsch (Luxemburg)'), + (lcid: 2055; cultureCode:'de-CH' ;cultureName:'German (Switzerland)' ;langName:'German' ;nativeLangName:'Deutsch (Schweiz)'), + (lcid: 8; cultureCode:'el' ;cultureName:'Greek' ;langName:'Greek' ;nativeLangName:'ελληνικά'), + (lcid: 1032; cultureCode:'el-GR' ;cultureName:'Greek (Greece)' ;langName:'Greek' ;nativeLangName:'ελληνικά (Ελλάδα)'), + (lcid: 1135; cultureCode:'kl-GL' ;cultureName:'Greenlandic (Greenland)' ;langName:'Greenlandic' ;nativeLangName:'kalaallisut (Kalaallit Nunaat)'), + (lcid: 71; cultureCode:'gu' ;cultureName:'Gujarati' ;langName:'Gujarati' ;nativeLangName:'ગુજરાતી'), + (lcid: 1095; cultureCode:'gu-IN' ;cultureName:'Gujarati (India)' ;langName:'Gujarati' ;nativeLangName:'ગુજરાતી (ભારત)'), + (lcid: 1128; cultureCode:'ha-Latn-NG';cultureName:'Hausa (Latin, Nigeria)' ;langName:'Hausa (Latin)' ;nativeLangName:'Hausa (Nigeria)'), + (lcid: 13; cultureCode:'he' ;cultureName:'Hebrew‎' ;langName:'Hebrew' ;nativeLangName:'עברית‏'), + (lcid: 1037; cultureCode:'he-IL' ;cultureName:'Hebrew (Israel)‎' ;langName:'Hebrew' ;nativeLangName:'עברית (ישראל)‏'), + (lcid: 57; cultureCode:'hi' ;cultureName:'Hindi' ;langName:'Hindi' ;nativeLangName:'हिंदी'), + (lcid: 1081; cultureCode:'hi-IN' ;cultureName:'Hindi (India)' ;langName:'Hindi' ;nativeLangName:'हिंदी (भारत)'), + (lcid: 14; cultureCode:'hu' ;cultureName:'Hungarian' ;langName:'Hungarian' ;nativeLangName:'magyar'), + (lcid: 1038; cultureCode:'hu-HU' ;cultureName:'Hungarian (Hungary)' ;langName:'Hungarian' ;nativeLangName:'magyar (Magyarország)'), + (lcid: 15; cultureCode:'is' ;cultureName:'Icelandic' ;langName:'Icelandic' ;nativeLangName:'íslenska'), + (lcid: 1039; cultureCode:'is-IS' ;cultureName:'Icelandic (Iceland)' ;langName:'Icelandic' ;nativeLangName:'íslenska (Ísland)'), + (lcid: 1136; cultureCode:'ig-NG' ;cultureName:'Igbo (Nigeria)' ;langName:'Igbo' ;nativeLangName:'Igbo (Nigeria)'), + (lcid: 33; cultureCode:'id' ;cultureName:'Indonesian' ;langName:'Indonesian' ;nativeLangName:'Bahasa Indonesia'), + (lcid: 1057; cultureCode:'id-ID' ;cultureName:'Indonesian (Indonesia)' ;langName:'Indonesian' ;nativeLangName:'Bahasa Indonesia (Indonesia)'), + (lcid: 2141; cultureCode:'iu-Latn-CA';cultureName:'Inuktitut (Latin, Canada)' ;langName:'Inuktitut (Latin)' ;nativeLangName:'Inuktitut (Kanatami) (kanata)'), + (lcid: 1117; cultureCode:'iu-Cans-CA';cultureName:'Inuktitut (Syllabics, Canada)' ;langName:'Inuktitut' ;nativeLangName:'ᐃᓄᒃᑎᑐᑦ (ᑲᓇᑕ)'), + (lcid: 2108; cultureCode:'ga-IE' ;cultureName:'Irish (Ireland)' ;langName:'Irish' ;nativeLangName:'Gaeilge (Éire)'), + (lcid: 1076; cultureCode:'xh-ZA' ;cultureName:'isiXhosa (South Africa)' ;langName:'isiXhosa' ;nativeLangName:'isiXhosa (uMzantsi Afrika)'), + (lcid: 1077; cultureCode:'zu-ZA' ;cultureName:'isiZulu (South Africa)' ;langName:'isiZulu' ;nativeLangName:'isiZulu (iNingizimu Afrika)'), + (lcid: 16; cultureCode:'it' ;cultureName:'Italian' ;langName:'Italian' ;nativeLangName:'italiano'), + (lcid: 1040; cultureCode:'it-IT' ;cultureName:'Italian (Italy)' ;langName:'Italian' ;nativeLangName:'italiano (Italia)'), + (lcid: 2064; cultureCode:'it-CH' ;cultureName:'Italian (Switzerland)' ;langName:'Italian' ;nativeLangName:'italiano (Svizzera)'), + (lcid: 17; cultureCode:'ja' ;cultureName:'Japanese' ;langName:'Japanese' ;nativeLangName:'日本語'), + (lcid: 1041; cultureCode:'ja-JP' ;cultureName:'Japanese (Japan)' ;langName:'Japanese' ;nativeLangName:'日本語 (日本)'), + (lcid: 75; cultureCode:'kn' ;cultureName:'Kannada' ;langName:'Kannada' ;nativeLangName:'ಕನ್ನಡ'), + (lcid: 1099; cultureCode:'kn-IN' ;cultureName:'Kannada (India)' ;langName:'Kannada' ;nativeLangName:'ಕನ್ನಡ (ಭಾರತ)'), + (lcid: 63; cultureCode:'kk' ;cultureName:'Kazakh' ;langName:'Kazakh' ;nativeLangName:'Қазащb'), + (lcid: 1087; cultureCode:'kk-KZ' ;cultureName:'Kazakh (Kazakhstan)' ;langName:'Kazakh' ;nativeLangName:'Қазақ (Қазақстан)'), + (lcid: 1107; cultureCode:'km-KH' ;cultureName:'Khmer (Cambodia)' ;langName:'Khmer' ;nativeLangName:'ខ្មែរ (កម្ពុជា)'), + (lcid: 1158; cultureCode:'qut-GT' ;cultureName:'K''iche (Guatemala)' ;langName:'K''iche' ;nativeLangName:'K''iche (Guatemala)'), + (lcid: 1159; cultureCode:'rw-RW' ;cultureName:'Kinyarwanda (Rwanda)' ;langName:'Kinyarwanda' ;nativeLangName:'Kinyarwanda (Rwanda)'), + (lcid: 65; cultureCode:'sw' ;cultureName:'Kiswahili' ;langName:'Kiswahili' ;nativeLangName:'Kiswahili'), + (lcid: 1089; cultureCode:'sw-KE' ;cultureName:'Kiswahili (Kenya)' ;langName:'Kiswahili' ;nativeLangName:'Kiswahili (Kenya)'), + (lcid: 87; cultureCode:'kok' ;cultureName:'Konkani' ;langName:'Konkani' ;nativeLangName:'कोंकणी'), + (lcid: 1111; cultureCode:'kok-IN' ;cultureName:'Konkani (India)' ;langName:'Konkani' ;nativeLangName:'कोंकणी (भारत)'), + (lcid: 18; cultureCode:'ko' ;cultureName:'Korean' ;langName:'Korean' ;nativeLangName:'한국어'), + (lcid: 1042; cultureCode:'ko-KR' ;cultureName:'Korean (Korea)' ;langName:'Korean' ;nativeLangName:'한국어 (대한민국)'), + (lcid: 64; cultureCode:'ky' ;cultureName:'Kyrgyz' ;langName:'Kyrgyz' ;nativeLangName:'Кыргыз'), + (lcid: 1088; cultureCode:'ky-KG' ;cultureName:'Kyrgyz (Kyrgyzstan)' ;langName:'Kyrgyz' ;nativeLangName:'Кыргыз (Кыргызстан)'), + (lcid: 1108; cultureCode:'lo-LA' ;cultureName:'Lao (Lao P.D.R.)' ;langName:'Lao' ;nativeLangName:'ລາວ (ສ.ປ.ປ. ລາວ)'), + (lcid: 38; cultureCode:'lv' ;cultureName:'Latvian' ;langName:'Latvian' ;nativeLangName:'latviešu'), + (lcid: 1062; cultureCode:'lv-LV' ;cultureName:'Latvian (Latvia)' ;langName:'Latvian' ;nativeLangName:'latviešu (Latvija)'), + (lcid: 39; cultureCode:'lt' ;cultureName:'Lithuanian' ;langName:'Lithuanian' ;nativeLangName:'lietuvių'), + (lcid: 1063; cultureCode:'lt-LT' ;cultureName:'Lithuanian (Lithuania)' ;langName:'Lithuanian' ;nativeLangName:'lietuvių (Lietuva)'), + (lcid: 2094; cultureCode:'wee-DE' ;cultureName:'Lower Sorbian (Germany)' ;langName:'Lower Sorbian' ;nativeLangName:'dolnoserbšćina (Nimska)'), + (lcid: 1134; cultureCode:'lb-LU' ;cultureName:'Luxembourgish (Luxembourg)' ;langName:'Luxembourgish' ;nativeLangName:'Lëtzebuergesch (Luxembourg)'), + (lcid: 47; cultureCode:'mk' ;cultureName:'Macedonian' ;langName:'Macedonian (FYROM)' ;nativeLangName:'македонски јазик'), + (lcid: 1071; cultureCode:'mk-MK' ;cultureName:'Macedonian (Former Yugoslav Republic of Macedonia)';langName:'Macedonian (FYROM)' ;nativeLangName:'македонски јазик (Македонија)'), + (lcid: 62; cultureCode:'ms' ;cultureName:'Malay' ;langName:'Malay' ;nativeLangName:'Bahasa Malaysia'), + (lcid: 2110; cultureCode:'ms-BN' ;cultureName:'Malay (Brunei Darussalam)' ;langName:'Malay' ;nativeLangName:'Bahasa Malaysia (Brunei Darussalam)'), + (lcid: 1086; cultureCode:'ms-MY' ;cultureName:'Malay (Malaysia)' ;langName:'Malay' ;nativeLangName:'Bahasa Malaysia (Malaysia)'), + (lcid: 1100; cultureCode:'ml-IN' ;cultureName:'Malayalam (India)' ;langName:'Malayalam' ;nativeLangName:'മലയാളം (ഭാരതം)'), + (lcid: 1082; cultureCode:'mt-MT' ;cultureName:'Maltese (Malta)' ;langName:'Maltese' ;nativeLangName:'Malti (Malta)'), + (lcid: 1153; cultureCode:'mi-NZ' ;cultureName:'Maori (New Zealand)' ;langName:'Maori' ;nativeLangName:'Reo Māori (Aotearoa)'), + (lcid: 1146; cultureCode:'arn-CL' ;cultureName:'Mapudungun (Chile)' ;langName:'Mapudungun' ;nativeLangName:'Mapudungun (Chile)'), + (lcid: 78; cultureCode:'mr' ;cultureName:'Marathi' ;langName:'Marathi' ;nativeLangName:'मराठी'), + (lcid: 1102; cultureCode:'mr-IN' ;cultureName:'Marathi (India)' ;langName:'Marathi' ;nativeLangName:'मराठी (भारत)'), + (lcid: 1148; cultureCode:'moh-CA' ;cultureName:'Mohawk (Mohawk)' ;langName:'Mohawk' ;nativeLangName:'Kanien''kéha (Canada)'), + (lcid: 80; cultureCode:'mn' ;cultureName:'Mongolian' ;langName:'Mongolian (Cyrillic)' ;nativeLangName:'Монгол хэл'), + (lcid: 1104; cultureCode:'mn-MN' ;cultureName:'Mongolian (Cyrillic, Mongolia)' ;langName:'Mongolian (Cyrillic)' ;nativeLangName:'Монгол хэл (Монгол улс)'), + (lcid: 2128; cultureCode:'mn-Mong-CN';cultureName:'Mongolian (Traditional Mongolian, PRC)' ;langName:'Mongolian (Traditional Mongolian)';nativeLangName:'ᠮᠣᠩᠭᠤᠯ ᠬᠡᠯᠡ (ᠪᠦᠭᠦᠳᠡ ᠨᠠᠢᠷᠠᠮᠳᠠᠬᠤ ᠳᠤᠮᠳᠠᠳᠤ ᠠᠷᠠᠳ ᠣᠯᠣᠰ)'), + (lcid: 1121; cultureCode:'ne-NP' ;cultureName:'Nepali (Nepal)' ;langName:'Nepali' ;nativeLangName:'नेपाली (नेपाल)'), + (lcid: 20; cultureCode:'no' ;cultureName:'Norwegian' ;langName:'Norwegian (Bokmål)' ;nativeLangName:'norsk'), + (lcid: 1044; cultureCode:'nb-NO' ;cultureName:'Norwegian, Bokmål (Norway)' ;langName:'Norwegian (Bokmål)' ;nativeLangName:'norsk, bokmål (Norge)'), + (lcid: 2068; cultureCode:'nn-NO' ;cultureName:'Norwegian, Nynorsk (Norway)' ;langName:'Norwegian (Nynorsk)' ;nativeLangName:'norsk, nynorsk (Noreg)'), + (lcid: 1154; cultureCode:'oc-FR' ;cultureName:'Occitan (France)' ;langName:'Occitan' ;nativeLangName:'Occitan (França)'), + (lcid: 1096; cultureCode:'or-IN' ;cultureName:'Oriya (India)' ;langName:'Oriya' ;nativeLangName:'ଓଡ଼ିଆ (ଭାରତ)'), + (lcid: 1123; cultureCode:'ps-AF' ;cultureName:'Pashto (Afghanistan)' ;langName:'Pashto' ;nativeLangName:'پښتو (افغانستان)'), + (lcid: 41; cultureCode:'fa' ;cultureName:'Persian‎' ;langName:'Persian' ;nativeLangName:'فارسى‏'), + (lcid: 1065; cultureCode:'fa-IR' ;cultureName:'Persian‎' ;langName:'Persian' ;nativeLangName:'فارسى (ايران)‏'), + (lcid: 21; cultureCode:'pl' ;cultureName:'Polish' ;langName:'Polish' ;nativeLangName:'polski'), + (lcid: 1045; cultureCode:'pl-PL' ;cultureName:'Polish (Poland)' ;langName:'Polish' ;nativeLangName:'polski (Polska)'), + (lcid: 22; cultureCode:'pt' ;cultureName:'Portuguese' ;langName:'Portuguese' ;nativeLangName:'Português'), + (lcid: 1046; cultureCode:'pt-BR' ;cultureName:'Portuguese (Brazil)' ;langName:'Portuguese' ;nativeLangName:'Português (Brasil)'), + (lcid: 2070; cultureCode:'pt-PT' ;cultureName:'Portuguese (Portugal)' ;langName:'Portuguese' ;nativeLangName:'português (Portugal)'), + (lcid: 70; cultureCode:'pa' ;cultureName:'Punjabi' ;langName:'Punjabi' ;nativeLangName:'ਪੰਜਾਬੀ'), + (lcid: 1094; cultureCode:'pa-IN' ;cultureName:'Punjabi (India)' ;langName:'Punjabi' ;nativeLangName:'ਪੰਜਾਬੀ (ਭਾਰਤ)'), + (lcid: 1131; cultureCode:'quz-BO' ;cultureName:'Quechua (Bolivia)' ;langName:'Quechua' ;nativeLangName:'runasimi (Bolivia Suyu)'), + (lcid: 2155; cultureCode:'quz-EC' ;cultureName:'Quechua (Ecuador)' ;langName:'Quechua' ;nativeLangName:'runasimi (Ecuador Suyu)'), + (lcid: 3179; cultureCode:'quz-PE' ;cultureName:'Quechua (Peru)' ;langName:'Quechua' ;nativeLangName:'runasimi (Peru Suyu)'), + (lcid: 24; cultureCode:'ro' ;cultureName:'Romanian' ;langName:'Romanian' ;nativeLangName:'română'), + (lcid: 1048; cultureCode:'ro-RO' ;cultureName:'Romanian (Romania)' ;langName:'Romanian' ;nativeLangName:'română (România)'), + (lcid: 1047; cultureCode:'rm-CH' ;cultureName:'Romansh (Switzerland)' ;langName:'Romansh' ;nativeLangName:'Rumantsch (Svizra)'), + (lcid: 25; cultureCode:'ru' ;cultureName:'Russian' ;langName:'Russian' ;nativeLangName:'русский'), + (lcid: 1049; cultureCode:'ru-RU' ;cultureName:'Russian (Russia)' ;langName:'Russian' ;nativeLangName:'русский (Россия)'), + (lcid: 9275; cultureCode:'smn-FI' ;cultureName:'Sami, Inari (Finland)' ;langName:'Sami (Inari)' ;nativeLangName:'sämikielâ (Suomâ)'), + (lcid: 4155; cultureCode:'smj-NO' ;cultureName:'Sami, Lule (Norway)' ;langName:'Sami (Lule)' ;nativeLangName:'julevusámegiella (Vuodna)'), + (lcid: 5179; cultureCode:'smj-SE' ;cultureName:'Sami, Lule (Sweden)' ;langName:'Sami (Lule)' ;nativeLangName:'julevusámegiella (Svierik)'), + (lcid: 3131; cultureCode:'se-FI' ;cultureName:'Sami, Northern (Finland)' ;langName:'Sami (Northern)' ;nativeLangName:'davvisámegiella (Suopma)'), + (lcid: 1083; cultureCode:'se-NO' ;cultureName:'Sami, Northern (Norway)' ;langName:'Sami (Northern)' ;nativeLangName:'davvisámegiella (Norga)'), + (lcid: 2107; cultureCode:'se-SE' ;cultureName:'Sami, Northern (Sweden)' ;langName:'Sami (Northern)' ;nativeLangName:'davvisámegiella (Ruoŧŧa)'), + (lcid: 8251; cultureCode:'sms-FI' ;cultureName:'Sami, Skolt (Finland)' ;langName:'Sami (Skolt)' ;nativeLangName:'sääm´ǩiõll (Lää´ddjânnam)'), + (lcid: 6203; cultureCode:'sma-NO' ;cultureName:'Sami, Southern (Norway)' ;langName:'Sami (Southern)' ;nativeLangName:'åarjelsaemiengiele (Nöörje)'), + (lcid: 7227; cultureCode:'sma-SE' ;cultureName:'Sami, Southern (Sweden)' ;langName:'Sami (Southern)' ;nativeLangName:'åarjelsaemiengiele (Sveerje)'), + (lcid: 79; cultureCode:'sa' ;cultureName:'Sanskrit' ;langName:'Sanskrit' ;nativeLangName:'संस्कृत'), + (lcid: 1103; cultureCode:'sa-IN' ;cultureName:'Sanskrit (India)' ;langName:'Sanskrit' ;nativeLangName:'संस्कृत (भारतम्)'), + (lcid:31770; cultureCode:'sr' ;cultureName:'Serbian' ;langName:'Serbian (Latin)' ;nativeLangName:'srpski'), + (lcid: 7194; cultureCode:'sr-Cyrl-BA';cultureName:'Serbian (Cyrillic, Bosnia and Herzegovina)';langName:'Serbian (Cyrillic)' ;nativeLangName:'српски (Босна и Херцеговина)'), + (lcid: 3098; cultureCode:'sr-Cyrl-SP';cultureName:'Serbian (Cyrillic, Serbia)' ;langName:'Serbian (Cyrillic)' ;nativeLangName:'српски (Србија и Црна Гора)'), + (lcid: 6170; cultureCode:'sr-Latn-BA';cultureName:'Serbian (Latin, Bosnia and Herzegovina)' ;langName:'Serbian (Latin)' ;nativeLangName:'srpski (Bosna i Hercegovina)'), + (lcid: 2074; cultureCode:'sr-Latn-SP';cultureName:'Serbian (Latin, Serbia)' ;langName:'Serbian (Latin)' ;nativeLangName:'srpski (Srbija i Crna Gora)'), + (lcid: 1132; cultureCode:'nso-ZA' ;cultureName:'Sesotho sa Leboa (South Africa)' ;langName:'Sesotho sa Leboa' ;nativeLangName:'Sesotho sa Leboa (Afrika Borwa)'), + (lcid: 1074; cultureCode:'tn-ZA' ;cultureName:'Setswana (South Africa)' ;langName:'Setswana' ;nativeLangName:'Setswana (Aforika Borwa)'), + (lcid: 1115; cultureCode:'si-LK' ;cultureName:'Sinhala (Sri Lanka)' ;langName:'Sinhala' ;nativeLangName:'සිංහ (ශ්‍රී ලංකා)'), + (lcid: 27; cultureCode:'sk' ;cultureName:'Slovak' ;langName:'Slovak' ;nativeLangName:'slovenčina'), + (lcid: 1051; cultureCode:'sk-SK' ;cultureName:'Slovak (Slovakia)' ;langName:'Slovak' ;nativeLangName:'slovenčina (Slovenská republika)'), + (lcid: 36; cultureCode:'sl' ;cultureName:'Slovenian' ;langName:'Slovenian' ;nativeLangName:'slovenski'), + (lcid: 1060; cultureCode:'sl-SI' ;cultureName:'Slovenian (Slovenia)' ;langName:'Slovenian' ;nativeLangName:'slovenski (Slovenija)'), + (lcid: 10; cultureCode:'es' ;cultureName:'Spanish' ;langName:'Spanish' ;nativeLangName:'español'), + (lcid:11274; cultureCode:'es-AR' ;cultureName:'Spanish (Argentina)' ;langName:'Spanish' ;nativeLangName:'Español (Argentina)'), + (lcid:16394; cultureCode:'es-BO' ;cultureName:'Spanish (Bolivia)' ;langName:'Spanish' ;nativeLangName:'Español (Bolivia)'), + (lcid:13322; cultureCode:'es-CL' ;cultureName:'Spanish (Chile)' ;langName:'Spanish' ;nativeLangName:'Español (Chile)'), + (lcid: 9226; cultureCode:'es-CO' ;cultureName:'Spanish (Colombia)' ;langName:'Spanish' ;nativeLangName:'Español (Colombia)'), + (lcid: 5130; cultureCode:'es-CR' ;cultureName:'Spanish (Costa Rica)' ;langName:'Spanish' ;nativeLangName:'Español (Costa Rica)'), + (lcid: 7178; cultureCode:'es-DO' ;cultureName:'Spanish (Dominican Republic)' ;langName:'Spanish' ;nativeLangName:'Español (República Dominicana)'), + (lcid:12298; cultureCode:'es-EC' ;cultureName:'Spanish (Ecuador)' ;langName:'Spanish' ;nativeLangName:'Español (Ecuador)'), + (lcid:17418; cultureCode:'es-SV' ;cultureName:'Spanish (El Salvador)' ;langName:'Spanish' ;nativeLangName:'Español (El Salvador)'), + (lcid: 4106; cultureCode:'es-GT' ;cultureName:'Spanish (Guatemala)' ;langName:'Spanish' ;nativeLangName:'Español (Guatemala)'), + (lcid:18442; cultureCode:'es-HN' ;cultureName:'Spanish (Honduras)' ;langName:'Spanish' ;nativeLangName:'Español (Honduras)'), + (lcid: 2058; cultureCode:'es-MX' ;cultureName:'Spanish (Mexico)' ;langName:'Spanish' ;nativeLangName:'Español (México)'), + (lcid:19466; cultureCode:'es-NI' ;cultureName:'Spanish (Nicaragua)' ;langName:'Spanish' ;nativeLangName:'Español (Nicaragua)'), + (lcid: 6154; cultureCode:'es-PA' ;cultureName:'Spanish (Panama)' ;langName:'Spanish' ;nativeLangName:'Español (Panamá)'), + (lcid:15370; cultureCode:'es-PY' ;cultureName:'Spanish (Paraguay)' ;langName:'Spanish' ;nativeLangName:'Español (Paraguay)'), + (lcid:10250; cultureCode:'es-PE' ;cultureName:'Spanish (Peru)' ;langName:'Spanish' ;nativeLangName:'Español (Perú)'), + (lcid:20490; cultureCode:'es-PR' ;cultureName:'Spanish (Puerto Rico)' ;langName:'Spanish' ;nativeLangName:'Español (Puerto Rico)'), + (lcid: 3082; cultureCode:'es-ES' ;cultureName:'Spanish (Spain)' ;langName:'Spanish' ;nativeLangName:'español (España)'), + (lcid:21514; cultureCode:'es-US' ;cultureName:'Spanish (United States)' ;langName:'Spanish' ;nativeLangName:'Español (Estados Unidos)'), + (lcid:14346; cultureCode:'es-UY' ;cultureName:'Spanish (Uruguay)' ;langName:'Spanish' ;nativeLangName:'Español (Uruguay)'), + (lcid: 8202; cultureCode:'es-VE' ;cultureName:'Spanish (Venezuela)' ;langName:'Spanish' ;nativeLangName:'Español (Republica Bolivariana de Venezuela)'), + (lcid: 29; cultureCode:'sv' ;cultureName:'Swedish' ;langName:'Swedish' ;nativeLangName:'svenska'), + (lcid: 2077; cultureCode:'sv-FI' ;cultureName:'Swedish (Finland)' ;langName:'Swedish' ;nativeLangName:'svenska (Finland)'), + (lcid: 1053; cultureCode:'sv-SE' ;cultureName:'Swedish (Sweden)' ;langName:'Swedish' ;nativeLangName:'svenska (Sverige)'), + (lcid: 90; cultureCode:'syr' ;cultureName:'Syriac‎' ;langName:'Syriac' ;nativeLangName:'ܣܘܪܝܝܐ‏'), + (lcid: 1114; cultureCode:'syr-SY' ;cultureName:'Syriac (Syria)‎' ;langName:'Syriac' ;nativeLangName:'ܣܘܪܝܝܐ (سوريا)‏'), + (lcid: 1064; cultureCode:'tg-Cyrl-TJ';cultureName:'Tajik (Cyrillic, Tajikistan)' ;langName:'Tajik (Cyrillic)' ;nativeLangName:'Тоҷикӣ (Тоҷикистон)'), + (lcid: 2143; cultureCode:'tzm-Latn-DZ';cultureName:'Tamazight (Latin, Algeria)' ;langName:'Tamazight (Latin)' ;nativeLangName:'Tamazight (Djazaïr)'), + (lcid: 73; cultureCode:'ta' ;cultureName:'Tamil' ;langName:'Tamil' ;nativeLangName:'தமிழ்'), + (lcid: 1097; cultureCode:'ta-IN' ;cultureName:'Tamil (India)' ;langName:'Tamil' ;nativeLangName:'தமிழ் (இந்தியா)'), + (lcid: 68; cultureCode:'tt' ;cultureName:'Tatar' ;langName:'Tatar' ;nativeLangName:'Татар'), + (lcid: 1092; cultureCode:'tt-RU' ;cultureName:'Tatar (Russia)' ;langName:'Tatar' ;nativeLangName:'Татар (Россия)'), + (lcid: 74; cultureCode:'te' ;cultureName:'Telugu' ;langName:'Telugu' ;nativeLangName:'తెలుగు'), + (lcid: 1098; cultureCode:'te-IN' ;cultureName:'Telugu (India)' ;langName:'Telugu' ;nativeLangName:'తెలుగు (భారత దేశం)'), + (lcid: 30; cultureCode:'th' ;cultureName:'Thai' ;langName:'Thai' ;nativeLangName:'ไทย'), + (lcid: 1054; cultureCode:'th-TH' ;cultureName:'Thai (Thailand)' ;langName:'Thai' ;nativeLangName:'ไทย (ไทย)'), + (lcid: 1105; cultureCode:'bo-CN' ;cultureName:'Tibetan (PRC)' ;langName:'Tibetan' ;nativeLangName:'བོད་ཡིག (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།)'), + (lcid: 31; cultureCode:'tr' ;cultureName:'Turkish' ;langName:'Turkish' ;nativeLangName:'Türkçe'), + (lcid: 1055; cultureCode:'tr-TR' ;cultureName:'Turkish (Turkey)' ;langName:'Turkish' ;nativeLangName:'Türkçe (Türkiye)'), + (lcid: 1090; cultureCode:'tk-TM' ;cultureName:'Turkmen (Turkmenistan)' ;langName:'Turkmen' ;nativeLangName:'türkmençe (Türkmenistan)'), + (lcid: 1152; cultureCode:'ug-CN' ;cultureName:'Uighur (PRC)' ;langName:'Uighur' ;nativeLangName:'ئۇيغۇر يېزىقى (جۇڭخۇا خەلق جۇمھۇرىيىتى)'), + (lcid: 34; cultureCode:'uk' ;cultureName:'Ukrainian' ;langName:'Ukrainian' ;nativeLangName:'україньска'), + (lcid: 1058; cultureCode:'uk-UA' ;cultureName:'Ukrainian (Ukraine)' ;langName:'Ukrainian' ;nativeLangName:'україньска (Україна)'), + (lcid: 1070; cultureCode:'wen-DE' ;cultureName:'Upper Sorbian (Germany)' ;langName:'Upper Sorbian' ;nativeLangName:'hornjoserbšćina (Němska)'), + (lcid: 32; cultureCode:'ur' ;cultureName:'Urdu‎' ;langName:'Urdu' ;nativeLangName:'اُردو‏'), + (lcid: 1056; cultureCode:'ur-PK' ;cultureName:'Urdu (Islamic Republic of Pakistan)‎' ;langName:'Urdu' ;nativeLangName:'اُردو (پاکستان)‏'), + (lcid: 67; cultureCode:'uz' ;cultureName:'Uzbek' ;langName:'Uzbek (Latin)' ;nativeLangName:'U''zbek'), + (lcid: 2115; cultureCode:'uz-Cyrl-UZ';cultureName:'Uzbek (Cyrillic, Uzbekistan)' ;langName:'Uzbek (Cyrillic)' ;nativeLangName:'Ўзбек (Ўзбекистон)'), + (lcid: 1091; cultureCode:'uz-Latn-UZ';cultureName:'Uzbek (Latin, Uzbekistan)' ;langName:'Uzbek (Latin)' ;nativeLangName:'U''zbek (U''zbekiston Respublikasi)'), + (lcid: 42; cultureCode:'vi' ;cultureName:'Vietnamese' ;langName:'Vietnamese' ;nativeLangName:'Tiếng Việt'), + (lcid: 1066; cultureCode:'vi-VN' ;cultureName:'Vietnamese (Vietnam)' ;langName:'Vietnamese' ;nativeLangName:'Tiếng Việt (Việt Nam)'), + (lcid: 1106; cultureCode:'cy-GB' ;cultureName:'Welsh (United Kingdom)' ;langName:'Welsh' ;nativeLangName:'Cymraeg (y Deyrnas Unedig)'), + (lcid: 1160; cultureCode:'wo-SN' ;cultureName:'Wolof (Senegal)' ;langName:'Wolof' ;nativeLangName:'Wolof (Sénégal)'), + (lcid: 1157; cultureCode:'sah-RU' ;cultureName:'Yakut (Russia)' ;langName:'Yakut' ;nativeLangName:'саха (Россия)'), + (lcid: 1144; cultureCode:'ii-CN' ;cultureName:'Yi (PRC)' ;langName:'Yi' ;nativeLangName:'ꆈꌠꁱꂷ (ꍏꉸꏓꂱꇭꉼꇩ)'), + (lcid: 1130; cultureCode:'yo-NG' ;cultureName:'Yoruba (Nigeria)' ;langName:'Yoruba' ;nativeLangName:'Yoruba (Nigeria)') + ); + diff --git a/Src/DKL_LanguageCodes.pas b/Src/DKL_LanguageCodes.pas new file mode 100644 index 0000000..2425eb8 --- /dev/null +++ b/Src/DKL_LanguageCodes.pas @@ -0,0 +1,201 @@ +///********************************************************************************************************************* +/// $Id: DKL_LanguageCodes.pas 2013-12-06 00:00:00Z bjm $ +///--------------------------------------------------------------------------------------------------------------------- +/// DKLang Localization Package +/// Copyright 2013 Bruce J Miller, Rules of Thumb,inc., http://rules-of-thumb.com/ +///********************************************************************************************************************* +/// +/// The contents of this package are subject to the Mozilla Public License +/// Version 1.1 (the "License"); you may not use this file except in compliance +/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ +/// +/// Alternatively, you may redistribute this library, use and/or modify it under the +/// terms of the GNU Lesser General Public License as published by the Free Software +/// Foundation; either version 2.1 of the License, or (at your option) any later +/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ +/// +/// Software distributed under the License is distributed on an "AS IS" basis, +/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the +/// specific language governing rights and limitations under the License. +/// +///********************************************************************************************************************* +// +// Language code/name lookups +// + + +unit DKL_LanguageCodes; + +interface + +function GetLanguageCodeFromLangId(aLANGID: UInt32): string; +function GetCultureCodeFromLangId(aLANGID: UInt32): string; +function GetCultureNameFromLangId(aLANGID: UInt32): string; +function GetCultureNativeNameFromLangId(aLANGID: UInt32): string; +function GetLanguageNameFromLangId(aLANGID: UInt32): string; +function GetLanguageNativeNameFromLangId(aLANGID: UInt32): string; +function IsRightToLeftLanguage(aLangID: UInt32): Boolean; + +// works with either 'en' or 'en-US' types +function GetLangIdFromCultureCode(cultureCode: string): UInt32; + + +implementation + +uses + SysUtils; + +type + TLangRec = record + lcid: UInt32; + cultureCode: string; + cultureName: string; + langName: string; + nativeLangName: string; + end; + +const + +// DKL_LanguageCodes.inc holds the language data. It is generated on-demand +// by Build_DKL_LanguageCodes.exe. + +{$I DKL_LanguageCodes.inc} + + +function GetLangRecFromLCID(aLANGID: UInt32): TLangRec; +var langRec: TLangRec; +begin + for langRec in LangRecs do + if langRec.lcid = aLANGID then + exit(langRec); +end; + +function GetLangRecFromCultureCode(cultureCode: string): TLangRec; +var langRec: TLangRec; +begin + for langRec in LangRecs do + if SameText(cultureCode,langRec.culturecode) then + exit(langRec); +end; + +function GetLanguageCodeFromLangId(aLANGID: UInt32): string; +var langRec: TLangRec; +begin + langRec := GetLangRecFromLCID(aLANGID); + + // check to see if correct rec was found + if langRec.lcid = aLANGID then + begin + result := langRec.cultureCode; + if result.IndexOf('-') = -1 then exit; + + // strip culture suffix + exit(result.Substring(0,result.IndexOf('-'))); + end; + + result := IntToStr(aLANGID); +end; + +function GetCultureCodeFromLangId(aLANGID: UInt32): string; +var langRec: TLangRec; +begin + langRec := GetLangRecFromLCID(aLANGID); + + // check to see if correct rec was found + if langRec.lcid = aLANGID then + exit(langRec.cultureCode); + + result := IntToStr(aLANGID); +end; + +function GetCultureNameFromLangId(aLANGID: UInt32): string; +var langRec: TLangRec; +begin + langRec := GetLangRecFromLCID(aLANGID); + + // check to see if correct rec was found + if langRec.lcid = aLANGID then + begin + if langRec.cultureName <> '' then + exit(langRec.cultureName) + else + exit(langRec.cultureCode); + end; + + result := IntToStr(aLANGID); +end; + +function GetCultureNativeNameFromLangId(aLANGID: UInt32): string; +var langRec: TLangRec; +begin + langRec := GetLangRecFromLCID(aLANGID); + + // check to see if correct rec was found + if langRec.lcid = aLANGID then + begin + if langRec.nativeLangName <> '' then + exit(langRec.nativeLangName) + else + exit(langRec.langName); + end; + + // not in list, so return the id as string + result := IntToStr(aLANGID); +end; + +function GetLanguageNativeNameFromLangId(aLANGID: UInt32): string; +var langRec: TLangRec; +begin + langRec := GetLangRecFromLCID(aLANGID); + + // check to see if correct rec was found + if langRec.lcid = aLANGID then + begin + if langRec.nativeLangName <> '' then + result := langRec.nativeLangName + else + result := langRec.langName; + + if result.IndexOf('(') = -1 then exit; + + // strip culture suffix + exit(result.Substring(0,result.IndexOf('(')).Trim); + end; + + // not in list, so return the id as string + result := IntToStr(aLANGID); +end; + +function GetLanguageNameFromLangId(aLANGID: UInt32): string; +var langRec: TLangRec; +begin + langRec := GetLangRecFromLCID(aLANGID); + + // check to see if correct rec was found + if langRec.lcid = aLANGID then + exit(langRec.langName); + + // not in list, so return the id as string + result := IntToStr(aLANGID); +end; + +function GetLangIdFromCultureCode(cultureCode: string): UInt32; +var langRec: TLangRec; +begin + langRec := GetLangRecFromCultureCode(cultureCode); + + // check to see if correct rec was found + if SameText(langRec.cultureCode, cultureCode) then + exit(langRec.lcid); + + // not in list, so return zero + result := 0; +end; + +// source: https://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code +function IsRightToLeftLanguage(aLangID: UInt32): Boolean; +begin + result := '|ar|arc|dv|ha|he|khw|ks|ku|ps|ur|yi|'.Contains('|' + GetLanguageCodeFromLangId(aLangID) + '|'); +end; + +end. diff --git a/DKL_ResFile.pas b/Src/DKL_ResFile.pas similarity index 84% rename from DKL_ResFile.pas rename to Src/DKL_ResFile.pas index 5e615ff..6d00967 100644 --- a/DKL_ResFile.pas +++ b/Src/DKL_ResFile.pas @@ -1,8 +1,8 @@ ///********************************************************************************************************************* -/// $Id: DKL_ResFile.pas,v 1.4 2006-08-11 06:16:56 dale Exp $ +/// $Id: DKL_ResFile.pas 2013-12-06 00:00:00Z bjm $ ///--------------------------------------------------------------------------------------------------------------------- /// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org +/// Copyright 2002-2013 DK Software, http://www.dk-soft.org ///********************************************************************************************************************* /// /// The contents of this package are subject to the Mozilla Public License @@ -20,16 +20,33 @@ /// /// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ /// +/// Upgraded to Delphi 2009 by Bruce J. Miller, rules-of-thumb.com Dec 2008 +/// +/// Upgraded to Delphi XE5 (for FireMonkey) by Bruce J. Miller, rules-of-thumb.com Nov 2013 +/// ///********************************************************************************************************************** // Routines and classes to handle .res resource files. // WARNING: TDKLang_ResFile only handles 32-bit resource files and does not support 16-bit ones! // +// +// NextGen (mobile FireMonkey, for now) defaults to zero-based indexing of strings +// and this keeps the code simpler, at least until Delphi moves completely to +// zero-based string indexing + + unit DKL_ResFile; interface -uses Windows, SysUtils, Classes, Contnrs, TntClasses; +uses + {$IFDEF MSWINDOWS} + Winapi.Windows, + {$ENDIF} + SysUtils, Classes, System.Generics.Collections; type + {$IFNDEF MSWINDOWS} + LANGID = UInt32; + {$ENDIF} //=================================================================================================================== // Resource entry header @@ -59,11 +76,12 @@ interface //=================================================================================================================== TDKLang_ResEntry = class; + TDKLang_ResEntries = TObjectList; TDKLang_ResFile = class(TObject) private // Entry list - FEntries: TObjectList; + FEntries: TDKLang_ResEntries; // Loads .res file contents from the stream procedure LoadFromStream(Stream: TStream); // Saves .res file contents into the stream @@ -82,11 +100,11 @@ TDKLang_ResFile = class(TObject) // Clears the entry list procedure ClearEntries; // Loads .res file contents from the file - procedure LoadFromFile(const wsFileName: WideString); + procedure LoadFromFile(const wsFileName: UnicodeString); // Saves .res file contents into the file - procedure SaveToFile(const wsFileName: WideString); + procedure SaveToFile(const wsFileName: UnicodeString); // Tries to find an entry by its type and name. Returns nil if not found - function FindEntry(const wsType, wsName: WideString): TDKLang_ResEntry; + function FindEntry(const wsType, wsName: UnicodeString): TDKLang_ResEntry; // Props // -- Entry count property EntryCount: Integer read GetEntryCount; @@ -105,9 +123,9 @@ TDKLang_ResEntry = class(TObject) FDataVersion: Cardinal; FLanguage: LANGID; FMemoryFlags: Word; - FName: WideString; - FRawData: String; - FResType: WideString; + FName: UnicodeString; + FRawData: TBytes; + FResType: UnicodeString; FVersion: Cardinal; public // Stores resource entry into the stream @@ -124,17 +142,16 @@ TDKLang_ResEntry = class(TObject) // -- Memory flags property MemoryFlags: Word read FMemoryFlags write FMemoryFlags; // -- Entry name - property Name: WideString read FName write FName; + property Name: UnicodeString read FName write FName; // -- Raw (unparsed) entry data - property RawData: String read FRawData write FRawData; + property RawData: TBytes read FRawData write FRawData; // -- Entry resource type - property ResType: WideString read FResType write FResType; + property ResType: UnicodeString read FResType write FResType; // -- Version property Version: Cardinal read FVersion write FVersion; end; -implementation //======================================================================================================= -uses TntDialogs; +implementation //=================================================================================================================== // TDKLang_ResFile @@ -153,7 +170,7 @@ implementation //=============================================================== constructor TDKLang_ResFile.Create; begin inherited Create; - FEntries := TObjectList.Create(True); + FEntries := TDKLang_ResEntries.Create; end; procedure TDKLang_ResFile.DeleteEntry(Index: Integer); @@ -167,12 +184,12 @@ implementation //=============================================================== inherited Destroy; end; - function TDKLang_ResFile.FindEntry(const wsType, wsName: WideString): TDKLang_ResEntry; + function TDKLang_ResFile.FindEntry(const wsType, wsName: UnicodeString): TDKLang_ResEntry; var i: Integer; begin for i := 0 to EntryCount-1 do begin Result := Entries[i]; - if WideSameText(Result.ResType, wsType) and WideSameText(Result.Name, wsName) then Exit; + if SameText(Result.ResType, wsType) and SameText(Result.Name, wsName) then Exit; end; Result := nil; end; @@ -187,10 +204,10 @@ implementation //=============================================================== Result := FEntries.Count; end; - procedure TDKLang_ResFile.LoadFromFile(const wsFileName: WideString); + procedure TDKLang_ResFile.LoadFromFile(const wsFileName: UnicodeString); var Stream: TStream; begin - Stream := TTntFileStream.Create(wsFileName, fmOpenRead or fmShareDenyWrite); + Stream := TFileStream.Create(wsFileName, fmOpenRead or fmShareDenyWrite); try LoadFromStream(Stream); finally @@ -205,16 +222,16 @@ implementation //=============================================================== Header: TResResourceEntryHeader; // Retrieves a string or numeric identifier from the data and shifts the pointer appropriately - function RetrieveIdentifier(var p: PByte): WideString; + function RetrieveIdentifier(var p: PByte): UnicodeString; begin // Numeric ID if PWord(p)^=$ffff then begin Inc(p, SizeOf(Word)); Result := IntToStr(PWord(p)^); Inc(p, SizeOf(Word)) - // A wide string name + // A string name end else begin - Result := WideString(PWideChar(p)); + Result := UnicodeString(PWideChar(p)); Inc(p, (Length(Result)+1)*SizeOf(WideChar)); end; end; @@ -223,10 +240,10 @@ implementation //=============================================================== procedure ProcessResourceEntry; var p: PByte; - wsName, wsType: WideString; + sRawData: TBytes; + wsName, wsType: UnicodeString; EntryProps: TResResourceEntryProps; Entry: TDKLang_ResEntry; - sRawData: String; begin p := pData; // Skip the header @@ -250,8 +267,14 @@ implementation //=============================================================== Entry.Language := EntryProps.wLanguage; Entry.Version := EntryProps.cVersion; Entry.Characteristics := EntryProps.cCharacteristics; - SetString(sRawData, PChar(Integer(pData)+Header.iHeaderSize), Header.iDataSize); + + p := pData; + Inc(p,Header.iHeaderSize); + SetLength(sRawData,Header.iDataSize); + Move(p^, sRawData[0], Header.iDataSize); + Entry.RawData := sRawData; + // Register the entry in the list AddEntry(Entry); except @@ -293,10 +316,10 @@ implementation //=============================================================== Result := FEntries.Remove(Item); end; - procedure TDKLang_ResFile.SaveToFile(const wsFileName: WideString); + procedure TDKLang_ResFile.SaveToFile(const wsFileName: UnicodeString); var Stream: TStream; begin - Stream := TTntFileStream.Create(wsFileName, fmCreate); + Stream := TFileStream.Create(wsFileName, fmCreate); try SaveToStream(Stream); finally @@ -351,13 +374,13 @@ implementation //=============================================================== Props: TResResourceEntryProps; // Writes a numeric or string identifier into the stream - procedure WriteIdentifier(const wsID: WideString; Stream: TStream); + procedure WriteIdentifier(const wsID: UnicodeString; Stream: TStream); var iNumericID: Integer; w: Word; begin iNumericID := StrToIntDef(wsID, -1); - // String ID + // string ID if iNumericID<0 then Stream.WriteBuffer(wsID[1], (Length(wsID)+1)*SizeOf(WideChar)) // Numeric ID @@ -396,14 +419,15 @@ implementation //=============================================================== // Write properties msHeaderBlock.WriteBuffer(Props, SizeOf(Props)); // Fill header record - Header.iDataSize := ((Length(FRawData)+3) div 4)*4; + Header.iDataSize := ((Length(RawData)+3) div 4)*4; Header.iHeaderSize := msHeaderBlock.Size+SizeOf(Header); // Put the header record Stream.WriteBuffer(Header, SizeOf(Header)); // Put the header block Stream.CopyFrom(msHeaderBlock, 0); // Put entry data - Stream.WriteBuffer(RawData[1], Length(RawData)); + if (Length(RawData) > 0) then // 2024.12.24 bjm: empty RawData throws Range Check error in later compilers + Stream.WriteBuffer(RawData[0], Length(RawData)); // Align the stream pointer AlignStream4(Stream); finally diff --git a/Src/DKL_StorageEditor.dfm b/Src/DKL_StorageEditor.dfm new file mode 100644 index 0000000..69d246d --- /dev/null +++ b/Src/DKL_StorageEditor.dfm @@ -0,0 +1,128 @@ +object DKLangTranslationStorageEditor: TDKLangTranslationStorageEditor + Left = 0 + Top = 0 + Caption = 'DKLang Translation Storage' + ClientHeight = 187 + ClientWidth = 546 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnClose = FormClose + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object GroupBox1: TGroupBox + Left = 0 + Top = 0 + Width = 546 + Height = 187 + Align = alClient + Caption = 'Stored Translations' + TabOrder = 0 + DesignSize = ( + 546 + 187) + object ListView: TListView + Left = 2 + Top = 15 + Width = 420 + Height = 170 + Align = alLeft + Anchors = [akLeft, akTop, akRight, akBottom] + Columns = < + item + AutoSize = True + Caption = 'Language' + MinWidth = 100 + end + item + AutoSize = True + Caption = 'Filename' + MinWidth = 80 + end + item + Alignment = taRightJustify + Caption = 'File Size' + MinWidth = 50 + end + item + Alignment = taRightJustify + Caption = 'Stored Size' + MinWidth = 50 + end + item + Caption = 'Import Date' + Width = 80 + end + item + Caption = 'Full Path' + Width = 200 + end> + HideSelection = False + MultiSelect = True + ReadOnly = True + RowSelect = True + PopupMenu = PopupMenu + TabOrder = 0 + ViewStyle = vsReport + OnSelectItem = ListViewSelectItem + end + object AddBtn: TButton + Left = 423 + Top = 11 + Width = 120 + Height = 23 + Hint = + '|Uploads new file onto form and add it to the FileStorage.Files ' + + 'list.' + Anchors = [akTop, akRight] + Caption = '&Add translation(s)...' + TabOrder = 1 + OnClick = AddBtnClick + end + object DeleteBtn: TButton + Left = 423 + Top = 35 + Width = 120 + Height = 23 + Hint = '|Deletes selected file from the FileStorage.Files list.' + Anchors = [akTop, akRight] + Caption = '&Delete translation(s)' + Enabled = False + TabOrder = 2 + OnClick = DeleteBtnClick + end + object UpdateBtn: TButton + Left = 423 + Top = 59 + Width = 120 + Height = 23 + Hint = '|Updates selected file from the FileStorage.Files list.' + Anchors = [akTop, akRight] + Caption = 'Update translation(s)' + Enabled = False + TabOrder = 3 + OnClick = UpdateBtnClick + end + end + object OpenDialog: TOpenDialog + Filter = 'Translations (*.lng)|*.lng|Any File (*.*)|*.*' + Options = [ofHideReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist] + Title = 'Please point file to upload in Storage' + Left = 8 + Top = 100 + end + object PopupMenu: TPopupMenu + Left = 64 + Top = 100 + object SelectAll1: TMenuItem + Caption = 'Select &All' + ShortCut = 16449 + OnClick = SelectAll1Click + end + end +end diff --git a/Src/DKL_StorageEditor.pas b/Src/DKL_StorageEditor.pas new file mode 100644 index 0000000..a4aa23d --- /dev/null +++ b/Src/DKL_StorageEditor.pas @@ -0,0 +1,268 @@ +///********************************************************************************************************************* +/// $Id: DKL_StorageEditor.pas 2013-12-06 00:00:00Z bjm $ +///--------------------------------------------------------------------------------------------------------------------- +/// DKLang Localization Package +/// Copyright 2013 Bruce J Miller, Rules of Thumb,inc., http://rules-of-thumb.com/ +///********************************************************************************************************************* +/// +/// The contents of this package are subject to the Mozilla Public License +/// Version 1.1 (the "License"); you may not use this file except in compliance +/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ +/// +/// Alternatively, you may redistribute this library, use and/or modify it under the +/// terms of the GNU Lesser General Public License as published by the Free Software +/// Foundation; either version 2.1 of the License, or (at your option) any later +/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ +/// +/// Software distributed under the License is distributed on an "AS IS" basis, +/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the +/// specific language governing rights and limitations under the License. +/// +///********************************************************************************************************************* +// Designtime editor for language file importing for TDKLTranslationsStorage +// +// Requires Delphi XE5 or higher. +// + +unit DKL_StorageEditor; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls, Vcl.Menus, + DesignIntf, DesignWindows, DKLangStorage; + +type + TDKLangTranslationStorageEditor = class(TDesignWindow) + GroupBox1: TGroupBox; + ListView: TListView; + AddBtn: TButton; + DeleteBtn: TButton; + UpdateBtn: TButton; + OpenDialog: TOpenDialog; + PopupMenu: TPopupMenu; + SelectAll1: TMenuItem; + procedure SelectAll1Click(Sender: TObject); + procedure AddBtnClick(Sender: TObject); + procedure DeleteBtnClick(Sender: TObject); + procedure UpdateBtnClick(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + procedure ListViewSelectItem(Sender: TObject; Item: TListItem; + Selected: Boolean); + private + fDirty: Boolean; + fTranslationsStorage: TDKLTranslationsStorage; + procedure RefreshList; + procedure UpdateButtons; + procedure UpdateStoredFile(storedFile: TStoredFile; const fn: string); + public + property TranslationsStorage:TDKLTranslationsStorage read fTranslationsStorage write fTranslationsStorage; + end; + + procedure ShowDKLangTranslationStorageEditor(Designer: IDesigner; TranslationsStorage: TDKLTranslationsStorage); + +implementation + +uses DKLang, DKL_LanguageCodes; + +{$R *.dfm} + +procedure ShowDKLangTranslationStorageEditor(Designer: IDesigner; TranslationsStorage: TDKLTranslationsStorage); +var + i: Integer; + editor: TDKLangTranslationStorageEditor; +begin + // first look for open editors with same storage component + for i := 0 to Screen.FormCount - 1 do + begin + if Screen.Forms[i] is TDKLangTranslationStorageEditor then + begin + if TDKLangTranslationStorageEditor(Screen.Forms[i]).TranslationsStorage = TranslationsStorage then + begin + Editor := TDKLangTranslationStorageEditor(Screen.Forms[i]); + Editor.Show; + if Editor.WindowState = wsMinimized then + Editor.WindowState := wsNormal; + Exit; + end; + end; + end; + + Editor := TDKLangTranslationStorageEditor.Create(Application); + try + Editor.Designer := Designer; + Editor.TranslationsStorage := TranslationsStorage; + Editor.Show; + except + Editor.Free; + raise; + end; +end; + +procedure TDKLangTranslationStorageEditor.UpdateButtons; +var + enable: Boolean; +begin + AddBtn.Enabled := true; + enable := ListView.Selected <> nil; + DeleteBtn.Enabled := enable; + UpdateBtn.Enabled := enable; +end; + +procedure TDKLangTranslationStorageEditor.RefreshList; +var + li: TListItem; + storedFile: TStoredFile; +begin + ListView.Items.Clear; + + for storedFile in fTranslationsStorage.Translations do + begin + li := ListView.Items.Add; + li.Caption := storedFile.Description; + li.SubItems.Add(ExtractFileName(storedFile.FileName)); + li.SubItems.Add(IntToStr(storedFile.FileSize)); + li.SubItems.Add(IntToStr(storedFile.StoredSize)); + li.SubItems.Add(storedFile.ImportDate); + li.SubItems.Add(storedFile.FileName); + li.Data := storedFile; + end; + + UpdateButtons; +end; + +procedure TDKLangTranslationStorageEditor.UpdateStoredFile(storedFile: TStoredFile; const fn: string); +var + stream: TFileStream; + dt: TDateTime; + Tran: TDKLang_CompTranslations; + wLangID: LANGID; + description: string; +begin + FileAge(fn,dt); + + Tran := TDKLang_CompTranslations.Create; + try + Tran.Text_LoadFromFile(fn, True); + // Try to obtain LangID parameter + wLangID := StrToIntDef(Tran.Params.Values[SDKLang_TranParam_LangID], 0); + description := Format('%d %s',[wLangID,GetLanguageNameFromLANGID(wLangID)]); + finally + Tran.Free; + end; + + stream := TFileStream.Create(fn,fmOpenRead); + try + StoredFile.Import(stream,fn,description,dt); + finally + stream.Free; + end; + + fDirty := true; +end; + +procedure TDKLangTranslationStorageEditor.AddBtnClick(Sender: TObject); +var + i: Integer; + storedFile: TStoredFile; +begin + if OpenDialog.Execute then + begin + for i:=0 to OpenDialog.Files.Count-1 do + begin + storedFile := TStoredFile.Create; + try + UpdateStoredFile(storedFile,OpenDialog.Files[i]); + fTranslationsStorage.Translations.Add(StoredFile); + except + storedFile.Free; + raise; + end; + end; + RefreshList; + fDirty := true; + end; +end; + +procedure TDKLangTranslationStorageEditor.UpdateBtnClick(Sender: TObject); +var + i: Integer; + fn,oldInitialDir: string; + storedFile: TStoredFile; +begin + for i:=0 to ListView.Items.Count-1 do + begin + if ListView.Items[i].Selected then + begin + storedFile := TStoredFile(ListView.Items[i].Data); + try + fn := storedFile.Filename; + if not FileExists(fn) then + begin + oldInitialDir := OpenDialog.InitialDir; + try + OpenDialog.FileName := ExtractFileName(fn); + if DirectoryExists(ExtractFilePath(fn)) then + OpenDialog.InitialDir := ExtractFilePath(fn); + if OpenDialog.Execute then + fn := OpenDialog.FileName; + finally + OpenDialog.FileName := ''; + OpenDialog.InitialDir := oldInitialDir; + end; + end; + if FileExists(fn) then + UpdateStoredFile(storedFile,fn); + except + fTranslationsStorage.Translations.Remove(storedFile); + raise; + end; + end; + end; + + RefreshList; +end; + +procedure TDKLangTranslationStorageEditor.DeleteBtnClick(Sender: TObject); +var + i: Integer; +begin + for i:=0 to ListView.Items.Count-1 do + if ListView.Items[i].Selected then + begin + fTranslationsStorage.Translations.Remove(TStoredFile(ListView.Items[I].Data)); + fDirty := true; + end; + RefreshList; +end; + +procedure TDKLangTranslationStorageEditor.FormClose(Sender: TObject; + var Action: TCloseAction); +begin + if fDirty then + Designer.Modified; + Action := caFree; +end; + +procedure TDKLangTranslationStorageEditor.FormShow(Sender: TObject); +begin + RefreshList; +end; + +procedure TDKLangTranslationStorageEditor.ListViewSelectItem(Sender: TObject; + Item: TListItem; Selected: Boolean); +begin + UpdateButtons; +end; + +procedure TDKLangTranslationStorageEditor.SelectAll1Click(Sender: TObject); +var + i: Integer; +begin + for i:=0 to ListView.Items.Count-1 do + ListView.Items[i].Selected := true; +end; + +end. diff --git a/Src/DKLang.pas b/Src/DKLang.pas new file mode 100644 index 0000000..42751a5 Binary files /dev/null and b/Src/DKLang.pas differ diff --git a/Src/DKLangReg.dcr b/Src/DKLangReg.dcr new file mode 100644 index 0000000..5bc99c0 Binary files /dev/null and b/Src/DKLangReg.dcr differ diff --git a/Src/DKLangReg.pas b/Src/DKLangReg.pas new file mode 100644 index 0000000..196333d --- /dev/null +++ b/Src/DKLangReg.pas @@ -0,0 +1,123 @@ +///********************************************************************************************************************* +/// $Id: DKLangReg.pas 2013-12-06 00:00:00Z bjm Exp $ +///--------------------------------------------------------------------------------------------------------------------- +/// DKLang Localization Package +/// Copyright 2002-2013 DK Software, http://www.dk-soft.org +///********************************************************************************************************************* +/// +/// The contents of this package are subject to the Mozilla Public License +/// Version 1.1 (the "License"); you may not use this file except in compliance +/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ +/// +/// Alternatively, you may redistribute this library, use and/or modify it under the +/// terms of the GNU Lesser General Public License as published by the Free Software +/// Foundation; either version 2.1 of the License, or (at your option) any later +/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ +/// +/// Software distributed under the License is distributed on an "AS IS" basis, +/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the +/// specific language governing rights and limitations under the License. +/// +/// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ +/// +/// Upgraded to Delphi 2009 by Bruce J. Miller, rules-of-thumb.com Dec 2008 +/// +/// Upgraded to Delphi XE5 (for FireMonkey) by Bruce J. Miller, rules-of-thumb.com Nov 2013 +/// +///********************************************************************************************************************** +// Component, expert and component editor registration routines +// +// +// NextGen (mobile FireMonkey, for now) defaults to zero-based indexing of strings +// and this keeps the code simpler, at least until Delphi moves completely to +// zero-based string indexing + + +unit DKLangReg; + +interface + +uses + DesignEditors,DesignIntf; + +type + TDKLTranslationsStorageProperty = class(TPropertyEditor) + public + procedure Edit; override; + function GetValue: String; override; + function GetAttributes: TPropertyAttributes; override; + end; + + TDKLTranslationsStorageCompEditor = class(TComponentEditor) + procedure ExecuteVerb(Index: Integer); override; + function GetVerbCount: Integer; override; + function GetVerb(Index: Integer): string; override; + end; + + procedure Register; + +implementation +{$R *.dcr} +uses Classes, ToolsAPI, DKLang, DKLangStorage, DKL_Expt, DKL_StorageEditor; + + //==================================================================================================================== + // Component registration + //==================================================================================================================== + + procedure Register; + begin + // Register components + RegisterComponents('DKLang', [TDKLanguageController,TDKLTranslationsStorage]); + + // Register expert and editor + RegisterPackageWizard(DKLang_CreateExpert); + RegisterComponentEditor(TDKLanguageController, TDKLangControllerEditor); + + // Register storage editor + RegisterComponentEditor(TDKLTranslationsStorage, TDKLTranslationsStorageCompEditor); + RegisterPropertyEditor(TypeInfo(TTranslationFiles), TDKLTranslationsStorage, 'Translations', TDKLTranslationsStorageProperty); + + end; + +procedure TDKLTranslationsStorageProperty.Edit; +begin + ShowDKLangTranslationStorageEditor(Designer, TDKLTranslationsStorage(GetComponent(0))); +end; + +function TDKLTranslationsStorageProperty.GetValue: String; +begin + if TDKLTranslationsStorage(GetComponent(0)).Translations.Count = 0 then + Result := '(None)' + else + Result := '(Stored Translations)'; +end; + +function TDKLTranslationsStorageProperty.GetAttributes: TPropertyAttributes; +begin + result := [paDialog]; +end; + + +procedure TDKLTranslationsStorageCompEditor.ExecuteVerb(Index: Integer); +begin + if Index = GetVerbCount - 1 then + ShowDKLangTranslationStorageEditor(Designer, TDKLTranslationsStorage(Component)) + else + inherited ExecuteVerb(Index); +end; + +function TDKLTranslationsStorageCompEditor.GetVerbCount: Integer; +begin + result := inherited GetVerbCount + 1; +end; + +function TDKLTranslationsStorageCompEditor.GetVerb(Index: Integer): string; +begin + if Index = GetVerbCount - 1 then + result := 'Language Files Importer...' + else + result := inherited GetVerb(Index); +end; + + +end. diff --git a/Src/DKLangStorage.pas b/Src/DKLangStorage.pas new file mode 100644 index 0000000..5780bdf --- /dev/null +++ b/Src/DKLangStorage.pas @@ -0,0 +1,328 @@ +///********************************************************************************************************************* +/// $Id: DKLangStorage.pas 2013-12-06 00:00:00Z bjm $ +///--------------------------------------------------------------------------------------------------------------------- +/// DKLang Localization Package +/// Copyright 2013 Bruce J Miller, Rules of Thumb,inc., http://rules-of-thumb.com/ +///********************************************************************************************************************* +/// +/// The contents of this package are subject to the Mozilla Public License +/// Version 1.1 (the "License"); you may not use this file except in compliance +/// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ +/// +/// Alternatively, you may redistribute this library, use and/or modify it under the +/// terms of the GNU Lesser General Public License as published by the Free Software +/// Foundation; either version 2.1 of the License, or (at your option) any later +/// version. You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/ +/// +/// Software distributed under the License is distributed on an "AS IS" basis, +/// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the +/// specific language governing rights and limitations under the License. +/// +///********************************************************************************************************************* +// +// Translations stored in zlib on form +// + +unit DKLangStorage; + +interface + +uses + System.Classes, System.Generics.Collections; + +type + +// TStoredFile persists the contents of any file through Delphi's component persistence +// It is content agnostic. +// File contents are stored zlib compressed in a TMemoryStream +// File contents can be released by calling Clear + + TStoredFile = class + strict private + fFileName: string; // now in the form: c:\dir\filename.ext|2011.07.23 + fFileDate: string; + fFileDescription: string; + fFileSize: Int32; + fData: TMemoryStream; + function GetStoredSize: Int32; + private + procedure Clear; + function Extract(stream: TStream): Boolean; overload;// True if successfull + procedure ReadData(stream: TStream); + procedure WriteData(stream: TStream); + public + constructor Create; + destructor Destroy; override; + function Import(stream: TStream; const aFileName: String; const aDescription: string; aDateStamp: TDateTime): Boolean; // True if successfull + property FileName: string read fFileName; + property ImportDate: string read fFileDate; + property Description: string read fFileDescription; + property FileSize: Int32 read fFileSize; + property StoredSize: Int32 read GetStoredSize; + end; + + TTranslationFiles = class(TObjectList); + +{$IFDEF CONDITIONALEXPRESSIONS} +{$IF CompilerVersion >= 29.0} // XE8 up + [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32 or pidiOSSimulator or pidiOSDevice32 or pidiOSDevice64 or pidAndroid)] +{$ELSE} +{$IF CompilerVersion >= 25.0} // XE4 up + [ComponentPlatformsAttribute(pidWin32 or pidWin64 or pidOSX32 or pidiOSSimulator or pidiOSDevice or pidAndroid)] +{$IFEND} +{$IFEND} +{$ENDIF} + TDKLTranslationsStorage = class(TComponent) + private + fFiles: TTranslationFiles; + fReleaseMemoryOnTranslationRegistration: Boolean; + function GetCount: Integer; + function GetFileSize: Integer; + function GetStoredSize: Integer; + procedure ReadData(Stream: TStream); + procedure WriteData(Stream: TStream); + protected + procedure Loaded; override; + procedure DefineProperties(Filer: TFiler); override; + public + constructor Create(aOwner: TComponent); override; + destructor Destroy; override; + published + property Count: Integer read GetCount stored false; + property FileSize: Integer read GetFileSize stored false; + property StoredSize: Integer read GetStoredSize stored false; + property Translations: TTranslationFiles read fFiles write fFiles stored false; + property ReleaseMemoryOnTranslationRegistration: Boolean read fReleaseMemoryOnTranslationRegistration write fReleaseMemoryOnTranslationRegistration stored true default false; + end; + + + +implementation + +uses + System.SysUtils, System.ZLib, DKLang; + + // stream utilities + + procedure StreamWriteUnicodeStr(Stream: TStream; const ws: UnicodeString); + var + w: Word; + c: TCharArray; + begin + w := Length(ws); + c := ws.ToCharArray; + Stream.WriteBuffer(w, 2); + Stream.WriteBuffer(c[0], w*2); + end; + + function StreamReadUnicodeStr(Stream: TStream): UnicodeString; + var + w: Word; + b: TBytes; + begin + Stream.ReadBuffer(w, 2); + SetLength(b,w*2); + Stream.ReadBuffer(b[0],w*2); + result := TEncoding.Unicode.GetString(b); + end; + + +constructor TStoredFile.Create; +begin + inherited; + + fFileName := ''; + fFileDate := ''; + fFileSize := 0; + fData := TMemoryStream.Create; +end; + +destructor TStoredFile.Destroy; +begin + if fData <> nil then + fData.Free; + + inherited; +end; + +function TStoredFile.GetStoredSize: Int32; +begin + result := fData.Size; +end; + +procedure TStoredFile.Clear; +begin + FreeAndNil(fData); +end; + +procedure TStoredFile.ReadData(stream: TStream); +var + n: Int32; +begin + fFileName := StreamReadUnicodeStr(Stream); + fFileDate := StreamReadUnicodeStr(Stream); + fFileDescription := StreamReadUnicodeStr(Stream); + + // read the original file size + stream.Read(fFileSize, SizeOf(fFileSize)); + + // read the data + Stream.Read(n, Sizeof(n)); + fData.CopyFrom(stream,n); +end; + +procedure TStoredFile.WriteData(Stream: TStream); +var + n: Int32; +begin + StreamWriteUnicodeStr(Stream, fFileName); + StreamWriteUnicodeStr(Stream, fFileDate); + StreamWriteUnicodeStr(Stream, fFileDescription); + + // store the original file size + stream.Write(fFileSize, SizeOf(fFileSize)); + + // store the data + n := fData.Size; + stream.Write(n, SizeOf(n)); + fData.Position := 0; + stream.CopyFrom(fData,n); +end; + +function TStoredFile.Import(stream: TStream; const aFileName: String; const aDescription: string; aDateStamp: TDateTime): Boolean; // True if successfull +var + ZLibStream: TCompressionStream; + len: Int32; +begin + DateTimeToString(fFileDate,'yyyy-mm-dd hh:nn:ss',aDateStamp); + fFileName := aFileName; + fFileDescription := aDescription; + + fFileSize := 0; + len := stream.Size; + fData.Clear; + ZLibStream := TCompressionStream.Create(fData); + try + ZLibStream.CopyFrom(stream, len); + fFileSize := len; + result := true; + finally + ZLibStream.Free; + end; +end; + +function TStoredFile.Extract(stream: TStream): Boolean; +var + ZLibStream: TDecompressionStream; +begin + fData.Position := 0; + ZLibStream := TDecompressionStream.Create(fData); + try + stream.CopyFrom(ZLibStream,fFileSize); + result := true; + finally + ZLibStream.Free; + end; +end; + + + +constructor TDKLTranslationsStorage.Create(aOwner: TComponent); +begin + inherited; + + fFiles := TTranslationFiles.Create; +end; + +destructor TDKLTranslationsStorage.Destroy; +begin + fFiles.Free; + + inherited; +end; + +procedure TDKLTranslationsStorage.Loaded; +var + storedFile: TStoredFile; + stream: TMemoryStream; +begin + inherited; + + if DKLang_IsDesignTime then exit; + + for storedFile in fFiles do + begin + stream := TMemoryStream.Create; + try + storedFile.Extract(stream); + stream.Position := 0; + // add to LangManager + TDKLanguageManager.RegisterLangStream(stream); + if fReleaseMemoryOnTranslationRegistration then + storedFile.Clear; + finally + stream.Free; + end; + end; +end; + +function TDKLTranslationsStorage.GetCount: Integer; +begin + result := fFiles.Count; +end; + +function TDKLTranslationsStorage.GetFileSize: Integer; +var + storedFile: TStoredFile; +begin + result := 0; + for storedFile in fFiles do + Inc(result,storedFile.FileSize); +end; + +function TDKLTranslationsStorage.GetStoredSize: Integer; +var + storedFile: TStoredFile; +begin + result := 0; + for storedFile in fFiles do + Inc(result,storedFile.StoredSize); +end; + +procedure TDKLTranslationsStorage.ReadData(Stream: TStream); +var + i,n: Int32; + storedFile: TStoredFile; +begin + Stream.Read(n, SizeOf(n)); + + if n <> 0 then + for i := 0 to n - 1 do + begin + storedFile := TStoredFile.Create; + storedFile.ReadData(Stream); + fFiles.Add(storedFile); + end; +end; + +procedure TDKLTranslationsStorage.WriteData(Stream: TStream); +var + n: Int32; + storedFile: TStoredFile; +begin + // write data + n := fFiles.Count; + Stream.Write(n, SizeOf(n)); + for storedFile in fFiles do + storedFile.WriteData(Stream); +end; + +procedure TDKLTranslationsStorage.DefineProperties(Filer: TFiler); +begin + inherited; + Filer.DefineBinaryProperty('StoredTranslationFiles', ReadData, WriteData, fFiles.Count <> 0); +end; + + + +end. diff --git a/_cleanup_.bat b/_cleanup_.bat deleted file mode 100644 index 5fb330a..0000000 --- a/_cleanup_.bat +++ /dev/null @@ -1,5 +0,0 @@ -cd "C:\Delphi\CVS projects\dale\DKLang" -del /s /q *.~* *.dcu *.ddp *.log *.bak *.tmp *.identcache *.bdsproj.local Entries.Old Entries.Extra.Old 1>nul 2>nul -del /s /q Packages\*.dsk Packages\*.dof Packages\*.cfg 1>nul 2>nul -rmdir /s /q Packages\__history 1>nul 2>nul -rmdir /s /q Packages\ModelSupport 1>nul 2>nul \ No newline at end of file diff --git a/_make_.bat b/_make_.bat deleted file mode 100644 index ebe7a6b..0000000 --- a/_make_.bat +++ /dev/null @@ -1,58 +0,0 @@ -@echo off -rem ******************************************************************************************************************** -rem $Id: _make_.bat,v 1.4 2006-08-22 13:17:35 dale Exp $ -rem -------------------------------------------------------------------------------------------------------------------- -rem DKLang Localization Package -rem Copyright 2002-2006 DK Software, http://www.dk-soft.org/ -rem ******************************************************************************************************************** -rem ** Making bundle of the package files - -rem -------------------------------------------------------------------------------------------------------------------- -rem Variable declaration -rem -------------------------------------------------------------------------------------------------------------------- - -set VERSION=3.01 - -set BASE_DIR=C:\Delphi\CVS projects\dale\DKLang -set INSTALL_DIR=%BASE_DIR%\Install -set HELP_DIR=%BASE_DIR%\Help - -set ARCHIVE_FILE=%INSTALL_DIR%\dklang-package-%VERSION%.zip -set CHM_FILE=dklang.chm - -set HELP_COMPILER=C:\Program Files\HTML Help Workshop\hhc.exe -set CHM_API_MAKER=%HELP_DIR%\ChmDoc.pl -set CHM_API_FILE_PREFIX=__chmdoc__ -set ARCHIVER=C:\Progra~1\WinRAR\winrar.exe -set CLEANER=%BASE_DIR%\_cleanup_.bat - -rem -------------------------------------------------------------------------------------------------------------------- -rem Let's start here -rem -------------------------------------------------------------------------------------------------------------------- - -echo [1] Removing old files... -if exist "%ARCHIVE_FILE%" del "%ARCHIVE_FILE%" -if exist "%BASE_DIR%\%CHM_FILE%" del "%BASE_DIR%\%CHM_FILE%" - -echo [2] Generating and compiling CHM docs... -cd "%HELP_DIR%" -"%CHM_API_MAKER%" -if errorlevel 1 goto err -move "%HELP_DIR%\%CHM_FILE%" "%BASE_DIR%\" -if errorlevel 1 goto err - -echo [3] Cleaning up... -call "%CLEANER%" - -echo [4] Archiving the files... -cd "%INSTALL_DIR%" -rem -m5 = compression best -rem -afzip = create zip archive -start /w %ARCHIVER% a -m5 -afzip "%ARCHIVE_FILE%" @include_list.txt -x@exclude_list.txt >nul -if errorlevel 1 goto err - -goto ok - -:err -pause -:ok \ No newline at end of file diff --git a/Resources/DKLang Icon.pspimage b/resources/Images/DKLang Icon.pspimage old mode 100755 new mode 100644 similarity index 100% rename from Resources/DKLang Icon.pspimage rename to resources/Images/DKLang Icon.pspimage diff --git a/resources/Images/TDKLTranslationsStorage.bmp b/resources/Images/TDKLTranslationsStorage.bmp new file mode 100644 index 0000000..c8d9f32 Binary files /dev/null and b/resources/Images/TDKLTranslationsStorage.bmp differ diff --git a/resources/Images/TDKLangMenuIcon.bmp b/resources/Images/TDKLangMenuIcon.bmp new file mode 100644 index 0000000..24ea0df Binary files /dev/null and b/resources/Images/TDKLangMenuIcon.bmp differ diff --git a/resources/Images/TDKLanguageController.bmp b/resources/Images/TDKLanguageController.bmp new file mode 100644 index 0000000..ca7537b Binary files /dev/null and b/resources/Images/TDKLanguageController.bmp differ diff --git a/resources/Images/dklang-icon.svg b/resources/Images/dklang-icon.svg new file mode 100644 index 0000000..45eec59 --- /dev/null +++ b/resources/Images/dklang-icon.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/resources/LanguageCodes/Build_DKL_LanguageCodes.dpr b/resources/LanguageCodes/Build_DKL_LanguageCodes.dpr new file mode 100644 index 0000000..c716a92 --- /dev/null +++ b/resources/LanguageCodes/Build_DKL_LanguageCodes.dpr @@ -0,0 +1,126 @@ +program Build_DKL_LanguageCodes; + +{$APPTYPE CONSOLE} + +{$R *.res} + +uses + madExcept, + madLinkDisAsm, + madListHardware, + madListProcesses, + madListModules, + System.SysUtils, + System.Classes, + WinApi.Windows; + +const + sUnitName = 'DKL_LanguageCodes'; + +var + s,sUnit: string; + slFile,row,list: TStringList; + + procedure Insert(const key: string; const newValue: string); + begin + sUnit := StringReplace(sUnit,key,newValue,[rfReplaceAll,rfIgnoreCase]); + end; + + function xHexToIntStr(const hex: string): string; + begin + result := Format('%5d',[StrToInt('$' + Copy(hex,3,Length(hex)))]); + end; + + function EscapeQuoteAndPad(const src: string; targetLen: Integer): string; + var + len: Integer; + begin + result := '''' + StringReplace(Trim(src),'''','''''',[rfReplaceAll]) + ''''; + len := Length(result); + if len < targetLen then + result := Copy(result + StringOfChar(' ',targetLen),1,targetLen); + end; + +begin + try + slFile := TStringList.Create; + list := TStringList.Create; + row := TStringList.Create; + try + // otherwise will split on spaces + row.Delimiter := Char(9); + row.StrictDelimiter := true; + + slFile.LoadFromFile(sUnitName+'.inc.template', TEncoding.UTF8); + sUnit := slFile.Text; + + Insert('$UNITNAME',sUnitName); + DateTimeToString(s,'yyyy-mm-dd hh:nn:ss',Now); + Insert('$DATETIME',s); + DateTimeToString(s,'yyyy',Now); + Insert('$YEAR',s); + + slFile.LoadFromFile('LangID_ISO_639_1.tab'); + for s in slFile do + begin + row.DelimitedText := s; + if row.Count > 1 then + list.Add(Format(' ''%s'',',[row[1]])); + end; + s := Trim(list.Text); + // remove trailing , + Delete(s,Length(s),1); + Insert('$ISO_639_1_LangCodesIndexedByLANGID_COUNT', IntToStr(list.Count)); + Insert('$ISO_639_1_LangCodesIndexedByLANGID_LIST',s); + + + + // 0 LCID + // 1 culture name + // 2 locale + // 3 language name + // 4 local language name + // 5 ANSI codepage + // 6 OEM codepage + // 7 country/region abbreviation + // 8 language abbreviation + + // lcid: LANGID; + // cultureCode: string; + // cultureName: string + // langName: string; + // nativeLangName: string; + + list.Clear; + slFile.LoadFromFile('MicrosoftNationalLanguageSupportReference.tab', TEncoding.UTF8); + for s in slFile do + begin + row.DelimitedText := s; + if row.Count > 4 then + list.Add(Format(' (lcid:%s; cultureCode:%s;cultureName:%s;langName:%s;nativeLangName:%s),', + [xHexToIntStr(row[0]), + EscapeQuoteAndPad(row[1],12), + EscapeQuoteAndPad(row[2],44), + EscapeQuoteAndPad(row[3],30), + EscapeQuoteAndPad(row[4],0) + ])); + end; + s := Trim(list.Text); + // remove trailing , + Delete(s,Length(s),1); + Insert('$MS_NLS_REF_COUNT', IntToStr(list.Count)); + Insert('$MS_NLS_REF_LIST',s); + + slFile.Text := sUnit; + slFile.SaveToFile('.\..\..\src\' + sUnitName + '.inc',TEncoding.UTF8); + finally + row.Free; + list.Free; + slFile.Free; + end; + + except + on E: Exception do + Writeln(E.ClassName, ': ', E.Message); + end; +end. diff --git a/resources/LanguageCodes/Build_DKL_LanguageCodes.dproj b/resources/LanguageCodes/Build_DKL_LanguageCodes.dproj new file mode 100644 index 0000000..dbc30be --- /dev/null +++ b/resources/LanguageCodes/Build_DKL_LanguageCodes.dproj @@ -0,0 +1,221 @@ + + + {4B3ACA16-C68D-4FD7-B166-6844E4F4D0CA} + 15.2 + None + Build_DKL_LanguageCodes.dpr + True + Debug + Win32 + 1 + Console + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + $(BDS)\bin\default_app.manifest + 1033 + System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + .\$(Platform)\$(Config) + false + false + false + false + false + + + IndyIPClient;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;BeejComponentsXE5;DbxCommonDriver;dbxcds;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;OmniThreadLibraryRuntimeXE5;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;FileStorageBDS_XE5;dklangXE5;FrameViewerXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;ADOX_XE5;RichViewSpellingHunspell_XE5;FireDAC;inet;BeejTmsRvEditLinkXE5;CADSys5_XE5;RESTComponents;dbexpress;$(DCC_UsePackage) + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + + + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + + + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;dklangXE5;bindcompfmx;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDAC;inet;RESTComponents;dbexpress;$(DCC_UsePackage) + + + true + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;FireDACPgDriver;fmx;IndySystem;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;dbxcds;fmxFireDAC;BesenComponents;CustomIPTransport;dsnap;IndyIPServer;fmxase;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;inetdbxpress;dklangXE5;FireDACASADriver;bindcompfmx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;xmlrtl;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindengine;soaprtl;bindcompdbx;FMXTee;FireDACADSDriver;FireDAC;inet;fmxobj;FireDACMySQLDriver;fmxdae;RESTComponents;dbexpress;FireDACMSAccDriver;$(DCC_UsePackage) + + + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + IndyIPClient;JvGlobus;JvMM;tmsdXE5;JvManagedThreads;FireDACSqliteDriver;dd_wdwstateXE5;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;tmswizdXE5;inetdbbde;DBXInterBaseDriver;gtHtmVwExpD17;DataSnapCommon;JvNet;BeejComponentsXE5;JvDotNetCtrls;DbxCommonDriver;tdbf;vclimg;dbxcds;gtAdvGridExpD17;MetropolisUILiveTile;JvXPCtrls;vcldb;vcldsnap;AutoUpgraderProBDS_XE5;fmxFireDAC;BesenComponents;CustomIPTransport;JvCore;vclribbon;dsnap;IndyIPServer;OmniThreadLibraryRuntimeXE5;fmxase;vcl;IndyCore;dclGraphicExXE5;IndyIPCommon;CloudService;CodeSiteExpressPkg;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;FileStorageBDS_XE5;JclDeveloperTools;dklangXE5;FrameViewerXE5;JvDocking;adortl;JvWizards;madBasic_;gtRichVwExpD17;FireDACASADriver;JvHMI;bindcompfmx;JvBands;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;MapWindowXE5;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;madDisAsm_;JvSystem;xmlrtl;svnui;JvTimeFramework;JvControls;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;tmsxlsdXE5;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;ADOX_XE5;FireDACADSDriver;vcltouch;RichViewSpellingHunspell_XE5;madExcept_;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;BeejTmsRvEditLinkXE5;vclx;svn;tmsexdXE5;CADSys5_XE5;fmxdae;RESTComponents;bdertl;VirtualTreesR;dbexpress;FireDACMSAccDriver;JvBDE;$(DCC_UsePackage) + + + true + IndyIPClient;FireDACSqliteDriver;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;IndySystem;TeeDB;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;tdbf;vclimg;dbxcds;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;BesenComponents;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;inetdbxpress;webdsnap;dklangXE5;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;Tee;vclFireDAC;xmlrtl;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindengine;vclactnband;soaprtl;bindcompdbx;FMXTee;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;VclSmp;FireDAC;VCLRESTComponents;gtDocEngD19;dsnapcon;inet;fmxobj;FireDACMySQLDriver;vclx;fmxdae;RESTComponents;VirtualTreesR;dbexpress;FireDACMSAccDriver;$(DCC_UsePackage) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + madExcept;$(DCC_Define) + true + 3 + None + 1033 + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + Delphi.Personality.12 + + + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1033 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + Build_DKL_LanguageCodes.dpr + + + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero BDE DB Components + + + + + False + False + False + False + True + False + + + 12 + + + + diff --git a/MapMaker/DLL/dklmapmk.dpr b/resources/LanguageCodes/DKL_LanguageCodes.inc.template similarity index 73% rename from MapMaker/DLL/dklmapmk.dpr rename to resources/LanguageCodes/DKL_LanguageCodes.inc.template index 5a85372..3912c65 100644 --- a/MapMaker/DLL/dklmapmk.dpr +++ b/resources/LanguageCodes/DKL_LanguageCodes.inc.template @@ -1,8 +1,8 @@ ///********************************************************************************************************************* -/// $Id: dklmapmk.dpr,v 1.2 2006-06-17 04:19:28 dale Exp $ +/// $Id: $UNITNAME.inc $DATETIME bjm $ ///--------------------------------------------------------------------------------------------------------------------- /// DKLang Localization Package -/// Copyright 2002-2006 DK Software, http://www.dk-soft.org +/// Copyright $YEAR Bruce J Miller, Rules of Thumb,inc., http://rules-of-thumb.com/ ///********************************************************************************************************************* /// /// The contents of this package are subject to the Mozilla Public License @@ -18,19 +18,16 @@ /// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the /// specific language governing rights and limitations under the License. /// -/// The initial developer of the original code is Dmitry Kann, http://www.dk-soft.org/ -/// -///********************************************************************************************************************** -// Resource map maker library +///********************************************************************************************************************* +// +// this unit auto-generated on $DATETIME // -library dklmapmk; -uses - Main in 'Main.pas'; + ISO_639_1_LangCodesIndexedByLANGID: array[1..$ISO_639_1_LangCodesIndexedByLANGID_COUNT] of String = ( + $ISO_639_1_LangCodesIndexedByLANGID_LIST + ); -exports - MakeResMap; + LangRecs: array[0..$MS_NLS_REF_COUNT-1] of TLangRec = ( + $MS_NLS_REF_LIST + ); -begin -end. - \ No newline at end of file diff --git a/resources/LanguageCodes/LangID_ISO_639_1.tab b/resources/LanguageCodes/LangID_ISO_639_1.tab new file mode 100644 index 0000000..a030c41 --- /dev/null +++ b/resources/LanguageCodes/LangID_ISO_639_1.tab @@ -0,0 +1,147 @@ +0x0001 ar +0x0002 bg +0x0003 ca +0x0004 zh +0x0005 cs +0x0006 da +0x0007 de +0x0008 el +0x0009 en +0x000a es +0x000b fi +0x000c fr +0x000d he +0x000e hu +0x000f is +0x0010 it +0x0011 ja +0x0012 ko +0x0013 nl +0x0014 no +0x0015 pl +0x0016 pt +0x0017 rm +0x0018 ro +0x0019 ru +0x001a sr +0x001b sk +0x001c sq +0x001d sv +0x001e th +0x001f tr +0x0020 ur +0x0021 id +0x0022 uk +0x0023 be +0x0024 sl +0x0025 et +0x0026 lv +0x0027 lt +0x0028 tg +0x0029 fa +0x002a vi +0x002b hy +0x002c az +0x002d eu +0x002e dsb +0x002f mk +0x0030 st +0x0031 ts +0x0032 tn +0x0033 ve +0x0034 xh +0x0035 zu +0x0036 af +0x0037 ka +0x0038 fo +0x0039 hi +0x003a mt +0x003b se +0x003c ga +0x003d yi +0x003e ms +0x003f kk +0x0040 ky +0x0041 sw +0x0042 tk +0x0043 uz +0x0044 tt +0x0045 bn +0x0046 pa +0x0047 gu +0x0048 or +0x0049 ta +0x004a te +0x004b kn +0x004c ml +0x004d as +0x004e mr +0x004f sa +0x0050 mn +0x0051 bo +0x0052 cy +0x0053 km +0x0054 lo +0x0055 my +0x0056 gl +0x0057 kok +0x0058 mni +0x0059 sd +0x005a syr +0x005b si +0x005c chr +0x005d iu +0x005e am +0x005f tzm +0x0060 ks +0x0061 ne +0x0062 fy +0x0063 ps +0x0064 fil +0x0065 dv +0x0066 bin +0x0067 ff +0x0068 ha +0x0069 ibb +0x006a yo +0x006b quz +0x006c nso +0x006d ba +0x006e lb +0x006f kl +0x0070 ig +0x0071 kr +0x0072 om +0x0073 ti +0x0074 gn +0x0075 haw +0x0076 la +0x0077 so +0x0078 ii +0x0079 pap +0x007a arn +0x007b +0x007c moh +0x007d +0x007e br +0x007f +0x0080 ug +0x0081 mi +0x0082 oc +0x0083 co +0x0084 gsw +0x0085 sah +0x0086 qut +0x0087 rw +0x0088 wo +0x0089 +0x008a +0x008b +0x008c prs +0x008d +0x008e +0x008f +0x0090 +0x0091 gd +0x0092 ku +0x0093 quc \ No newline at end of file diff --git a/resources/LanguageCodes/LangID_ISO_639_1.tab.info b/resources/LanguageCodes/LangID_ISO_639_1.tab.info new file mode 100644 index 0000000..52b088a --- /dev/null +++ b/resources/LanguageCodes/LangID_ISO_639_1.tab.info @@ -0,0 +1,5 @@ +0 Language ID (hex) +1 Language tag + +title: LCID Structure +source: http://msdn.microsoft.com/en-us/library/cc233968.aspx \ No newline at end of file diff --git a/resources/LanguageCodes/MicrosoftNationalLanguageSupportReference.tab b/resources/LanguageCodes/MicrosoftNationalLanguageSupportReference.tab new file mode 100644 index 0000000..1fc5d6c --- /dev/null +++ b/resources/LanguageCodes/MicrosoftNationalLanguageSupportReference.tab @@ -0,0 +1,273 @@ +0x0036 af Afrikaans Afrikaans Afrikaans 1252 850 ZAF AFK +0x0436 af-ZA Afrikaans (South Africa) Afrikaans Afrikaans (Suid Afrika) 1252 850 ZAF AFK +0x001C sq Albanian Albanian shqipe 1250 852 ALB SQI +0x041C sq-AL Albanian (Albania) Albanian shqipe (Shqipëria) 1250 852 ALB SQI +0x0484 gsw-FR Alsatian (France) Alsatian Elsässisch (Frànkrisch) 1252 850 FRA GSW +0x045E am-ET Amharic (Ethiopia) Amharic አማርኛ (ኢትዮጵያ) 0 1 eth AMH +0x0001 ar Arabic‎ Arabic العربية‏ 1256 720 SAU ARA +0x1401 ar-DZ Arabic (Algeria)‎ Arabic العربية (الجزائر)‏ 1256 720 DZA ARG +0x3C01 ar-BH Arabic (Bahrain)‎ Arabic العربية (البحرين)‏ 1256 720 BHR ARH +0x0C01 ar-EG Arabic (Egypt)‎ Arabic العربية (مصر)‏ 1256 720 EGY ARE +0x0801 ar-IQ Arabic (Iraq)‎ Arabic العربية (العراق)‏ 1256 720 IRQ ARI +0x2C01 ar-JO Arabic (Jordan)‎ Arabic العربية (الأردن)‏ 1256 720 JOR ARJ +0x3401 ar-KW Arabic (Kuwait)‎ Arabic العربية (الكويت)‏ 1256 720 KWT ARK +0x3001 ar-LB Arabic (Lebanon)‎ Arabic العربية (لبنان)‏ 1256 720 LBN ARB +0x1001 ar-LY Arabic (Libya)‎ Arabic العربية (ليبيا)‏ 1256 720 LBY ARL +0x1801 ar-MA Arabic (Morocco)‎ Arabic العربية (المملكة المغربية)‏ 1256 720 MAR ARM +0x2001 ar-OM Arabic (Oman)‎ Arabic العربية (عمان)‏ 1256 720 OMN ARO +0x4001 ar-QA Arabic (Qatar)‎ Arabic العربية (قطر)‏ 1256 720 QAT ARQ +0x0401 ar-SA Arabic (Saudi Arabia)‎ Arabic العربية (المملكة العربية السعودية)‏ 1256 720 SAU ARA +0x2801 ar-SY Arabic (Syria)‎ Arabic العربية (سوريا)‏ 1256 720 SYR ARS +0x1C01 ar-TN Arabic (Tunisia)‎ Arabic العربية (تونس)‏ 1256 720 TUN ART +0x3801 ar-AE Arabic (U.A.E.)‎ Arabic العربية (الإمارات العربية المتحدة)‏ 1256 720 ARE ARU +0x2401 ar-YE Arabic (Yemen)‎ Arabic العربية (اليمن)‏ 1256 720 YEM ARY +0x002B hy Armenian Armenian Հայերեն 0 1 ARM HYE +0x042B hy-AM Armenian (Armenia) Armenian Հայերեն (Հայաստան) 0 1 ARM HYE +0x044D as-IN Assamese (India) Assamese অসমীয়া (ভাৰত) 0 1 IND ASM +0x002C az Azeri Azeri (Latin) Azərbaycan­ılı 1254 857 AZE AZE +0x082C az-Cyrl-AZ Azeri (Cyrillic, Azerbaijan) Azeri (Cyrillic) Азәрбајҹан (Азәрбајҹан) 1251 866 AZE AZE +0x042C az-Latn-AZ Azeri (Latin, Azerbaijan) Azeri (Latin) Azərbaycan­ılı (Azərbaycanca) 1254 857 AZE AZE +0x046D ba-RU Bashkir (Russia) Bashkir Башҡорт (Россия) 1251 866 RUS BAS +0x002D eu Basque Basque euskara 1252 850 ESP EUQ +0x042D eu-ES Basque (Basque) Basque euskara (euskara) 1252 850 ESP EUQ +0x0023 be Belarusian Belarusian Беларускі 1251 866 BLR BEL +0x0423 be-BY Belarusian (Belarus) Belarusian Беларускі (Беларусь) 1251 866 BLR BEL +0x0845 bn-BD Bengali (Bangladesh) Bengali বাংলা (বাংলা) 0 1 BDG BNG +0x0445 bn-IN Bengali (India) Bengali বাংলা (ভারত) 0 1 IND BNG +0x201A bs-Cyrl-BA Bosnian (Cyrillic, Bosnia and Herzegovina) Bosnian (Cyrillic) босански (Босна и Херцеговина) 1251 855 BIH BSC +0x141A bs-Latn-BA Bosnian (Latin, Bosnia and Herzegovina) Bosnian (Latin) bosanski (Bosna i Hercegovina) 1250 852 BIH BSB +0x047E br-FR Breton (France) Breton brezhoneg (Frañs) 1252 850 FRA BRE +0x0002 bg Bulgarian Bulgarian български 1251 866 BGR BGR +0x0402 bg-BG Bulgarian (Bulgaria) Bulgarian български (България) 1251 866 BGR BGR +0x0003 ca Catalan Catalan català 1252 850 ESP CAT +0x0403 ca-ES Catalan (Catalan) Catalan català (català) 1252 850 ESP CAT +0x0C04 zh-HK Chinese (Hong Kong S.A.R.) Chinese 中文(香港特别行政區) 950 950 HKG ZHH +0x1404 zh-MO Chinese (Macao S.A.R.) Chinese 中文(澳門特别行政區) 950 950 MCO ZHM +0x0804 zh-CN Chinese (People's Republic of China) Chinese 中文(中华人民共和国) 936 936 CHN CHS +0x0004 zh-Hans Chinese (Simplified) Chinese 中文(简体) 936 936 CHN CHS +0x1004 zh-SG Chinese (Singapore) Chinese 中文(新加坡) 936 936 SGP ZHI +0x0404 zh-TW Chinese (Taiwan) Chinese 中文(台灣) 950 950 TWN CHT +0x7C04 zh-Hant Chinese (Traditional) Chinese 中文(繁體) 950 950 TWN CHT +0x0483 co-FR Corsican (France) Corsican Corsu (France) 1252 850 FRA COS +0x001A hr Croatian Croatian hrvatski 1250 852 HRV HRV +0x041A hr-HR Croatian (Croatia) Croatian hrvatski (Hrvatska) 1250 852 HRV HRV +0x101A hr-BA Croatian (Latin, Bosnia and Herzegovina) Croatian (Latin) hrvatski (Bosna i Hercegovina) 1250 852 BIH HRB +0x0005 cs Czech Czech čeština 1250 852 CZE CSY +0x0405 cs-CZ Czech (Czech Republic) Czech čeština (Česká republika) 1250 852 CZE CSY +0x0006 da Danish Danish dansk 1252 850 DNK DAN +0x0406 da-DK Danish (Denmark) Danish dansk (Danmark) 1252 850 DNK DAN +0x048C prs-AF Dari (Afghanistan) Dari درى (افغانستان) 1256 720 AFG PRS +0x0065 div Divehi‎ Divehi ދިވެހިބަސް‏ 0 1 MDV DIV +0x0465 div-MV Divehi (Maldives)‎ Divehi ދިވެހިބަސް (ދިވެހި ރާއްޖެ)‏ 0 1 MDV DIV +0x0013 nl Dutch Dutch Nederlands 1252 850 NLD NLD +0x0813 nl-BE Dutch (Belgium) Dutch Nederlands (België) 1252 850 BEL NLB +0x0413 nl-NL Dutch (Netherlands) Dutch Nederlands (Nederland) 1252 850 NLD NLD +0x0009 en English English English 1252 437 USA ENU +0x0C09 en-AU English (Australia) English English (Australia) 1252 850 AUS ENA +0x2809 en-BZ English (Belize) English English (Belize) 1252 850 BLZ ENL +0x1009 en-CA English (Canada) English English (Canada) 1252 850 CAN ENC +0x2409 en-029 English (Caribbean) English English (Caribbean) 1252 850 CAR ENB +0x4009 en-IN English (India) English English (India) 1252 437 IND ENN +0x1809 en-IE English (Ireland) English English (Eire) 1252 850 IRL ENI +0x2009 en-JM English (Jamaica) English English (Jamaica) 1252 850 JAM ENJ +0x4409 en-MY English (Malaysia) English English (Malaysia) 1252 437 MYS ENM +0x1409 en-NZ English (New Zealand) English English (New Zealand) 1252 850 NZL ENZ +0x3409 en-PH English (Republic of the Philippines) English English (Philippines) 1252 437 PHL ENP +0x4809 en-SG English (Singapore) English English (Singapore) 1252 437 SGP ENE +0x1C09 en-ZA English (South Africa) English English (South Africa) 1252 437 ZAF ENS +0x2C09 en-TT English (Trinidad and Tobago) English English (Trinidad y Tobago) 1252 850 TTO ENT +0x0809 en-GB English (United Kingdom) English English (United Kingdom) 1252 850 GBR ENG +0x0409 en-US English (United States) English English (United States) 1252 437 USA ENU +0x3009 en-ZW English (Zimbabwe) English English (Zimbabwe) 1252 437 ZWE ENW +0x0025 et Estonian Estonian eesti 1257 775 EST ETI +0x0425 et-EE Estonian (Estonia) Estonian eesti (Eesti) 1257 775 EST ETI +0x0038 fo Faroese Faroese føroyskt 1252 850 FRO FOS +0x0438 fo-FO Faroese (Faroe Islands) Faroese føroyskt (Føroyar) 1252 850 FRO FOS +0x0464 fil-PH Filipino (Philippines) Filipino Filipino (Pilipinas) 1252 437 PHL FPO +0x000B fi Finnish Finnish suomi 1252 850 FIN FIN +0x040B fi-FI Finnish (Finland) Finnish suomi (Suomi) 1252 850 FIN FIN +0x000C fr French French français 1252 850 FRA FRA +0x080C fr-BE French (Belgium) French français (Belgique) 1252 850 BEL FRB +0x0C0C fr-CA French (Canada) French français (Canada) 1252 850 CAN FRC +0x040C fr-FR French (France) French français (France) 1252 850 FRA FRA +0x140C fr-LU French (Luxembourg) French français (Luxembourg) 1252 850 LUX FRL +0x180C fr-MC French (Principality of Monaco) French français (Principauté de Monaco) 1252 850 MCO FRM +0x100C fr-CH French (Switzerland) French français (Suisse) 1252 850 CHE FRS +0x0462 fy-NL Frisian (Netherlands) Frisian Frysk (Nederlân) 1252 850 NLD FYN +0x0056 gl Galician Galician galego 1252 850 ESP GLC +0x0456 gl-ES Galician (Galician) Galician galego (galego) 1252 850 ESP GLC +0x0037 ka Georgian Georgian ქართული 0 1 GEO KAT +0x0437 ka-GE Georgian (Georgia) Georgian ქართული (საქართველო) 0 1 GEO KAT +0x0007 de German German Deutsch 1252 850 DEU DEU +0x0C07 de-AT German (Austria) German Deutsch (Österreich) 1252 850 AUT DEA +0x0407 de-DE German (Germany) German Deutsch (Deutschland) 1252 850 DEU DEU +0x1407 de-LI German (Liechtenstein) German Deutsch (Liechtenstein) 1252 850 LIE DEC +0x1007 de-LU German (Luxembourg) German Deutsch (Luxemburg) 1252 850 LUX DEL +0x0807 de-CH German (Switzerland) German Deutsch (Schweiz) 1252 850 CHE DES +0x0008 el Greek Greek ελληνικά 1253 737 GRC ELL +0x0408 el-GR Greek (Greece) Greek ελληνικά (Ελλάδα) 1253 737 GRC ELL +0x046F kl-GL Greenlandic (Greenland) Greenlandic kalaallisut (Kalaallit Nunaat) 1252 850 GRL KAL +0x0047 gu Gujarati Gujarati ગુજરાતી 0 1 IND GUJ +0x0447 gu-IN Gujarati (India) Gujarati ગુજરાતી (ભારત) 0 1 IND GUJ +0x0468 ha-Latn-NG Hausa (Latin, Nigeria) Hausa (Latin) Hausa (Nigeria) 1252 437 NGA HAU +0x000D he Hebrew‎ Hebrew עברית‏ 1255 862 ISR HEB +0x040D he-IL Hebrew (Israel)‎ Hebrew עברית (ישראל)‏ 1255 862 ISR HEB +0x0039 hi Hindi Hindi हिंदी 0 1 IND HIN +0x0439 hi-IN Hindi (India) Hindi हिंदी (भारत) 0 1 IND HIN +0x000E hu Hungarian Hungarian magyar 1250 852 HUN HUN +0x040E hu-HU Hungarian (Hungary) Hungarian magyar (Magyarország) 1250 852 HUN HUN +0x000F is Icelandic Icelandic íslenska 1252 850 ISL ISL +0x040F is-IS Icelandic (Iceland) Icelandic íslenska (Ísland) 1252 850 ISL ISL +0x0470 ig-NG Igbo (Nigeria) Igbo Igbo (Nigeria) 1252 437 NGA IBO +0x0021 id Indonesian Indonesian Bahasa Indonesia 1252 850 IDN IND +0x0421 id-ID Indonesian (Indonesia) Indonesian Bahasa Indonesia (Indonesia) 1252 850 IDN IND +0x085D iu-Latn-CA Inuktitut (Latin, Canada) Inuktitut (Latin) Inuktitut (Kanatami) (kanata) 1252 437 CAN IUK +0x045D iu-Cans-CA Inuktitut (Syllabics, Canada) Inuktitut ᐃᓄᒃᑎᑐᑦ (ᑲᓇᑕ) 0 1 CAN IUS +0x083C ga-IE Irish (Ireland) Irish Gaeilge (Éire) 1252 850 IRL IRE +0x0434 xh-ZA isiXhosa (South Africa) isiXhosa isiXhosa (uMzantsi Afrika) 1252 850 ZAF XHO +0x0435 zu-ZA isiZulu (South Africa) isiZulu isiZulu (iNingizimu Afrika) 1252 850 ZAF ZUL +0x0010 it Italian Italian italiano 1252 850 ITA ITA +0x0410 it-IT Italian (Italy) Italian italiano (Italia) 1252 850 ITA ITA +0x0810 it-CH Italian (Switzerland) Italian italiano (Svizzera) 1252 850 CHE ITS +0x0011 ja Japanese Japanese 日本語 932 932 JPN JPN +0x0411 ja-JP Japanese (Japan) Japanese 日本語 (日本) 932 932 JPN JPN +0x004B kn Kannada Kannada ಕನ್ನಡ 0 1 IND KDI +0x044B kn-IN Kannada (India) Kannada ಕನ್ನಡ (ಭಾರತ) 0 1 IND KDI +0x003F kk Kazakh Kazakh Қазащb 1251 866 KAZ KKZ +0x043F kk-KZ Kazakh (Kazakhstan) Kazakh Қазақ (Қазақстан) 1251 866 KAZ KKZ +0x0453 km-KH Khmer (Cambodia) Khmer ខ្មែរ (កម្ពុជា) 0 1 KHM KHM +0x0486 qut-GT K'iche (Guatemala) K'iche K'iche (Guatemala) 1252 850 GTM QUT +0x0487 rw-RW Kinyarwanda (Rwanda) Kinyarwanda Kinyarwanda (Rwanda) 1252 437 RWA KIN +0x0041 sw Kiswahili Kiswahili Kiswahili 1252 437 KEN SWK +0x0441 sw-KE Kiswahili (Kenya) Kiswahili Kiswahili (Kenya) 1252 437 KEN SWK +0x0057 kok Konkani Konkani कोंकणी 0 1 IND KNK +0x0457 kok-IN Konkani (India) Konkani कोंकणी (भारत) 0 1 IND KNK +0x0012 ko Korean Korean 한국어 949 949 KOR KOR +0x0412 ko-KR Korean (Korea) Korean 한국어 (대한민국) 949 949 KOR KOR +0x0040 ky Kyrgyz Kyrgyz Кыргыз 1251 866 KGZ KYR +0x0440 ky-KG Kyrgyz (Kyrgyzstan) Kyrgyz Кыргыз (Кыргызстан) 1251 866 KGZ KYR +0x0454 lo-LA Lao (Lao P.D.R.) Lao ລາວ (ສ.ປ.ປ. ລາວ) 0 1 LAO LAO +0x0026 lv Latvian Latvian latviešu 1257 775 LVA LVI +0x0426 lv-LV Latvian (Latvia) Latvian latviešu (Latvija) 1257 775 LVA LVI +0x0027 lt Lithuanian Lithuanian lietuvių 1257 775 LTU LTH +0x0427 lt-LT Lithuanian (Lithuania) Lithuanian lietuvių (Lietuva) 1257 775 LTU LTH +0x082E wee-DE Lower Sorbian (Germany) Lower Sorbian dolnoserbšćina (Nimska) 1252 850 GER DSB +0x046E lb-LU Luxembourgish (Luxembourg) Luxembourgish Lëtzebuergesch (Luxembourg) 1252 850 LUX LBX +0x002F mk Macedonian Macedonian (FYROM) македонски јазик 1251 866 MKD MKI +0x042F mk-MK Macedonian (Former Yugoslav Republic of Macedonia) Macedonian (FYROM) македонски јазик (Македонија) 1251 866 MKD MKI +0x003E ms Malay Malay Bahasa Malaysia 1252 850 MYS MSL +0x083E ms-BN Malay (Brunei Darussalam) Malay Bahasa Malaysia (Brunei Darussalam) 1252 850 BRN MSB +0x043E ms-MY Malay (Malaysia) Malay Bahasa Malaysia (Malaysia) 1252 850 MYS MSL +0x044C ml-IN Malayalam (India) Malayalam മലയാളം (ഭാരതം) 0 1 IND MYM +0x043A mt-MT Maltese (Malta) Maltese Malti (Malta) 0 1 MLT MLT +0x0481 mi-NZ Maori (New Zealand) Maori Reo Māori (Aotearoa) 0 1 NZL MRI +0x047A arn-CL Mapudungun (Chile) Mapudungun Mapudungun (Chile) 1252 850 CHL MPD +0x004E mr Marathi Marathi मराठी 0 1 IND MAR +0x044E mr-IN Marathi (India) Marathi मराठी (भारत) 0 1 IND MAR +0x047C moh-CA Mohawk (Mohawk) Mohawk Kanien'kéha (Canada) 1252 850 CAN MWK +0x0050 mn Mongolian Mongolian (Cyrillic) Монгол хэл 1251 866 MNG MON +0x0450 mn-MN Mongolian (Cyrillic, Mongolia) Mongolian (Cyrillic) Монгол хэл (Монгол улс) 1251 866 MNG MON +0x0850 mn-Mong-CN Mongolian (Traditional Mongolian, PRC) Mongolian (Traditional Mongolian) ᠮᠣᠩᠭᠤᠯ ᠬᠡᠯᠡ (ᠪᠦᠭᠦᠳᠡ ᠨᠠᠢᠷᠠᠮᠳᠠᠬᠤ ᠳᠤᠮᠳᠠᠳᠤ ᠠᠷᠠᠳ ᠣᠯᠣᠰ) 0 1 CHN MNG +0x0461 ne-NP Nepali (Nepal) Nepali नेपाली (नेपाल) 0 1 NEP NEP +0x0014 no Norwegian Norwegian (Bokmål) norsk 1252 850 NOR NOR +0x0414 nb-NO Norwegian, Bokmål (Norway) Norwegian (Bokmål) norsk, bokmål (Norge) 1252 850 NOR NOR +0x0814 nn-NO Norwegian, Nynorsk (Norway) Norwegian (Nynorsk) norsk, nynorsk (Noreg) 1252 850 NOR NON +0x0482 oc-FR Occitan (France) Occitan Occitan (França) 1252 850 FRA OCI +0x0448 or-IN Oriya (India) Oriya ଓଡ଼ିଆ (ଭାରତ) 0 1 IND ORI +0x0463 ps-AF Pashto (Afghanistan) Pashto پښتو (افغانستان) 0 1 AFG PAS +0x0029 fa Persian‎ Persian فارسى‏ 1256 720 IRN FAR +0x0429 fa-IR Persian‎ Persian فارسى (ايران)‏ 1256 720 IRN FAR +0x0015 pl Polish Polish polski 1250 852 POL PLK +0x0415 pl-PL Polish (Poland) Polish polski (Polska) 1250 852 POL PLK +0x0016 pt Portuguese Portuguese Português 1252 850 BRA PTB +0x0416 pt-BR Portuguese (Brazil) Portuguese Português (Brasil) 1252 850 BRA PTB +0x0816 pt-PT Portuguese (Portugal) Portuguese português (Portugal) 1252 850 PRT PTG +0x0046 pa Punjabi Punjabi ਪੰਜਾਬੀ 0 1 IND PAN +0x0446 pa-IN Punjabi (India) Punjabi ਪੰਜਾਬੀ (ਭਾਰਤ) 0 1 IND PAN +0x046B quz-BO Quechua (Bolivia) Quechua runasimi (Bolivia Suyu) 1252 850 BOL QUB +0x086B quz-EC Quechua (Ecuador) Quechua runasimi (Ecuador Suyu) 1252 850 ECU QUE +0x0C6B quz-PE Quechua (Peru) Quechua runasimi (Peru Suyu) 1252 850 PER QUP +0x0018 ro Romanian Romanian română 1250 852 ROM ROM +0x0418 ro-RO Romanian (Romania) Romanian română (România) 1250 852 ROM ROM +0x0417 rm-CH Romansh (Switzerland) Romansh Rumantsch (Svizra) 1252 850 CHE RMC +0x0019 ru Russian Russian русский 1251 866 RUS RUS +0x0419 ru-RU Russian (Russia) Russian русский (Россия) 1251 866 RUS RUS +0x243B smn-FI Sami, Inari (Finland) Sami (Inari) sämikielâ (Suomâ) 1252 850 FIN SMN +0x103B smj-NO Sami, Lule (Norway) Sami (Lule) julevusámegiella (Vuodna) 1252 850 NOR SMJ +0x143B smj-SE Sami, Lule (Sweden) Sami (Lule) julevusámegiella (Svierik) 1252 850 SWE SMK +0x0C3B se-FI Sami, Northern (Finland) Sami (Northern) davvisámegiella (Suopma) 1252 850 FIN SMG +0x043B se-NO Sami, Northern (Norway) Sami (Northern) davvisámegiella (Norga) 1252 850 NOR SME +0x083B se-SE Sami, Northern (Sweden) Sami (Northern) davvisámegiella (Ruoŧŧa) 1252 850 SWE SMF +0x203B sms-FI Sami, Skolt (Finland) Sami (Skolt) sääm´ǩiõll (Lää´ddjânnam) 1252 850 FIN SMS +0x183B sma-NO Sami, Southern (Norway) Sami (Southern) åarjelsaemiengiele (Nöörje) 1252 850 NOR SMA +0x1C3B sma-SE Sami, Southern (Sweden) Sami (Southern) åarjelsaemiengiele (Sveerje) 1252 850 SWE SMB +0x004F sa Sanskrit Sanskrit संस्कृत 0 1 IND SAN +0x044F sa-IN Sanskrit (India) Sanskrit संस्कृत (भारतम्) 0 1 IND SAN +0x7C1A sr Serbian Serbian (Latin) srpski 1251 855 SCG SRB +0x1C1A sr-Cyrl-BA Serbian (Cyrillic, Bosnia and Herzegovina) Serbian (Cyrillic) српски (Босна и Херцеговина) 1251 855 BIH SRN +0x0C1A sr-Cyrl-SP Serbian (Cyrillic, Serbia) Serbian (Cyrillic) српски (Србија и Црна Гора) 1251 855 SCG SRB +0x181A sr-Latn-BA Serbian (Latin, Bosnia and Herzegovina) Serbian (Latin) srpski (Bosna i Hercegovina) 1250 852 BIH SRS +0x081A sr-Latn-SP Serbian (Latin, Serbia) Serbian (Latin) srpski (Srbija i Crna Gora) 1250 852 SCG SRL +0x046C nso-ZA Sesotho sa Leboa (South Africa) Sesotho sa Leboa Sesotho sa Leboa (Afrika Borwa) 1252 850 ZAF NSO +0x0432 tn-ZA Setswana (South Africa) Setswana Setswana (Aforika Borwa) 1252 850 ZAF TSN +0x045B si-LK Sinhala (Sri Lanka) Sinhala සිංහ (ශ්‍රී ලංකා) 0 1 LKA SIN +0x001B sk Slovak Slovak slovenčina 1250 852 SVK SKY +0x041B sk-SK Slovak (Slovakia) Slovak slovenčina (Slovenská republika) 1250 852 SVK SKY +0x0024 sl Slovenian Slovenian slovenski 1250 852 SVN SLV +0x0424 sl-SI Slovenian (Slovenia) Slovenian slovenski (Slovenija) 1250 852 SVN SLV +0x000A es Spanish Spanish español 1252 850 ESP ESP +0x2C0A es-AR Spanish (Argentina) Spanish Español (Argentina) 1252 850 ARG ESS +0x400A es-BO Spanish (Bolivia) Spanish Español (Bolivia) 1252 850 BOL ESB +0x340A es-CL Spanish (Chile) Spanish Español (Chile) 1252 850 CHL ESL +0x240A es-CO Spanish (Colombia) Spanish Español (Colombia) 1252 850 COL ESO +0x140A es-CR Spanish (Costa Rica) Spanish Español (Costa Rica) 1252 850 CRI ESC +0x1C0A es-DO Spanish (Dominican Republic) Spanish Español (República Dominicana) 1252 850 DOM ESD +0x300A es-EC Spanish (Ecuador) Spanish Español (Ecuador) 1252 850 ECU ESF +0x440A es-SV Spanish (El Salvador) Spanish Español (El Salvador) 1252 850 SLV ESE +0x100A es-GT Spanish (Guatemala) Spanish Español (Guatemala) 1252 850 GTM ESG +0x480A es-HN Spanish (Honduras) Spanish Español (Honduras) 1252 850 HND ESH +0x080A es-MX Spanish (Mexico) Spanish Español (México) 1252 850 MEX ESM +0x4C0A es-NI Spanish (Nicaragua) Spanish Español (Nicaragua) 1252 850 NIC ESI +0x180A es-PA Spanish (Panama) Spanish Español (Panamá) 1252 850 PAN ESA +0x3C0A es-PY Spanish (Paraguay) Spanish Español (Paraguay) 1252 850 PRY ESZ +0x280A es-PE Spanish (Peru) Spanish Español (Perú) 1252 850 PER ESR +0x500A es-PR Spanish (Puerto Rico) Spanish Español (Puerto Rico) 1252 850 PRI ESU +0x0C0A es-ES Spanish (Spain) Spanish español (España) 1252 850 ESP ESN +0x540A es-US Spanish (United States) Spanish Español (Estados Unidos) 1252 850 USA EST +0x380A es-UY Spanish (Uruguay) Spanish Español (Uruguay) 1252 850 URY ESY +0x200A es-VE Spanish (Venezuela) Spanish Español (Republica Bolivariana de Venezuela) 1252 850 VEN ESV +0x001D sv Swedish Swedish svenska 1252 850 SWE SVE +0x081D sv-FI Swedish (Finland) Swedish svenska (Finland) 1252 850 FIN SVF +0x041D sv-SE Swedish (Sweden) Swedish svenska (Sverige) 1252 850 SWE SVE +0x005A syr Syriac‎ Syriac ܣܘܪܝܝܐ‏ 0 1 SYR SYR +0x045A syr-SY Syriac (Syria)‎ Syriac ܣܘܪܝܝܐ (سوريا)‏ 0 1 SYR SYR +0x0428 tg-Cyrl-TJ Tajik (Cyrillic, Tajikistan) Tajik (Cyrillic) Тоҷикӣ (Тоҷикистон) 1251 866 TAJ TAJ +0x085F tzm-Latn-DZ Tamazight (Latin, Algeria) Tamazight (Latin) Tamazight (Djazaïr) 1252 850 DZA TZM +0x0049 ta Tamil Tamil தமிழ் 0 1 IND TAM +0x0449 ta-IN Tamil (India) Tamil தமிழ் (இந்தியா) 0 1 IND TAM +0x0044 tt Tatar Tatar Татар 1251 866 RUS TTT +0x0444 tt-RU Tatar (Russia) Tatar Татар (Россия) 1251 866 RUS TTT +0x004A te Telugu Telugu తెలుగు 0 1 IND TEL +0x044A te-IN Telugu (India) Telugu తెలుగు (భారత దేశం) 0 1 IND TEL +0x001E th Thai Thai ไทย 874 874 THA THA +0x041E th-TH Thai (Thailand) Thai ไทย (ไทย) 874 874 THA THA +0x0451 bo-CN Tibetan (PRC) Tibetan བོད་ཡིག (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།) 0 1 CHN BOB +0x001F tr Turkish Turkish Türkçe 1254 857 TUR TRK +0x041F tr-TR Turkish (Turkey) Turkish Türkçe (Türkiye) 1254 857 TUR TRK +0x0442 tk-TM Turkmen (Turkmenistan) Turkmen türkmençe (Türkmenistan) 1250 852 TKM TUK +0x0480 ug-CN Uighur (PRC) Uighur ئۇيغۇر يېزىقى (جۇڭخۇا خەلق جۇمھۇرىيىتى) 1256 720 CHN UIG +0x0022 uk Ukrainian Ukrainian україньска 1251 866 UKR UKR +0x0422 uk-UA Ukrainian (Ukraine) Ukrainian україньска (Україна) 1251 866 UKR UKR +0x042E wen-DE Upper Sorbian (Germany) Upper Sorbian hornjoserbšćina (Němska) 1252 850 GER HSB +0x0020 ur Urdu‎ Urdu اُردو‏ 1256 720 PAK URD +0x0420 ur-PK Urdu (Islamic Republic of Pakistan)‎ Urdu اُردو (پاکستان)‏ 1256 720 PAK URD +0x0043 uz Uzbek Uzbek (Latin) U'zbek 1254 857 UZB UZB +0x0843 uz-Cyrl-UZ Uzbek (Cyrillic, Uzbekistan) Uzbek (Cyrillic) Ўзбек (Ўзбекистон) 1251 866 UZB UZB +0x0443 uz-Latn-UZ Uzbek (Latin, Uzbekistan) Uzbek (Latin) U'zbek (U'zbekiston Respublikasi) 1254 857 UZB UZB +0x002A vi Vietnamese Vietnamese Tiếng Việt 1258 1258 VNM VIT +0x042A vi-VN Vietnamese (Vietnam) Vietnamese Tiếng Việt (Việt Nam) 1258 1258 VNM VIT +0x0452 cy-GB Welsh (United Kingdom) Welsh Cymraeg (y Deyrnas Unedig) 1252 850 GBR CYM +0x0488 wo-SN Wolof (Senegal) Wolof Wolof (Sénégal) 1252 850 SEN WOL +0x0485 sah-RU Yakut (Russia) Yakut саха (Россия) 1251 866 RUS SAH +0x0478 ii-CN Yi (PRC) Yi ꆈꌠꁱꂷ (ꍏꉸꏓꂱꇭꉼꇩ) 0 1 CHN III +0x046A yo-NG Yoruba (Nigeria) Yoruba Yoruba (Nigeria) 1252 437 NGA YOR \ No newline at end of file diff --git a/resources/LanguageCodes/MicrosoftNationalLanguageSupportReference.tab.info b/resources/LanguageCodes/MicrosoftNationalLanguageSupportReference.tab.info new file mode 100644 index 0000000..b688e8d --- /dev/null +++ b/resources/LanguageCodes/MicrosoftNationalLanguageSupportReference.tab.info @@ -0,0 +1,12 @@ +0 LCID +1 culture name +2 locale +3 language name +4 local language name +5 ANSI codepage +6 OEM codepage +7 country/region abbreviation +8 language abbreviation + +title: National Language Support (NLS) API Reference +source: http://www.microsoft.com/resources/msdn/goglobal/default.mspx \ No newline at end of file diff --git a/resources/LanguageCodes/[MS-LCID].pdf b/resources/LanguageCodes/[MS-LCID].pdf new file mode 100644 index 0000000..5aee56c Binary files /dev/null and b/resources/LanguageCodes/[MS-LCID].pdf differ diff --git a/resources/cleanup.bat b/resources/cleanup.bat new file mode 100644 index 0000000..c85eb70 --- /dev/null +++ b/resources/cleanup.bat @@ -0,0 +1,31 @@ +rem cleanup +rem assumes we are starting in the "resources" folder + +cd .\.. +del /s /q *.identcache *.local *.mes *.map *.stat *.tvsconfig *.~* 1>nul 2>nul + +for /d %%D in ("Examples\*")do ( + rmdir /s /q %%D\__history + rmdir /s /q %%D\Android + rmdir /s /q %%D\iOSDevice + rmdir /s /q %%D\iOSSimulator + rmdir /s /q %%D\OSX32 + rmdir /s /q %%D\Win32 + rmdir /s /q %%D\Win64 +) + +for /d %%D in ("Packages\*")do ( + rmdir /s /q %%D +) + +for /d %%D in ("Resources\LanguageCodes\*")do ( + rmdir /s /q %%D\__history + rmdir /s /q %%D\Android + rmdir /s /q %%D\iOSDevice + rmdir /s /q %%D\iOSSimulator + rmdir /s /q %%D\OSX32 + rmdir /s /q %%D\Win32 + rmdir /s /q %%D\Win64 +) +pause +