新手问题 如何将数据库表中状态字段,在界面上中文显示.

sec · October 28, 2016 · Last by sec replied at October 30, 2016 · 1668 hits
STATUSES = {failed: "未通过", passed: "通过", pending: "审核"}

数据库中存储的为:failed,passed,pending,想要实现效果为:未通过,通过,审核..#中文显示

STATUS = {key: value}.invert

可以用 i18n。。。。

sec closed this topic. 30 Oct 22:25
sec reopened this topic. 30 Oct 22:25
sec closed this topic. 30 Oct 22:26
You need to Sign in before reply, if you don't have an account, please Sign up first.