如何在android翻译文件中添加注释
当我们把文件交给翻译人员时,我们发现评论信息非常有用。对于Android应用程序,是否有办法在strings.xml中为翻译人员添加评论消息如何在android翻译文件中添加注释,android,Android,当我们把文件交给翻译人员时,我们发现评论信息非常有用。对于Android应用程序,是否有办法在strings.xml中为翻译人员添加评论消息 // In the strings.xml <string name="hello___">Hello %1$s</string> 在Windows上,我们可以执行以下操作: // In the code, when we export the translation file to xliff, // The comments
// In the strings.xml
<string name="hello___">Hello %1$s</string>
在Windows上,我们可以执行以下操作:
// In the code, when we export the translation file to xliff,
// The comments in `NSLocalizedString` will be collected and inserted into the xliff file
NSString *greetingMessage = NSLocalizedString(@"hello__",
@"A simple greeting messsage, %@ will be replaced by user's name");
// In the Localizable.strings file
"hello__"="hello %@";
// In the Resources.resw file:
<data name="hello__" xml:space="preserve">
<value>Hello {0}</value>
<comment>{0} will be replace by user's name</comment>
</data>
//在Resources.resw文件中:
你好{0}
{0}将被用户名替换
对于Android应用程序,是否有办法在strings.xml中为翻译器添加注释消息
是,但它仍然需要是有效的XML文件:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- my comment for the translators go here... -->
<string name="string_name">text_string</string>
</resources>
文本字符串
对于Android应用程序,是否有办法在strings.xml中为翻译器添加注释消息
是,但它仍然需要是有效的XML文件:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- my comment for the translators go here... -->
<string name="string_name">text_string</string>
</resources>
文本字符串
try@quidproquo谢谢你的评论!而且它有效!试试@quidproquo谢谢你的评论!而且它有效!