1

I have developed a custom module, using English for all the records.

I want to include a localized translation file for a local language (which happens to be Spanish).

I have learnt here in the Odoo doc that I need to export a .PO file using "New Language (Empty translation template)".

  1. I can read the .PO file and understand where do I have the translated files, but my question is, apart from the obvious translation part, how can you "tell" Odoo that you are adding a translation for Spanish?

  2. I understand that the .PO file must be put inside i18n folder in the module. But which name shall I gave to it for spanish?

  3. What shall be added to the file to tell "Odoo" it is a translation for Spanish?

Thanks,

underscore_d
  • 6,309
  • 3
  • 38
  • 64
M.E.
  • 4,955
  • 4
  • 49
  • 128

2 Answers2

1

You only need to rename your file to es.po and put it into your_module\i18n\es.po.

I hope this help you!

Dayana
  • 1,500
  • 1
  • 16
  • 29
0

After you rename your file to es.poand put it into your_module\i18n\es.po

  1. Go to -> Settings and active Deactivate the developer mode

  2. And go to Load a TranslationLoad a Translation and select Spanish and checked overwrite exisiting terms

Karara Mohamed
  • 923
  • 1
  • 6
  • 19
  • Why do I need to load the translation in the GUI? Is it not enough to (re)install the module? – M.E. Nov 03 '17 at 10:39
  • Because de language by default is English – Karara Mohamed Nov 03 '17 at 10:42
  • There is no need to load a translation as the module installs the translated (in this case spanish) language that will be automatically applied if user language matches. – M.E. Nov 06 '17 at 14:38