TRICK: Localized form in a single view
Applies to: Microsoft Office InfoPath 2003 SP1
Need the same form in many languages? Here’s a trick that’s easier than multiple views.
By taking advantage of new SP1 features, there’s a simple way to create a multi-language view without duplicating bindings.
I have used a secondary data source with read-only borderless fields as labels for the view. This secondary data source is populated by an XML File Data Connection that grabs a file in the LabelsLanguage form library. This form lib populates a drop-dom, changes of this update the aux-dom and refresh the view.
There are 2 buttons for adding new languages and editing the current labels of the form. These pop up a second solution. To add a new language, just fill out the form and submit. Look at one of the existing languages for examples. If you see a typo in your language, feel free to correct it and save.
To work with button labels, manually update the view using xsl:value-of elements. Otherwise, use the workaround that I have in the screenshot.
- If you update a language on the fly, you need to force IE to always update the cache so you will get the drop-down changes.
- Some flashing when changing the language.
Here’s a sample of what it might look like: