Official Content

There are two types of translations available in GeneXus:

  • Static Translation
  • Run-time Translation 

Static Translation

This is the best-performing translation option because it is solved at specification time. The generated code already contains the static translations.

The resulting application cannot change the language at runtime, so no runtime overhead is added.

It is available for all generators (many generators only have this value for the Translation type property).

Having your application in different languages requires different executable applications (one for each language). If you plan to have your application translated into different languages using Static translation, you must set up a new Environment for every new language you want to translate into. 

How to enable Static translation

  1. Set the Translation type property to 'Static'.
  2. Select a predefined Language object (in the KB Explorer below the Localization node) you want your application to be translated into. If the language you want your application to be translated into is not predefined, create a new Language object and select it. Consider that the Is Right To Left property must be set to define languages read right to left.
  3. Set the Translate to language property to the language you want your application to be translated into.
  4. Specify the entire application. All fixed texts to be translated will be added to the selected Language objects.
  5. Enter the translation for every fixed text into the target Language object (consider exporting the Language object so that a translator can enter the translations using the GeneXus Translation Tool).
  6. Press F5, and that's all!

Note that if your languages reference different ISO code pages, you will need to change the Windows regional settings configuration for each language generation process.

For instance, if you have languages such as Japanese, Chinese, Thai, and so on, the Static translation process needs to correctly configure the associated Language for non-Unicode programs (Windows configuration). If this is a problem for your Environment, switch to Run-time translation.

Run-time Translation

Run-time translation is available for the .NET, Java and .NET Framework generators.

It is the most versatile solution with a little performance overhead (compared to Static translation).

When using Run-time translation, you can:

  • Manage a single set of executable applications running in different languages;
  • Allow the end user to select the desired application language from the list of available languages;
  • Add new languages to your application without changing the executable code.
     

How to enable Run-time translation

  1. Set the Translation type property to 'Run-time'.
  2. Select the predefined Language objects (in the KB Explorer below the Localization node) you want your application to be translated into. If the language you want your application to be translated into is not predefined, create a new Language object and select it. Consider that the Is Right To Left property must be set to define languages read right to left.
  3. Specify the entire application. All fixed texts to be translated will be added to the selected Language objects.
  4. Enter the translation for every fixed text into the target Language objects (consider exporting the Language object so that a translator can enter the translations using the GeneXus Translation Tool).
  5. Use the SetLanguage function in your code where appropriate to indicate the language to be used.
  6. Press F5, and that's all!

The orientation is determined automatically according to the application language if you base your styles on a Design System Object and select the 'None' value for the Base CSS property.

In addition, if you use Web Theme objects, Design Systems (with a value other than 'None' in the Base CSS property), or use different Themes or Design Systems depending on the orientation, you must use the SetLanguage function and the SetTheme function

Availability

Since GeneXus 18 Upgrade 3, the orientation is automatically determined by the SetLanguage function when a Design System has the Base CSS property set to None.

See Also

Real-time translation of RTL languages

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant