挪威语中的PHP gettext() [英] PHP gettext() in Norwegian

查看:70
本文介绍了挪威语中的PHP gettext()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PHP的gettext()来简单地将网站转换为其他语言.到目前为止,该解决方案工作正常(英语/匈牙利语),因为我需要将挪威语翻译添加到新站点.

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.

当我用setlocale(LC_ALL, "nb_NO.ISO8859-1"); gettext()设置挪威语区域设置时,仅返回基本字符串,而不返回已翻译的字符串.

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

这与我的操作系统的安装语言环境(en_US.UTF-8, hu_HU.UTF-8)有关,所以我也需要添加挪威语或其他引起这种情况的语言?

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?

感谢您的帮助, Fabrik

Thanks for your help, fabrik

推荐答案

是的,IIRC,您需要在系统上具有区域设置才能使其正常工作.

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

这篇关于挪威语中的PHP gettext()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆