Child pages
  • Internationalization

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Note: In addition to the tools discussed below, Servoy provides a scripting API for commonly used functions, accessible via the i18n node towards the bottom of Solution Explorer (separate from the Resources project). This feature is discussed in the Programming Guide.

Stoc

I18n Databases

...

and Tables

The data for internationalization is saved in the workspace under the Resources project. The table is then exported with the solution when the solution is deployed to the application server.

...

  1. In Solution Explorer, under the Resources project, click on the i18n files node.
  2. Double-click on the i18n file you wish to access in the contextual list at the bottom of the Solution Explorer. It will open in Table Editor view.
  3. Along the top of this view is a filter that enables users to quickly find a i18n key. The next two items at the top are the Language and Country drop-downs. To edit an i18n key:
    1. Select the key and the language/country you wish to edit.
    2. Click on the desired i18n key from the list.
    3. Enter the reference text (which is the default language text) and the locale text appropriate to that language/country.
  4. To add a new i18n key:
    1. Type in a name for the new key in the Key text box.
    2. Enter the reference text and the locale text in their respective boxes.
    3. Click Add.

Defining

...

an i18n Table

...

for a Solution

To add internationalization to your solution, an i18n table needs to be associated with the solution. You will be prompted to do this when you first add internationalization to a solution using either of two available methods: (1) externalizing all the available text in a solution or (2) adding i18n messages one by one to your forms/scripts (see image below of i18n buttons in main toolbar).

...

Tip

Tip: To change a solution's assigned i18n table at any time, select the solution in Solution Explorer to show the solution's Properties view. Then, double-click on the i18nDataSource line item in the Properties view and select the desired table from the pop-up browser that appears.

Externalizing

...

a Solution

As mentioned previously, the Externalize function adds internationalization to a solution by creating a list of all the items in your solution that are available for internationalization. It then generates i18n keys and messages from all the text properties in the solution (form objects such as button lables, column titles) and replaces the hardcoded text with the i18n keys, with the default text being the original text property that was assigned to the item.
In addition to form objects, Javascript strings are included in the externalization, when present. These can be excluded from externalization using the Ignore selected messages underneath the externalize list. Once excluded, a comment is placed in the script that directs Servoy to skip these messages during future externalizations.

...