Jump to content
MikeLV

Multi languages GUI

Recommended Posts

I need to be able to display any languages on my GUI for the controls.

It doesn't need to be switchable on the fly, but only when the program starts.

The test program I wrote just reads a .txt file, line by line and fill in the controls (I use the captions).

If my text is English, no problem. But if I use French for example, all the characters are displayed exept the characters with an accent. (replaced by Ã© for example).

I already read some documentation on the NI site, but they focus on the export function, which is not usefull for me.

Can someone direct me toward a document, or tell me why the accents are not displayed. (I will also need to do other languages).

Thanks.

 

 

Share this post


Link to post
Share on other sites

First thing, you need to add an INI token to LabVIEW.ini file, so you can display Unicode in LabVIEW.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kJRNSA2&l=en-CA

That allows to at least display the characters when copied on the front panel or block diagram (instead of showing up as a "?"). However it does not work with the caption text unless your OS environment supports the language pack. As you can see below, my OS has French and English installed, but not Chinese or Cyrillic characters. I can display the unicodes when I paste directly from a source, so you can try it on a virtual machine with the proper regional settings, and that should work.

 

** Edit: there is probably another step missing, because I can't get it to show up on my VM with a Russian keyboard installed...

** Edit #2: OK, it works. Turns out that the cyrillic character I had copied from google was not part of the Russian keyboard. I have no way to tell :-). But now it works with another character generated from the russian keyboard itself: "ф".

image.png.f586743c96d36aaf9cca8fca0f7161d0.png

image.png

Edited by Francois Normandin
  • Like 1

Share this post


Link to post
Share on other sites
On 3/12/2020 at 7:10 PM, Francois Normandin said:

First thing, you need to add an INI token to LabVIEW.ini file, so you can display Unicode in LabVIEW.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kJRNSA2&l=en-CA

That allows to at least display the characters when copied on the front panel or block diagram (instead of showing up as a "?"). However it does not work with the caption text unless your OS environment supports the language pack. As you can see below, my OS has French and English installed, but not Chinese or Cyrillic characters. I can display the unicodes when I paste directly from a source, so you can try it on a virtual machine with the proper regional settings, and that should work.

 

** Edit: there is probably another step missing, because I can't get it to show up on my VM with a Russian keyboard installed...

** Edit #2: OK, it works. Turns out that the cyrillic character I had copied from google was not part of the Russian keyboard. I have no way to tell :-). But now it works with another character generated from the russian keyboard itself: "ф".

image.png.f586743c96d36aaf9cca8fca0f7161d0.png

image.png

 

 

 

Thanks Francois for the reply.

The way you do it is also working on my side.

 

What I have problem with, is reading the french (or other languages) from a text file and display it to a caption.

Can you try to see if reading a french text file works on your side. Thanks.

 

 

capture1.PNG

Capture2.PNG

Share this post


Link to post
Share on other sites

When I write the file manually in a text editor and I open it, I get "Démarrer", but if I specifically change the encoding of the file to be "ISO 8859-15", I can read it correctly in LabVIEW. 

image.png.cc16aa53ecaddd76c5db107e1d97f05e.png

Alternatively, any file saved by LabVIEW'S Write to File method can be read correctly as well.

I don't know if it works for other languages. My OS is french, so at least that's working for me.

Share this post


Link to post
Share on other sites

Use the NI Tool.

One property node is not enough.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.