Page 1 of 1

French translation

Posted: 27 Mar 2015, 20:00
by Manikem
Hello !

I use newer version of CAD.Net v10 and i use the language files for translation, but it seems that buttons on the toolbar are not translated.
How to enable the french translation for the toolbar

Thank you.

Re: French translation

Posted: 30 Mar 2015, 21:13
by support
Hello,

In order to enable the French translation for the toolbar, copy the \bin\Languages\ folder to the folder with the executable (.exe) file of a demo application, run the application, then click ? -> Language -> French on the toolbar.


Mikhail

Re: French translation

Posted: 31 Mar 2015, 15:01
by Manikem
Hello

Is it possible to change the current language with coding, because in this window we have no menu ?

Then you.

Re: French translation

Posted: 01 Apr 2015, 17:37
by support
Hello,

It is possible to change a language from the code. There is the CADImport.FaceModule.MultipleLanguage class that allows to translate the application GUI to a language loaded from .lng file. The .lng files are bundled with the library and located in the \bin\Languages\ folder.

You should use the folowing properties and methods from the MultipleLanguage class:

MultipleLanguage.Path property sets a path to the directory with .lng files.

MultipleLanguage.LoadLNG() method loads a specified language file (French.lng, for instance) stored at the path that is set by the MultipleLanguage.Path property.

MultipleLanguage.RestoreLanguage() method translates all GUI texts into the default language:

Code: Select all

// 'this' is the application main form
mlng.RestoreLanguage(this.Controls, this.Menu);
MultipleLanguage.SetLanguage() method translates all GUI texts into a language specified by the MultipleLanguage.LoadLNG() method:

Code: Select all

// 'this' is the application main form
mlng.SetLanguage(this.Controls, this.Menu, this.Text);
Mikhail