Dynamic Language Switching

Previous Next

Dynamic language switching is the ability of an end user to switch the application language during a session, as opposed to the language being static and determined beforehand by a Rules Service parameter or USoft Binder Project setting. In web applications especially, it is customary to offer this as a feature, for example in the form of country flags, as in this example from a web page header bar:


The USoft platform does not offer complete automation of dynamic language switching at this time. One solution direction for web application UIs is to treat System Message texts and Application String texts not as simple literals, but as HTML fragments. This way, you make texts in multiple languages available to JavaScript code where you can implement dynamic language switching programmatically.

In this approach, in USoft Definer, you could have a System Message such as:

Invalid domain definition (<Address>) for "<WidgetName>".


and have a localised variant (in table T_SYS_MSG_LNG, System Local Messages) tagged to a Language called "MULTI" that is the following HTML fragment:


  <en-GB>Invalid domain definition (<Address>) for "<WidgetName>".</en-GB>

  <nl-NL>Ongeldige domeindefinitie (<Address>) voor "<WidgetName>".</nl-NL>



You can also apply this format in Web Designer to the values of field prompts (Prompt property of text boxes) and other text-based GUI elements.


See Also

Application Strings and System Messages

Translating Application Strings

Translating System Messages