Odoo is one of the best ERP available with the advanced translation tools. The language translation in Odoo is a feature to translate words, labels, and strings in our required language. i.e.; with Odoo we can easily translate text strings in one language to another language without any extra customizations. We can even use different languages for different users and also can convert website pages to different languages. In my new blog, I am going to explain how to enable this translation option in Odoo. Let's explore.
First, we have to install the required translation engine of the particular language. In order to install the language translation engine follow the steps.
Settings -> Translations -> Load a Translation
Click Load a Translation to select the language.
Once we selected a language from the drop-down Click the ‘Load’ button, the language will be installed in our Odoo ERP.
Next, we need to add a PO (Which contains the actual translation of the module) file for the language. Each of the languages has their own PO file with a name similar to their country code and a ‘.PO’ extension. Let's check the following steps to get the idea about creating a PO file for a particular language (here I am taking French (CA)).
Activate developer mode, to get the 'Import/Export' option in settings.
Then Go to Settings -> Import/Export -> Export Translation
In the Export Translation wizard, select the following
1. Language: For which you want to create PO file
2. File Formats: Select the file format as .PO
3. Apps to Export: Select the applications you want to translate
Then click the Export button.
After clicking the Export button, a new wizard will open and it will have a link to download the generated PO file. Download the PO file. Copy the downloaded file (here it is: fr_CA.po) and paste it inside the module in ‘i18n’ folder. If there is no folder in that name create one and paste.
The PO file contains two keywords
1. msgid :- contains the actual text.
2. msgstr:- contains the text you want to display for the translation.
Now it is ready and when a user chooses the French language he can see the translated text. Similarly, we can translate the text, label, words, strings etc. to your required language.
Like I mentioned earlier language translation is done in beautifully in Odoo ERP. And if you want to see the translated text, there is a translation icon in Odoo.
example, in Odoo Products form there is a translation Icon visible on ‘Product Name’
filed. You can view the translations of the field by clicking on translation