Many of the strings.xml in Andorid samples have <xliff:g> tags. Like what:
<stringname= "Countdown" ><xliff:g id= "Time" example= "5days>%1$s</xliff:g>until holiday </ String>. Where Xliff is the abbreviation for Xmllocalization Interchange File format, the Chinese name is XML localized data Interchange format.
Do not understand what the use, there are some articles on the internet, but also did not say clearly and do not have the label of the string is what the difference, it was specially researched.
The xliff:g tag is from the Android document Localizationchecklist (https://developer.android.com/intl/zh-cn/distribute/tools/ localization-checklist.html). There are said in the description:
Markmessage parts that should isn't be translated
Oftenstrings contain contain text that shouldn ' t is translated to other languages. Common examples might is a piece of code, a placeholder for a value, a specialsymbol, or a name. As you prepare-strings for translation, look for andmark text This should remain as-is, without translation, so that T Ranslatorsdon ' t change it.
Mark message parts that should not be translated
Sometimes strings contain text that should not be translated into other languages. Common examples include code, a placeholder for a value, a special symbol, or a name. When you are ready to translate a string, find and mark text that should be left intact without translation, so that the translator does not change the content.
To mark text that should not be translated, use the <xliff:g> placeholder tag. The following example markup ensures that the text "%1 $ s" will not be changed during translation (otherwise the message will be corrupted).
is not to see the above instructions are still confused, anyway, I think I looked and did not see the same. Only know is used to mark scenes that should not be translated. But what is not to be translated scenes, not clear.
So first mark the article, the role of 2:
1. Hope to have the understanding of this piece of the students to help solve doubts, in this expressed gratitude;
2. If you see the answer to the question later, update it back.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android <xliff:g> Puzzle