Interface translation *.ui

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Post Reply
pietro_72_
Full Member
Posts: 77
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

Interface translation *.ui

Post by pietro_72_ » Tue Sep 03, 2019 10:40 am

Hello

How do you translate an interface (for example: OrthogonalProjections.ui) from English to Italian or another language

User avatar
andrew
Site Admin
Posts: 6922
Joined: Fri Mar 30, 2007 6:07 am

Re: Interface translation *.ui

Post by andrew » Wed Sep 04, 2019 7:46 am

You can use Qt tools to create a TS (translation source file):

1. lupdate File.ui -ts File_it.ts
2. Translate file File_it.ts (e.g. using Qt Linguist)
3. lrelease File_it.ts
4. Load translation file in source code:

Code: Select all

var translator = new QTranslator(qApp);
if (translator.load("File_it", "path/to/translationfile")) {
    QCoreApplication.installTranslator(translator);
}

pietro_72_
Full Member
Posts: 77
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

Re: Interface translation *.ui

Post by pietro_72_ » Wed Sep 04, 2019 8:00 am

thank you

Post Reply

Return to “QCAD Developers and Contributors”