Skip to Content
मेन्यू
This question has been flagged
2 Replies
801 Views

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
Discard
Author Best Answer

Т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
Discard
Related Posts Replies Views Activity
3
मई 25
1528
1
जुल॰ 24
1693
2
मार्च 24
1811
1
जन॰ 24
4677
1
जून 23
2182