02-22-2012 02:43 AM
I have a question concerning the multilanguage support of LabVIEW applications:
We have an applcation which supports English and German language. The user can select the language by selecting the desired language from a menu item.
If the language has been changes, the program simply changes the "Language" entry in the applications ini file so that when the application is restarted, the language is set to the desired value.
This works without any problem, but now, we want to migrate the application to Windows 7 and in Windows 7 the "Program Files" folder is write protected, so that the ini file can not be changed.
Does anyone have any idea how we can solve this problem?
02-22-2012 02:53 AM
Change the code so that the INI file is saved where you do have write permissions. The file constants palette has a VI which returns the paths of system directories and you can use one of those (such the user app data folder).
If you don't want to modify the code, then you would need to install the program where you do have write permissions in 7 or change the permissions on that folder (both solutions which I wouldn't recommend).
02-22-2012 04:32 AM
Ok, but what about the localization of the LabVIEW defined strings (for example texts in the color picker or LabVIEW application menu items)? I localized these items with AppLanguage entry in the applications ini file and when I change the location of the ini file to UserAppDataFolder, it seems that the runtime does not use the AppLanguage entry of the ini file in UserAppDataFolder but the default language of windows (German in my case)
Any ideas to change the LabVIEW runtime language?
02-22-2012 05:13 AM - edited 02-22-2012 05:15 AM
02-22-2012 08:28 AM
Hi,
thank you for your answer. I checked your links but I'm still not sure how this can solve my problem. I want to change the language of the LabVIEW runtime and as far as I know, the only way to do this is to change the "AppLanguage" entry in the applications ini file.
Example:
I have an application called Application.exe. The application is located in the Folder C:\Program Files\Application\Application.exe.
I have an ini file in the same folder called Application.ini and in this ini file I have en entry AppLanguage = English. Now when I want to change the LabVIEW runtime language to, for example German, I change the AppLanguage entry to AppLanguage = German. The next time I start Application.exe, the runtime language is German.
So far so good, but as mentioned before, in Windows 7 I cannot change the ini file since Program Files is write protected.
Are the any other possibilities to change the LabVIEW runtime language from an Application?
02-23-2012 02:37 AM
Then don't use the Application.ini file!
Create another ini file and place it somewhere you have the necessary permissions to read and write it.
Christian
02-23-2012 03:16 AM
And how to change the runtime language?
02-23-2012 03:47 AM
I'm not sure what you mean with "runtime language", but the LabVIEW runtime engine, which is installed at your system can only be installed for one language in a specific version. In other words you cannot have the LabVIEW 2011 Runtime installed in german and english, so you cannot switch between german and english.
I assume that you didn't create the application you are talking about?
When creating an executable with LabVIEW which should support different languages you have to create a custom runtime menue for every language as well as translate the names of all frontpanel objects. Usually this will be saved in a custom ini file where you have a section for every language.
Christian