Localized string
Localized string ( resName ) -> Function result
Parameter | Type | Description | |
---|---|---|---|
resName | Text | → | Name of resname attribute |
Function result | String | ← | Value of string designated by resName in current language |
Description
The Localized string command returns the value of the string designated by the resName attribute for the current language.
This command only works within an XLIFF architecture. For more information about this type of architecture, please refer to the description of XLIFF support in the Design Reference manual.
Note: The Get database localization command can be used to find out the language used by the application.
Pass the resource name of the string for which you want to get the translation into the current target language in resName.
Note that XLIFF is diacritical.
Example
Here is an extract from an .xlf file:
<file source-language="en-US" target-language="fr-FR">
[...]
<trans-unit resname="Show on disk">
<source>Show on disk</source>
<target>Montrer sur le disque</target>
</trans-unit>
After executing the following statement:
$FRvalue:=Localized string("Show on disk")
... if the current language is French, $FRvalue contains “Montrer sur le disque”.
System variables and sets
If the command is executed correctly, the OK variable is set to 1. If resName is not found, the command returns an empty string and the OK variable is set to 0.