4.39. Internationalization

PyDADL offers a mechanism for translating the applications into different languages.

Let's assume you have a file named input_dialog.xml containing the following line :

d.name_label.setValue('Name')

You need to translate the string Name to french. Transform this line to:

d.name_label.setValue('@name@')

And create a file named input_dialog.xml.en in the same directory with the following content :

@name@
Name

For the french language, create a file named input_dialog.xml.fr in the same directory with the following content :

@name@
Nom

That's it. The user can change the application's language via the connect dialog (the first window shown when starting PyDADL client).

You can use the same mechanism to translate the XML-RPC function files.

For the moment, there are only three languages supported : en (English), fr (French) and ar (Arabic). If you want to add a new language, you have to :