DesktopTranslator is a free desktop application that translates text and text files on your own computer. It uses CTranslate2 for fast translation and SentencePiece for subwording, so once you have a model, you do not need an Internet connection. This post shows how to install it, how to use it with different translation models, and how to build your own installer.

- The source language is detected, and each sentence is translated on its own, keeping your paragraphs
- The translation appears as it is made, and you can cancel and keep what is done
- Long files are translated in the background with File menu > Translate Document…
- Right-to-left languages such as Arabic are edited right to left, and the app follows the dark mode of your system
- Installers for Windows and macOS, or run it from source
The code is open source under the MIT license.
Download
- DesktopTranslator comes with a Windows installer and a macOS app and you can download the latest version here.
- Models for NLLB-200 and M2M-100 can be downloaded from the repository.
Translation Models
DesktopTranslator needs two things, a CTranslate2 model and a SentencePiece subwording model. If you have a model for OpenNMT-py, OpenNMT-tf, or FairSeq, you can convert it to the CTranslate2 format.
To translate with a bilingual model, follow these steps.
- In DesktopTranslator, click the Open Model button and select the folder of the converted model. The SentencePiece model of the source language is expected to be in the same folder as the model itself.
- In the left text area, type some text, or use the File menu and then Open... to open a
.txtfile. - Click the Translate button.
NLLP-200 Multilingual Models
DesktopTranslator also supports NLLB-200 of different sizes (600M, 1.3B, and 3.3B), which allows translation between 200 languages.
M2M-100 Multilingual Models
DesktopTranslator also supports M2M-100, a multilingual model that translates between 100 languages. Select the CTranslate2 model folder and the sentencepiece.model file of the M2M-100 model as above. Then choose the target language from the dropdown list. This step is specific to M2M-100, because it needs a language code prefix. For other models, keep the “None” option.
OPUS Models
Bilingual OPUS models can also be used, and they can be more efficient. Convert the model to the CTranslate2 format first, for example.
ct2-opus-mt-converter --model_dir opus_model_dir --output_dir ct2_model_dir --quantization int8
The source and target SentencePiece models are in the same archive as the downloaded OPUS model.
See Also
- Web Interface for Machine Translation, a browser-based translator built with CTranslate2 and Streamlit
- CTranslate-NMT-Web-Interface, the code for a CTranslate2 web interface
References
- Efficient and High-Quality Neural Machine Translation with OpenNMT, Klein et al., 2020
- Beyond English-Centric Multilingual Machine Translation, Fan et al., 2020
- No Language Left Behind: Scaling Human-Centered Machine Translation, Costa-jussà et al., 2022