JVCL Help:TJvTranslator.Translate@string@string
From Project JEDI Wiki
Jump to navigationJump to searchJVCL Help: TJvTranslator.Translate Method (string, string)
[+] TJvTranslator Methods
[+] TJvTranslator Properties
Search in JVCL Help
Search in all projectsSummary
Translates a string using the currently loaded XML.
Pascal
functionTranslate(constCategory: string; constItem: string): string; overload;
Parameters
Parameters | Description |
const Category: string | The name of the Category of the translation to use. The value of this parameter is checked against the names of the direct sub nodes of the root node in the XML. |
const Item: string | The name of the Item of the translation to use. The value of this parameter is checked against the names of the subnodes. |
Return Value
Returns the value of the Item node or, if not found, the value of a property of Item named "Value" or an empty string if the node was not found.
Description
Searches the currently loaded XML for a node matching the names as defined by Category and Item and returns the found value.
Example
If Category = "Variables" and Item = "Item", the XML would have to look like the following for this method to find a match: <Translation>
... <Variables> <Item>XXXXX</Item> </Variables> ... </Translation>
This would return the string "XXX". Alternatively, the XML could look like this:<Translation> ... <Variables> <Item Value="YYYY" /> </Variables> ... </Translation>
This would return the string "YYY". if more than one node has the same name, the first one found is the one used.
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page