Get localized string

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11


Get localized string (resName) String

ParameterTypeDescription
resNameStringName of resname attribute
Function resultStringValue of string designated by resName
in current language

Description

The Get 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 current 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:=Get localized string("Show on disk")

... if the current language is French, $FRvalue contains "Montrer sur le disque".



See Also

Get current database localization.

System Variables or 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.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next