Storyboard makes it simple to translate and internationalize the text content of your application. Dynamic text content is treated the same as any other dynamic content that is rendered to the display. Within the text render extension, the translatable content should be associated with a variable. Any changes that occur to that variable, will trigger a screen re-draw to occur if that variable is being used in the current display.
Changes in string content is automatically reflected, making the translation activity significantly less labour intensive. To apply the translated content to the application, simply update a number of data variables with the appropriate UTF-8 encoded text string.
Two examples of translation are provided in the Storyboard samples. To further understand the internationalization process, be sure to check out translation and thermostat Storyboard samples available via > > .
In some circumstances, most notably with non-latin character sets, it may also be a requirement to dynamically change the fonts being used to map to an alternative font that provides the appropriate glyph support for the characters being rendered. Additionally it may be that a change in translated text requires additional properties to be adjusted, such as font point size or control dimensions, to accommodate the new translation. These can be adjusted as a straightforward data change to a dynamic variable. In all situations the UI will automatically refresh to show the new content.
Storyboard provides two editor functions that allow translations to be quickly prototyped in the context of the design environment.
The Create Translation toolbar item scans
through the application, identifies all of the bound text variables that are used,
and extracts them to a comma separated (csv) file that contains the Storyboard
variable key and the translated text string. By default, this file is saved in the
translations
directory of the project. This file can serve as the
basis for performing a dynamic load of translated content or can be used by
designers to ensure that the UI is appropriate for different language
configurations.
The Apply Translation toolbar item scans the
translations
directory of a project for suitable translation files
and presents a dialog that allows the user to immediately change all of the variable
definitions in a project to the values declared in the translation file. This
feature allows developers a quick way to preview their content in different language
configurations.