Do you have JKI Simple Localization questions, ideas, or challenges you'd like discuss? Join the conversation happening in the JKI Simple Localization Community Forum.
A very simple LabVIEW toolkit for localizing VI front panels, based on a dictionary translation file.
This toolkit makes use of the "Language for non-Unicode programs" setting in Windows (located in the "Region and Language" settings). The toolkit uses a JSON dictionary file (can be in Unicode format) to store phrases in several different languages. The toolkit will translate from the default language (typically English) to the target language specified as the "Language for non-Unicode programs" in Windows.
It does all this by making calls into the Windows API to translate the Unicode 16-bit characters from the dictionary into 8-bit non-unicode characters that can be displayed by non-Unicode program (assuming the "Language for non-Unicode programs" has been properly set in Windows).
In this way, LabVIEW developers have a simple way to localize their applications, even though LabVIEW does not support Unicode, out-of-the-box.
You can download and install JKI Simple Localization with VI Package Manager.
- LabVIEW 2017 or greater
- Windows 7 or greater
- VIPM 2017 or greater
IMPORTANT: For this library to work, you must first set the "Language for non-Unicode Programs" to the target language you wish to translate into. See instructions here
This library has just a handful of simple VIs required for use:
- Initialize - Loads a dictionary file.
- Set Language - Sets/changes the desired target language all registered VIs.
- Register VI - Registers a VI whose front panel will be localized to the target language any time Set Language is called.
- Set Language (By VI) - Sets/changes the desired target language of the VI without adding it to the registry.
- Get Localized Phrase - Allows translating a phrase from the default language to the target language, which is helpful for passing text in the default (programmers language) programmatically to dialogs (which should be displayed in the target/translated language).
- Get Languages - Gets all languages configured in the dictionary file.
- Generate Dictionary - Generates a dictionary file using the localizable text shown on the VIs in the current language. The file will need to be updated to include all additional languages.
NOTE: This library uses key value pairs to localize phrases. By default, control and indicator labels are used as the key to localize the caption, which should be shown instead of labels.
See the Localization Demo VI on the Functions >> JKI Tools >> JKI Simple Localization palette.
Run the VI and then choose a target language from the drop-down list.
English
Dutch
Chinese
The dictionary file uses JSON format to list the languages, font information for each language, and key-value pairs linking each key to a set or localized phrases in each language in the dictionary.
A formatted dictionary file can be generated from a VI front panel by going to Tools >> JKI Simple Localization Palette >> Localize This VI... See instructions here
If you encounter incorrect or undocumented behavior or would like to file a new feature request, you can do so by filing a new issue on GitHub. For paid customized support, please contact JKI.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
To contribute to JKI Simple Localization, you will need 32-bit LabVIEW 2017 professional development environment.
JKI Simple Localization is an open source project maintained by JKI.
JKI Simple Localization is distributed under the open source three clause BSD license providing everyone right to use and distribute both souce code and compiled versions of the software. See LICENSE.md file for details.