|
|||||||||||
|
DescriptioncLocalization enables the integration of language files exported with vbLocalization
Manager. Content
Properties.Changed As Boolean True if the file content has changed since the last load or save process. .LastError As String Last occurred error. .Folder As String Folder loaded with GetFiles. .Languages As Variant Variant String Array. Names (without Extension) of the language files found by
GetFiles. [.Item](OriginalText As String,[Value1 As Variant, Value2 As Variant, ...]) As String Translation of OriginalText. .ItemA(OriginalText As String) As String Translation of OriginalText. .Keys As Variant Variant String Array containing all original/source text entries. Read only. .Items As Variant Variant String Array containing all translation entries. .Language As String Currently loaded language. .CurrentFile As String Path of the currently loaded language file. .CharSet As Long The used char set of the translation. This property is needed for proper display. .RightToLeft As Boolean This property is set to True, if the language direction is RTL. .CharSets As Scripting.Dictionary Handle to a Scripting.Dictionary. Contains the key-value pairs for the loaded CharSets:
Description (String) = CharSet (Long) Methods.GetFiles(Folder As String, [FileExtension As String]) As Boolean Reads the files of the Folder. .Load(Language As String) As Boolean Loads the specified language file by the name (Language). .LoadA(Language As String) As Boolean Loads a language file that is v2.08 alpha5-. This method is called by Load and LoadFile, if the file is not v2.11 alpha6+ .LoadFile(FilePath As String) As Boolean Loads the specified language file by the path. .Save(FilePath As String) As Boolean Saves the currently loaded language file. .ClearFiles Removes all files from the current list. .ClearTranslation Removes all translated values from the currently loaded language file. .LoadCharSets(Optional FilePath As String) As Boolean Loads all available char sets from the specified file. The file is delivered with the
class: charsets.ini .ReadTextFileU(ByRef FilePath As String, Optional Format As Tristate = TristateTrue) As String Reads the specified file and returns the content. WriteTextFileU(ByRef FilePath As String, ByRef Text As String, Optional Format As Tristate = TristateTrue) As Boolean Writes the specified file from a string and returns True if
the process succeeds otherwise False.
Events_OnError(Message As String) Event is raised if an error occurs. NotesPlaceholders are replaced by the corresponding values during runtime, when you are accessing the Item property.
Language names are the names of the language files without extension. Methods and properties meant for editing language files are needed only for editing but not for common access. Therefore they are displayed in green color. Language File SpecificationLanguage files are saved as DBCS UNICODE. The files can be edited with Notepad. The language file header is enclosed in a head-Tag and contains language specific information. For properly displaying Unicode languages, the Font Charset property needs to be set to the right code page.
Sample
|
|||||||||||