Translation and Internationalization

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 of variables is automatically reflected in the user interface to those locations. This makes the translation activity significantly less labour intensive, as it is only required to identify text strings that are statically declared (ie not bound to a variable) and convert them to be associated with a variable. This variable to text string association forms the base of Storyboard's internationalization support. In order to change the UI to reflect a new language one has only to update the text variables with the appropriate UTF-8 encoded text strings.

There are many different ways to organize the association of language to text strings and then the association of those text strings to user interface variables. Storyboard does not impose any particular method, but generally speaking there are two main techniques that can be considered to accomplish these associations.

One method is to simply keep track of all of the text variables being referenced and for each variable have the translated string stored. This means that if I had a control, for example named mybutton on a layer named mylayer, with a text render extension whose text property was associated with a variable (ie myvariable) that our language database would store the the fully qualified name, mylayer.mybutton.myvariable, along with the value of the string, perhaps "Hello". This technique is simple and works well for small applications where there is not a lot of duplication of text content. The sample Translation demonstrates this technique being used in conjunction with multiple independent comma separated value (CSV) files containing the language database information. Early versions of Storyboard provided a minimal level of automation to help manage these mappings.

A second technique provides a more scalable approach to translated applications and is recommended for sophisticated translation and internationalization applications. Instead of having each UI instance of text declare a local variable all translated text refers to a single translation namespace with unique text strings identified by unique ids. This centralized approach allows unique text strings to be declared once and more easily allows for contextualized translations to be differentiated from one another. The sample TranslationUsingId demonstrates this technique and is supported within Storyboard Designer with automation tools that more easily integrate into workflows supported by text translation professionals.

The TranslationUsingId and Translation samples can be imported into your Storyboard Designer workspace via File > Import > Storyboard Sample.

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 change in value of a Storyboard variable. This is exactly the same technique that is used for translated text, the difference of course being that rather than changing text string values, the changes are to the font name or point size or numeric property of a control.