Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
1919 Widoki

I am writing a website module to mainly add new pages.

I am able to add pages, then translate them via the UI, and export the translations but I am unable to successfully use these files (PO) in my module so that I can use my module directly in a database without needing to re-translate the pages - they are always showing in English for both languages.

Does anyone have a sample module they can share?

Awatar
Odrzuć
Najlepsza odpowiedź

See my example online at https://github.com/ray-odoo/website_module_translated


To use:

1) Create a new database

2) Install the Website App

3) Visit Website --> Configuration --> Settings

     A) Install the Spanish language (Spanish / Español)

     B) Add Spanish to the list of Website Languages


    

4) Install the Sample Theme

Awatar
Odrzuć
Najlepsza odpowiedź

You can use this app to translate your web pages, blogs and slides
to all active languages: https://apps.odoo.com/apps/modules/18.0/website_aitrans
You can automate this to start updating (looking for changes) every minute.
It uses AI calls and the provider runs a cost free service if you don't have your own LLM providers and keys.

Awatar
Odrzuć
Najlepsza odpowiedź

If you're building a website module and want the pages to appear translated immediately after installation (without re-translating through the UI), the key is to include properly formatted .po files inside your module’s i18n folder. These translations must match the source strings exactly (e.g. text in QWeb templates or controllers).

To assist during development, the modules AI Auto Translation and AI Auto Translation PRO can help automate the translation of all translatable elements within Odoo — including QWeb views, HTML content, labels, menus, and custom fields.

  • AI Auto Translation provides basic one-click translation for selected fields.
  • AI Auto Translation PRO offers full automation, contextual prompts, HTML-safe output (useful for QWeb), and status tracking for translations.

They can be useful for generating .po files quickly and consistently across multiple languages, especially during module development.

Both are available for Odoo 16, 17, and 18.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lut 25
1204
1
sty 25
2096
0
lis 24
1193
1
lip 24
4660
1
mar 15
3968