简体   繁体   English

WordPress翻译

[英]WordPress translation

Often we see code like this: 我们经常看到这样的代码:

       __( 'Daily Archives: %s', 'twentyeleven' ), 

First argument is string to be translated, and the second is domain used. 第一个参数是要转换的字符串,第二个参数是使用的域。
What's the purpose of this? 目的是什么? Why does it need to be translated? 为什么需要翻译? And what's the outcome of the translation? 翻译的结果是什么?

This answer really should/could be a comment; 这个答案确实应该/可能是一个评论; all the information you need about WordPress Translations can be found in the codex, here . 您需要的有关WordPress翻译的所有信息都可以在此处的Codex中找到

What's the purpose of this? 目的是什么?

Internationalization and localization are terms used to describe the effort to make WordPress available in languages other than English, for people from different locales, who use different dialects and local preferences. 国际化和本地化是用于描述为使用不同的方言和本地偏爱的不同语言环境的人提供除英语以外的其他语言的WordPress的努力的术语。

Why it needs to be translated, and what is the outcome of the translation? 为什么需要翻译,翻译的结果是什么?
Reading the codex, and the above paragraph (from the codex), will answer this as well. 阅读抄本和上面的段落(从抄本中)也将回答这一问题。

But there is no need to translate it, it just adds to the users benefit to have translation/localizations available because not everyone speaks the same language. 但是没有必要翻译它,因为并非所有人都说相同的语言,这为用户增加了提供翻译/本地化的好处。
Many theme creators make it a standard practice to develop themes that are ready to be localized because it not only adds extra value to their theme, it is (relatively speaking) not that much extra work to do. 许多主题创建者将开发可本地化的主题作为一种标准做法,因为这不仅为其主题增加了额外的价值,而且(相对而言)没有太多的工作要做。


An added benefit is that you can easily change wording on your website without having to add or edit the code. 另一个好处是您可以轻松地在网站上更改措辞,而无需添加或编辑代码。 Or you can easily do things like making your website in 'Pirate'-language on national pirate day. 或者,您可以轻松地做一些事情,例如在全国海盗日以“海盗”语言制作网站。 Or pull pranks on the 1st of April by removing all vowels or something like that. 或者在4月1日通过删除所有元音或类似方式进行恶作剧。 - All of which are just a 'creative' (not necessarily intended) uses of translations. -所有这些只是翻译的“创造性”(不一定是预期的)用途。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM