[英]What does printf (_(“hello, world\n”)) mean?
What's the role of the _("hello, world\\n") argument to printf/puts etc ? printf / puts等_(“hello,world \\ n”)参数的作用是什么? I often find it while reading GNU source code.
我经常在阅读GNU源代码时发现它。
请参阅GNU Gettext - it( _(...)
)用作翻译的“绑定站点”。
这是gettext国际化系统。
it is a macro that replaces the gettext translation function. 它是一个替换gettext转换函数的宏。 For a thorough explanation on gettext, check out this write-up: http://oriya.sarovar.org/docs/gettext_single.html
有关gettext的详细说明,请查看此文章: http : //oriya.sarovar.org/docs/gettext_single.html
The underscore function (or macro) is a custom function defined by whatever project you're looking at. 下划线函数(或宏)是由您正在查看的任何项目定义的自定义函数。 By convention, it's defined to send the string to GNU Gettext to fetch a translated version of the string for the user's current language.
按照惯例,它被定义为将字符串发送到GNU Gettext以获取用户当前语言的字符串的翻译版本。
This use of the _
macro is documented in the overview found in the GNU Gettext manual. GNU Gettext手册中的概述中记录了
_
宏的这种用法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.