Step 1: Create a .po File
File Location
Place your .po file in:
/your_module/i18n/es.po # choose the correst lang code
File Structure
A basic .po file should include:
Header (metadata)
Translation entries (msgid = original text, msgstr = translated text)
Example: es.po (Espanol Translations)
`
`
msgid ""
msgstr ""
"Project-Id-Version: Your Module 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-10 12:00+0000\n"
"PO-Revision-Date: 2025-07-10 12:00+0000\n"
"Last-Translator: Your Name email@example.com\n"
"Language-Team: Espanolteam@example.com\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
. module: your_module
: model_terms:ir.ui.view,arch_db:your_module.your_view_id
msgid "Customer"
msgstr "cliente"
`
`
**Step 2: Ensure Your Template Uses Translatable Text
**Option 1: Simple Text (Auto-translated)
Customer
**Step 3: Update & Load Translations
**1. Update Your Module
./odoo-bin -d your_db -u your_module --stop-after-init
- Force Reload Translations (If Needed) ./odoo-bin -d your_db -u your_module --i18n-overwrite --stop-after-init
**Common Issues & Fixes
**Issue Solution
Translations not loading Ensure .po file is in /i18n/ and module is updated
Case mismatch (e.g., Amount vs. AMOUNT) Make sure msgid matches exactly
Missing view reference Add model_terms:ir.ui.view in .po file