LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatisation de localui

Bonjour,

J'utilise localui sous CVI7 pour traduire les écrans dans plusieurs langues et ça marche bien, mais c'est très long à faire quand il y a beaucoup de fichiers.

Quelqu'un a't'il les sources du progarmme LOCALUI ou les détails du fichier LWL à générer (notament la clé "Flags") pour que je puisse automatiser les traductions ?

Merci de votre aide.

Didier

0 Kudos
Message 1 of 8
(3,792 Views)

 


 

Translation from french

 

Hello

I use to translate localui under CVI7 screens in several languages and it works well, but it is very long to do when there's a lot of files.

Someone a't'il sources of programming your LOCALUI or file details LWL to generate (In particular with the key "Flags") so that I can automate the translation?

Thank you for your help.

Didier


 

French board

0 Kudos
Message 2 of 8
(3,758 Views)

A partial solution to this question can be the use of dictionaries. This is the help description of dictionaries:

 

In addition to saving language resource files, you can save and import dictionary files (*.lwd).  A dictionary

file is simply a list of local and default language string pairs.  The dictionary file has no affiliation with any
particular file, so you can apply it to any uir or tui file.

 

So you can build up your dictionary step by step and apply it to every UIR file you want: strings / labels with an entry in the dictionary are automatically replaced by the corresponding translation. In case there are more entryes int he dictionary that correspond to some label you are prompted by a panel to choose which of them applies to some particular label in your panels.

 

 

 

 

PS Thanks muks for the translation and for the link to the french board.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 8
(3,747 Views)

I already use the dictionary as you indicated.
The problem is that my application has many files UIR and it is translated into five languages today.
At each change I use the "CVI GUI Localization Utility" to manually redo all the files associated LWL in each language.
I seek to make a program that automatically creates LWL files from a list of UIR files and a dictionary (LWD).
The source code of the utility would have really helped me, but I'm well underway.
Thank you

0 Kudos
Message 4 of 8
(3,737 Views)

Hi,

 

your post is quite old, but I'm currently having some problems like you, with a big workspace, many dll's and many languages. I'm busy to create a tool to do this work automatically. The remaining problem will be to create lwl-files with software (not control LocalUI.exe with "SendKeys"). (already working is the automaic creation of lwd-files with help of google translater).

 

Do you have any descriptions about the lwl definitions (meaning of "Type" or "Flags" in lwl-file?

 

Thanks

 

Peter

0 Kudos
Message 5 of 8
(3,498 Views)

Hi Peter,

 

 NI has not given me any information, So I tested each control to see the impact on the file LWL.
I cannot give you all the work I've done in the workplace, but here's some info:
The "Type" is a classification of controls (from 1 to 10). Make a switch/case from GetCtrlAttribute (,, ATTR_CTRL_STYLE,)

The "Flags" is more complex: it indicates the number of translations for each control and its length varies. Each translated text takes a value "f", otherwise "e". Furthermore these values ​​are grouped by 3 and preceded "E" if there are 3 values, "D" if any two, or "@" if there is only one.
Consideration must be given for each control of all fields appendices, that I ordered as test file.
My program has 1000 lines and was developed / tested on CVI7.1.
I hope this will get you started.

Regards

 

Didier

0 Kudos
Message 6 of 8
(3,482 Views)

Hi Didier,

 

ok, tahnks for the info. Perhaps some time we had an intern to reverse engineer the lwl... I guess in the meantime I will remote control the originalLocalUI.exe with windows messaging.

My programm do already handle creation of lw, so localUI has no more work to do, just "open uir", "import LWD" and "export lwl"...

 

Peter

0 Kudos
Message 7 of 8
(3,474 Views)

Hi Peter,

 

Just a note to say that if you want the help of the whole community, you must create a new topic

thank you

0 Kudos
Message 8 of 8
(3,468 Views)