Language-based rows technique

If your multilingual data is organized in language-based rows, create dynamic filters in data modules to dynamically access the data in the user's language.

When you create a dynamic filter on the table, use a macro, such as in the following example:

PRODUCT_LANGUAGE = #sq(queryValue('Language_Lookup_csv.LANGUAGE_MAP', 
'Language_Lookup_csv.USER_LOCALE=' + sq($runLocale)))#
Tip: This example uses the Language_Lookup_csv file for the language lookup data. For an example of the language lookup data, refer to the parent topic Working with multilingual data.

In this example, the macro results are wrapped in single quotation marks by using the sq function because the data in the PRODUCT_LANGUAGE column is a string. The queryValue function retrieves the LANGUAGE_MAP value from the Language_lookup_csv. file by filtering the USER_LOCALE column on the user’s runLocale session parameter (also wrapped in single quotation marks). If the user’s locale is fr-be, the resulting filter would look like the following one:

PRODUCT_LANGUAGE = ‘FR’