Am I breaking any “php good practice” in the following php array which deals with 3 (human) languages?

后端 未结 6 1660
执笔经年
执笔经年 2021-01-03 10:47

This is the most optimal way of dealing with a multilingual website I can think of, right now (not sure) which doesn\'t involve gettext, zend_translate or any php plugin or

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-03 11:24

    One thing to watch for is interpolation; that's really the only place XSS could sneak in if your server settings are sensible. If you at any point need to do something along the lines of translating "$project->name has $project->member_count members", you'll have to make sure you escape all HTML that goes in there.

    But other than that, you should be fine.

提交回复
热议问题