开发者

Symfony translate database value before output

I have a table for 'alerts开发者_如何学Go'. I would like to store there the alerts for the users in Engligh, and translate the alert into the users' culture before showing it. Like an usual message which is translated with the __() function.

Is this thing possible in Symfony 1.4?


How many alerts do you have? Doubt that more than 100, no? It is normal to store stuff this size in xml translation files, anyway they are cached. And it is more simple to add new items in xml files than in database.


Should be no problem if you have messages.en.xml and messages.xx.xml which reflect the entries in the db. I haven't done it but I don't see why it should work ...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜