Reputation: 71
I want to know how to get the current loaded language translation in Odoo using python code.
For example, I'd like to determine if the loaded translation language is in Japanese.
Upvotes: 5
Views: 1464
Reputation: 83
I think you wanted to get the language of the loaded translation in odoo. I have also encountered this.
Use this
request.env.lang
Example:current_lang = request.env.lang
If the loaded language is in Japanese, the output is ja_JP.
Hope this helps!
Upvotes: 5