Child pages
  • Internationalization

Versions Compared

Key

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

...

As mentioned previously, the Externalize Strings function adds internationalization to a solution by creating a list of all the items in the active 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 lableslabels, 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.Image Removed

To externalize a solution:

  1. Click on the Externalize (1) Strings button. The i18n externalize dialog box will open, showing the following three columns (from left to right):
    • The text property to be externalized
    • The hardcoded text that will become the default text
    • The i18n key name to be assigned to the property

      Image Added

  2. Customize/edit the keys by double-clicking on a desired key, if desired.
  3. Deselect any items you do that are not wish desired to be shown in the list, hence not externalized, if applicable.
  4. Enter common prefix for generated keys, if desired. Click Apply for the prefix to be applied on the key values.
  5. Click Externalize. An externalize dialog will appear, showing the status of the externalize process. Once completed, this dialog disappears and all item properties will be converted to i18n keys.

...

Internationalization can be added one by one to a solution by editing i18n keys using the Table Editor_._

  • To quickly access the editor, click on the Edit i18n messages I18N Messages button on the toolbar.
  • I18n messages can be added to objects in both the Form Editor and the Script Editor:
  • In the Form Editor, simply type in the i18n key where you one would normally type in the hardcoded text (for example, inside a text box or label, or via the Properties view in texttoolTipText, or titleText properties.
  • In the Script Editor, type in the i18n key inside the string in place of hardcoded text.