This page is for application designers who need to have their application interface translated into different languages.
Related pages:
When you need to deploy a PhixFlow application across sites in different countries, you can configure PhixFlow to use the locale to translate the application interface.
Translatable strings are set up using the translate() function?. You can use this function on:
- Labels and Static Text in forms, buttons, tab headers and other areas
- Grid Column Headings including groupings
- Menu Items in grid headers
You cannot configure translation on:
- Display Name of a grid
- Menu Items in the application menu. These will appear as translated when a user first logs into the application. However, when the page is reloaded, the menu options will revert to the source language.
- Action Display Names which are displayed in the tooltips for an attribute action on a grid.
- Data in grids or forms, including any dynamic text that displays values from data
- Number formats.
- Error messages generated by PhixFlow.
Translation works as follows:
- You have defined strings in the application as translatable, using the translate() function.
- The user accesses a data view, dashboard or layout that contains a translatable string.
- PhixFlow checks the user locale to identify the language the user requires.
- PhixFlow looks in the translation table and displays a translation of the label if it finds:
- a string that exactly matches the translatable string
- in the language the user requires.
Remember, everything (except users) needs to be created within the application's repository.
Set up Languages and Locales
If the language you need is not already listed in the Translation table, add the language to the Full Repository. You cannot set up specific languages for the application.
Can you use the Locales set for the system or copy them into your repository?
Add the locales to your application - or use an existing one?
- In the application repository, right-click Locale and Add Locale.
- Enter a name for the Locale, and select a language from the Language Name drop-down list.
You can only delete a language from the repository when it is no longer used by any Locale.
Configuring Translation
Text Strings
It is important to be consistent in capitalisation and to minimise the strings, as you need to create entries that pair the text to all the translations.
Translation does not apply to the PhixFlow interface itself. Any notification, warning or error messages reported by PhixFlow will continue to be in English.
An application is able to translate text using the information in its translation table. The table contains a list of whole text strings which must exactly match those used in the application.
The translation table must include all variants of a string, for example, with different:
- spelling variants
- capitalisation
- spacing
- punctuation.
For each text string you must add the translation for each language you want to support.
It is not possible to break the strings into substrings or translation. For example, you must translate ‘First Name’ and ‘Family Name’ separately, rather than creating translation strings for 'first', 'family' and 'name'.
Create and populate the translation table
- In the application repository, right-click Translation Table and click Add.
- In Basic Settings → Name, add a name.
- In Translation Entries, add entry codes for each string that you need to translate.
- Click Add to open a New Translation Entry properties tab. Set:
- Basic Settings → Entry Code: the string that is to be translated - exactly matching how it appears in the interface.
- Translation Cell: add an entry for each language the string will be translated into (how?) and set:
- Translation String to the translated version
- Language Name to the language
Date Time Formats
Depending on a user's locale, PhixFlow can change the way it displays dates and times. The mappings are expressed using dd/MM/yyyy strings. If you want to translate month names or abbreviations, such as "January" is not translated to "Janvier", "Jan" is not translated to "Janv", use text string translation.
Step 1. Create a date-time format
- In the application repository, right-click Date Time Formats and click Add.
- In Basic Settings, set:
- Name, add a name. Consider relating the name to the locale.
- Date Time Format String: use d, M, y, H, m and s to specify the format - link to relevant page on dddmmm etc
If you do not configure any mappings, PhixFlow uses this format to display date-times for all locales.
Step 2. Map the format to alternative formats for each locale
- For each locale, add a Date Style Mapping.
- Click Add to open a New Date Style Mapping tab. Set:
- Date Format: use d, M, y, H, m and s to specify the format you want to use for the locale, for example
dd/MM/yyyy
ordd-MM-yy HH:mm:ss
. - Date Style Name: the Date Style you created for the Locale
I cannot add the name and I cannot save the mapping
- Date Format: use d, M, y, H, m and s to specify the format you want to use for the locale, for example
- Click OK to save and close the properties tab.
Step 3. Add the Date Time Format to your Locale
- In the application repository, open the locale for your application.
- In Basic Settings → Date Style Name, select the format you just created from the drop-down list.
Ensure all Date Time Formats are removed from a locale before deleting them from the repository.
Do not delete Date Styles that have mappings referring to them – this leads to a bug where the Date Time Formats that had mappings to the deleted Date Style bring up an error when opening their configuration forms and cannot be deleted, and the Locale that used the deleted Date Style can no longer translate dates (Jira raised for this)