Changes between Version 2 and Version 3 of DeveloperGuidelines/Internationalisation
- Timestamp:
- 07/29/09 00:16:25 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Internationalisation
v2 v3 12 12 To make dropdown options localisable, use this pattern: 13 13 {{{ 14 db[table][field].requires = IS_IN_SET({'1':T('Option1'), '2':T('Option2')}) 14 table_field_opts = {'1':T('Option1'), '2':T('Option2')} 15 db[table][field].requires = IS_IN_SET(table_field_opts) 16 db[table][field].represent = lambda opt: table_field_opts[opt] 15 17 }}} 16 18