I have an Error message that needs to be displayed in Spanish using internationalization but the internalization does not seem to work for osv.except_osv
raise osv.except_osv(('Warning'), (' First name is Mandatory ') )
How do I solve this issue ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have an Error message that needs to be displayed in Spanish using internationalization but the internalization does not seem to work for osv.except_osv
raise osv.except_osv(('Warning'), (' First name is Mandatory ') )
How do I solve this issue ?
It is easy like that...
Import the method:
from openerp.tools.translate import _
And use the method to make your python text translateable...
raise osv.except_osv(_('Warning'), _(' First name is Mandatory ') )
That's it!
| 相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
|---|---|---|---|---|
|
0
6月 16
|
5990 | |||
|
3
12月 15
|
1367 | |||
|
0
3月 15
|
4279 | |||
|
0
2月 19
|
6056 | |||
|
0
8月 15
|
4388 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.