Creazione di file di traduzione Qt
Progettate le applicazioni in modo che possano essere adattate a varie lingue e regioni senza modifiche ingegneristiche. Contrassegnate il testo dell'interfaccia utente come traducibile per creare i file TS (Translation Source) di Qt che lo contengono e avviate Qt Linguist per tradurre le stringhe.
Per aggiungere un nuovo file di traduzione al progetto:
- Andare in Project > Add New Item > Installed > Visual C++ > Qt > Qt Translation File.
- In Select a Language, selezionare una lingua dall'elenco delle lingue supportate. Utilizzate Search per filtrare una lingua specifica.

- In Save as, inserire un nome di file per il file di traduzione.
- Andate a Finish per creare il file e farlo elencare in Translation Files in Solution Explorer di Visual Studio.
- Fate clic con il pulsante destro del mouse sul file di traduzione per aprire un menu contestuale e andate a
lupdate. Trova le stringhe traducibili nei file sorgente, di intestazione e di interfaccia utente e genera o aggiorna i file TS.
Dopo aver tradotto il testo dell'interfaccia utente, andare su lrelease nel menu contestuale per creare file QM dai file TS. Il formato dei file QM è un formato binario compatto che l'applicazione localizzata utilizza per cercare le traduzioni.
Vedere anche Avvio di Qt Linguist, Aggiornamento dei file di traduzione Qt, Internazionalizzazione con Qt e ManualeQt Linguist .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.