开发者

What's the best way to provide localization for PHP? [closed]

开发者 https://www.devze.com 2023-04-12 18:21 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何学C Closed 11 years ago.

I think Wordpress uses .mo files. What does this mean? Why?


Wordpress uses GNU gettext method of providing localized translations. This is a pretty common method, with support built in into PHP and many tools (such as poedit) are available to aid translators in working with this format.

Using this method usual means your translatable natural language is wrapped inside a _() function call, making it easy to extract for translation tools.


.mo files are gettext standard message files. I suggest you a thorough read of http://php.net/manual/en/book.gettext.php and other sources you can easily find googling about gettext.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号