开发者

Kohana 3 - How to I18n-ing Form fields that are populated by the database?

I have something like a contact-form in my Kohana 3 app. Now what the customer wants to have is a select-field which gives the customer the chance to sel开发者_如何学Goect his/her country. That could be pretty easy. But the customer wants to have control over the countries which are included. So I chose for the database-way to do it. I have a database table countries that has fields like code, title 'de', 'Germany'

Now I want these values to be i18n-ed in my form. Anyone knows the answer?


Ok I just figured out a solution. I figured out that the second parameter in an array (the value) doesn't need to be a string object. So I just made it an i18n kohana object. Now everything works as expected. Thanks anyway!

If you guys wanna see a code example. Just comment on my solution.

Also if you guys know a better solution. Comment my solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜