Displays the Localization dialog (screenshot below), in which you can localize (translate) strings. These would be strings that either appear in various controls (for example, the text of a button) or are related to controls in other ways (for example, the dropdown list values of combo boxes). In addition to strings related to controls, any custom string can be localized and subsequently inserted at any location in the design via the mt-load-string function.
•Control-related strings are displayed in the upper pane (see screenshot below). The columns of this pane are, respectively, from left to right: (i) the page in which the control appears; (ii) the control's name; (iii) the control property that contains the text string; (iv) the text string in the default language; additional columns contain the text string in the localized languages, one column per language.
•Custom strings are displayed in the lower pane. The columns of this pane are, respectively, from left to right: (i) the custom string's name; (ii) the custom string in the default language; additional columns contain the custom string in the localized languages, one column per language.
When the dialog opens, all strings are listed by control, and the first string of the control that had the focus (when the dialog was opened) will be selected in the dialog. To edit, double-click in a field or press F2. You can navigate to the next field by using the Tab key.
You can add a column for a localization language with the Add Language icon. In the dialog that appears, enter the language code (used for internal) and language name (used in MobileTogether user interfaces). You can add as many columns as you like. To localize a control-related string or custom string in a particular language, enter the translation in the column for that language. To save translations, click OK.
All strings (control-related and custom) that have been localized in the Localization dialog will be used in the localized versions of the solution. If the language setting on the mobile device specifies a language-country variant (for example, es-US or fr-CH), then the solution's language is selected according to the cascading order given below:
1.If the solution contains a matching language-country (es-US or fr-CH) localization, then strings of this localization are used where these exist
2.If no matching language-country localization (es-US or fr-CH) exists for a string, then the localized language (es or fr) string is used—if one exists
3.If no language-country localization (es-US or fr-CH) or language localization (es or fr) exists for a string, then the default language of the solution is used for that string
If you wish to see a simulation in any of the languages for which localized strings are defined, set the simulation language via the Project | Simulation Language command, and then run a simulation.
The following filters are available in the Localization dialog; they can be combined:
•Page: Select a page from the dropdown list to see the strings of only that page. To select all pages, leave the option blank or select the empty entry. This filter applies to control-related strings (upper pane) only.
•Control-related strings and custom strings: Enter the text to search for. All control names (second column of upper pane) and custom string names (first column of lower pane) that contain the search text are displayed. This filter applies to both panes.
•Incomplete translations only: Check this option to show only incomplete translations. An incomplete translation is a string with at least one localization missing. This filter applies to both panes. Note that, if a translation is entered while this option is selected, then the display must be refreshed in order to update the filtering. You can refresh the display by deselecting and then re-selecting the option.
•Search in translations: If this check box is selected, the search (for the term entered) is carried out in both the default language and translations. The search is carried out while typing the search term.
These icons are located above the upper pane, on the right-hand side.
Add Language
Displays the Add Language dialog, in which you can (i) enter or select a language's ISO code (ISO639-ISO3166), and (ii) enter a language name. On clicking OK, a column with that language's code is added to both (upper and lower) panes. (See also the related mt-available-languages XPath function.)
Rename Language
Place the cursor (in a row in either pane) in the language column you want to rename, then click Rename Language. The Change Language dialog is displayed with the language to change being pre-selected in the edit field. Change the language name and click OK. The column name will be changed in both panes. You can also modify the name of the default language; but note that the default language has no language code.
Delete Language
Place the cursor (in a row in either pane) in the language column you want to delete, then click Delete Language. On being prompted whether you wish to delete the column, click Yes to delete the column and its entries, No to cancel.
Custom strings can be any text you wish to use in the design. They are managed in the lower pane by using the icons located above the pane, on the right-hand side.
Add Localization String
Adds a row for a custom string. The newly added custom string is created with a default name, which you can edit. Click in the name to start editing. The name is used to reference the custom string from XPath expressions. See below.
Duplicate Row
Duplicates the custom string that is currently selected in the lower pane (name and all localizations). This saves time if you wish to add a string that is almost the same as an already existing string. When names of two strings are the same, both names are displayed in red. Edit the duplicate string as needed.
Remove Localization String
Removes the currently selected custom string.
To use a custom string in the design, use the mt-load-string function in an XPath expression, like this: mt-load-string('NameOfString').
If you change the name of a string, then a dialog appears asking whether you want to rename the string in all the mt-load-string()calls to it. Note that this will only apply if the string is the first parameter of the function and it is not passed to the function via a variable.
Localized strings can be exported to XML files. You can choose to export one or more languages to a single file (see screenshot below). The advantage is that translators can work independently with their separate XML language files. The translated strings in the XML files can then be imported into the project, and will be placed in their corresponding localization-language columns in the Localization dialog.
When you click Export in the Localization dialog (see screenshot at the beginning of this topic), the Export Localizations dialog (screenshot below) appears. The languages that are displayed in the dialog are the languages that have been defined as the localization languages of the project. Select one or more languages to export.
If the Export default text instead of translation option is selected, then the exported file will contain the default-language text—instead of already-completed translations—as the values of all the localization-language attributes (see XML file listings below). The project, however, will retain the translations. Exporting default-language text can be useful if you use translation tools that work with translation memories. This is because, when an XML file is imported into the translation tool, the translation memory will automatically translate all the imported strings on the basis of what's in its memory. So, if any of the newly imported default text strings were previously translated, then they will simply be re-translated from the translation memory. Additionally, however, if previously untranslated strings contain words or phrases that are in the translation memory, then these words or phrases will be automatically translated. Any remaining words can then be translated manually. When the translated XML file is imported into the project, the translations are entered into the corresponding localization-language columns of the Localization dialog.
Clicking Export in the Export Localizations dialog, displays a Save dialog in which you can specify the name and location of the XML file.
Note: Strings that have not been translated into a localization language are exported as empty strings (if the export of default-language text (instead of translations) has not been enabled).
To import a translated XML file, click Import in the Localization dialog (see screenshot at the beginning of this topic). This displays an Open dialog in which you can select the XML file to import. When you click Open, the Import Localizations dialog (screenshot below) is displayed. The languages displayed are those languages found in the XML file that have corresponding columns in the Localization dialog. If a localization language is present in the XML file, but no corresponding localization language name is found in the project, then that language is not displayed.
•Select the language/s you wish to import.
•If you select the Import empty localizations option, then empty localization strings in the XML file will overwrite all existing localization strings, even if the existing strings are non-empty.
•If you select the Import default text translations option, then incoming translations that are the same as the default-language text will be imported (as with the Admin string for German (de) in the listing above). Otherwise, nothing will be imported for such fields, and the existing text in these fields will not be modified. (The Import default text translations option is enabled only if the option to export the strings of the default language was selected during the Export process; see description of Export above.)
•Click Import to finish.
The translated language strings are imported into the project and entered into the corresponding localization-language column/s of the Localization dialog. Note that the structure and content of the imported XML file must be such that MobileTogether Designer can correctly process the XML file. It is therefore important not to change the values of any other attributes besides the localization-language attributes.
Note: In the XML file, if a translated string is identical to the default-language string, then the translated string is not imported and the corresponding entry in the localization-language column is empty. When the solution is run, since there is no localization-language entry, the default-language string will be used. In this way, duplications of strings across languages are avoided.