Most efficient way to do language file in PHP?

前端 未结 9 1875
日久生厌
日久生厌 2020-12-04 14:39

Questions Updated instead of making a new question...

I really want to provide a few alternative languages other then English on my social network s

9条回答
  •  萌比男神i
    2020-12-04 15:23

    Unfortunately gettext not work good and have problems in various situation like on different OS (Windows or Linux) and make it work is very difficult.

    In addition it require you set lot's of environment variables and domains and this not have any sense.

    If a developer want simply get the translation of a text he should only set the .mo file path and get the translation with one function like translate("hello","en_EN"); With gettext this is not possible.

提交回复
热议问题