function GetTranslationProperty (Propertyname:string):WideString;
The translation files contain a header as the translation of an empty string. A typical
header looks like this:
msgid ""
msgstr ""
"Project-Id-Version: Delphi 7 RTL\n"
"POT-Creation-Date: 2003-03-02 18:54\n"
"PO-Revision-Date: 2003-06-01 11:52--100\n"
"Last-Translator: Lars B. Dybdahl <Lars@dybdahl.dk>\n"
"Language-Team: Dansk <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"License: You may use this file any way you want\n" |
As you can see, all lines consist of a keyword, a colon, a space and a value. In order
to retrieve these informations easily, you can use the GetTranslationProperty() function
like this:
LabelTranslationLicense.Caption:=DefaultInstance.GetTranslationProperty('License'); |