Wiki source code of Translate
Version 7.2 by Outhman Moustaghfir on 2024/02/21 10:54
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
3.1 | 1 | == Overview == |
2 | |||
![]() |
6.1 | 3 | The **Translate **function is a powerful tool designed to retrieve translations for a specified alias and scope in multiple languages for **IXDictionnary **tracking type. This function simplifies the process of obtaining translations within XSLT expressions. |
![]() |
3.1 | 4 | |
5 | === Usage === | ||
6 | |||
7 | {{code language="XML"}} | ||
![]() |
4.1 | 8 | <xsl:value-of select="ixf:Translate('alias','scope','es')"></xsl:value-of> |
![]() |
3.1 | 9 | |
10 | {{/code}} | ||
11 | |||
12 | === Parameters === | ||
13 | |||
14 | * 'alias': The unique identifier or alias you want to translate. | ||
15 | * 'scope': The context or domain in which the translation is relevant. | ||
16 | * 'language': The desired language for the translation (e.g., 'fr' for French, 'en' for English, 'es' for Spanish). | ||
17 | |||
18 | == Language Codes == | ||
19 | |||
20 | * 'fr': French | ||
21 | * 'en': English | ||
22 | * 'es': Spanish | ||
23 | |||
24 | == Notes == | ||
25 | |||
26 | * The Translate function supports translations in French, English, and Spanish. | ||
27 | * Ensure that the specified alias and scope exist in the translation database to receive accurate results. | ||
28 | * Check and use the correct language code for the desired translation. | ||
29 | |||
![]() |
6.1 | 30 | = Example = |
![]() |
4.1 | 31 | |
![]() |
6.1 | 32 | [[image:1705570978152-850.png]] |
33 | |||
34 | |||
35 | {{code language="XML"}} | ||
36 | <xsl:value-of select="ixf:Translate('MyAlias','MyScope','es')"></xsl:value-of> | ||
37 | |||
38 | {{/code}} | ||
39 | |||
40 | in this example we Retrieve the translation of the alias 'MyAlias' within the scope 'MyScope' in Spanish using the expression, and the result will be "**Escuela**" |