Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
780 Weergaven

Hello,

for my users, I want to automate the process of importing a language file, which is otherwise done manually through Settings.

Therefore, I have the following questions:

  • How can I import a translation file using Python code from my custom module?
  • And how can I reload the corresponding language so that the changes take effect
Avatar
Annuleer
Auteur Beste antwoord

Тhank you very much I will test and will give feedback :) 


Edit:


When I tried to implement the code, I got the following error:


 ImportError: cannot import name '_trans_load_data' from 'odoo.tools.translate' (/home/odoo/src/odoo/odoo/tools/translate.py). 


Which version is this code for? I'm testing it on odoo.sh version 18.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
mei 25
1522
1
jul. 24
1686
2
mrt. 24
1796
1
jan. 24
4662
1
jun. 23
2182