User | Kudos |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
I know that this idea exists, but it was submitted in 2009 and I haven't seen any progress in this area. The bottom line is that we need a better way to support different languages in built applications. Importing/exporting strings is tedious and there is no good way to work with these files.
My suggestion is another attribute for every control which contains the name of a string in a language file. I've chosen to show it here similar to php, but any other way to denote that it's a localized string could be used, maybe a different color.
In this example, there would be a string with the name "control1" in each language file that gets loaded based on what language is selected.
There should also be a way to add a "free localized label" to the front panel and a "localized string constant" to the block diagram. This way you can use string names in labels and constants that will be replaced with localized strings from the current language file at run time.
The file could be simple xml:
<string name="control1"> <text>Input Number</text> </string>
<string name="fileNotFound">
<text>The file you selected does not exist</text>
</string>
<string name="okButton">
<text>OK</text>
</string>
An interface to edit language files could be as easy as a dialog box with a 2 column table containing string names and text.
One language file will be the default. The VI should be broken if the string name isn't found in this default file. When changing the language either by the OS default or a property of the application, all localized text is replaced with strings from the new language file. Any that aren't found fall back to the default file.
Most of this is based on the way Android programming handles localization, which makes it incredibly easy to implement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.