How to load language with gettext in PHP?

后端 未结 2 1727
臣服心动
臣服心动 2021-01-01 03:06

I have created a language file in poedit for the use of the PHP gettext function, now on the page I am trying to test it on, I cannot get it to find/load the .po or .mo file

2条回答
  •  粉色の甜心
    2021-01-01 03:34

    I suspect it's your path.

    Is "/includes/locale" the correct directory on your host? Or is that relative to something? Note: you need the full pathname, not relative to your home directory or the install directory. so that might be something like:

    • C:/xampp/htdocs/include/locale
    • /var/www/include/locale
    • /home/username/include/locale
    • etc

    What is the full directory where it's found?

提交回复
热议问题