Skip to Content
Menú
This question has been flagged

Currently develop external ecommerce website for a customer, Is it possible to call "product.category" in other language in Odoo16. Since now there is only english and I already add more language on translation page.
What I do before with Product name is that adding "context": {"lang": "ko_KR"} to the code.

Avatar
Descartar
Best Answer

To display the "product.category" field in Korean (ko_KR), you can modify your code as follows:

category_name = product.category.display_name
translated_category_name = product.category.with_context(lang='ko_KR').display_name

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
d’abr. 23
2562
Odoo 16 Solved
1
de des. 22
4573
8
de gen. 25
7391
3
de març 24
3447
1
de febr. 24
3393