PHP gettext() in Norwegian

2019-03-03 18:57发布

I'm using PHP's gettext() for simply transform a website to an other language. The solution worked fine (English/Hungarian) until now because i need to add a Norwegian translation to a new site.

When i set the Norwegian locale with setlocale(LC_ALL, "nb_NO.ISO8859-1"); gettext() only returns the base string not the translated one.

Is this related with my operating systems' installed locales (en_US.UTF-8, hu_HU.UTF-8) so i need to add the Norwegian one too or something else causing this?

Thanks for your help, fabrik

1条回答
戒情不戒烟
2楼-- · 2019-03-03 19:35

Yes, IIRC, you need to have locale on the system to make it work.

查看更多
登录 后发表回答