gettext大部分还是很不错的
只是有时候会出问题,没有翻译成相应的文字,而是现实原来的代码,
比如add_time对应的中文是“添加时间”
有时候会直接显示“add_time”,虽然影响不大,但是觉得很奇怪,是gettext机制不稳定吗?

解决方案 »

  1.   

    gettext
    (PHP 3 >= 3.0.7, PHP 4, PHP 5)gettext -- Lookup a message in the current domainDescription
    string gettext ( string message )
    This function returns a translated string if one is found in the translation table, or the submitted message if not found. You may use the underscore character '_' as an alias to this function. 
      

  2.   

    会缓存吧。你修改后重启过apache了吗?
      

  3.   

    5楼基本正解。修改过PO文件并编译为MO文件后,最好是重启一下apache,清除缓存就安了。