コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
788 ビュー

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
アバター
破棄
著作者 最善の回答

Т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.

アバター
破棄
関連投稿 返信 ビュー 活動
3
5月 25
1526
1
7月 24
1688
2
3月 24
1805
1
1月 24
4666
1
6月 23
2182