Sunday, 16 June 2019

Correct way to add translations to Odoo through .po files

Correct way to add translations to Odoo through .po files

Follow below steps:
1) Go to
Settings ‣ Translations ‣ Import / Export ‣ Export Translations
leave the language to the default (new language/empty template) # DO NOT CHANGE THIS
select the PO File format
select your module
click Export and download the file
2) Add your translation terms in the downloaded file. i.e. msgstr "" section depending on your translation language
3) change the filename to language_iso_code.po
e.g. for portugese => pt.po
4) create i18n folder under your module and add po file in it.
5) restart Odoo
6) Go to:
Settings ‣ Translations ‣ Load a Translation
select translation language (in my eg. Portugese)
make sure you check this : Overwrite Existing Terms
click LOAD.

***********


Done