Create a webpage with Multilanguage in PHP

后端 未结 10 2108
醉话见心
醉话见心 2020-12-11 09:37

I would like to develop a multilanguage page in PHP, for exemple english/german/japanese.. so when i click on german the page language will change to german, then i click en

10条回答
  •  再見小時候
    2020-12-11 10:02

    We use the http://php.net/manual/en/intro.gettext.php way. Works fine and we all worked already with http://www.gnu.org/software/gettext/manual/gettext.html in other projects (non PHP projects). So it was easy to start.

    I think the right way depends on who translates the text! If it's the developer(s) you can have for each language an own view. But if you have some other people translating the text, something like gettext (translation is in a dedicated file and there are tools to work with this kind of files) the right choice!

提交回复
热议问题