what is the best method to build “multilingual” script in php?

后端 未结 7 1504
被撕碎了的回忆
被撕碎了的回忆 2020-12-16 04:13

I am building a website and it need to be in 7 languages? I was wondering if there is a good practice can be applied to get multilingual php script?

  • Easy for m
相关标签:
7条回答
  • 2020-12-16 05:00

    There are plenty of options for storing translations:

    • TMX: A relatively new XML format for translations. Seems to be gaining in popularity.
    • Gettext is another open format for translations. Been the de-facto standard for a long time.
    • ini files - easy to edit, very simple format
    • PHP files (arrays) - easy to edit for PHP programmers, good performance
    • CSV format - relatively simple to use.

    I'd suggest you use something like Zend_Translate which supports multiple adapters and provides a basic approach to embedding translations in your application.

    0 讨论(0)
提交回复
热议问题