0

As documented here: https://developer.android.com/guide/topics/resources/localization#mark-message-parts

To mark text that should not be translated, use an placeholder tag. Here is an example tag that ensures the text "%1$s" isn't changed during translation (otherwise it could break the message):

I'm bit confused here. Since with the Translation Editor I always need to explicitly put the translation for every key. So I'm not getting what it means - tag that ensures the text isn't changed during translation

Could someone please help me understand?

Vivek
  • 11,938
  • 19
  • 92
  • 127

2 Answers2

1

If a developer works with translators they could translate some text the developer doesn't intend it to be translated, there comes the need for xliff tag.

1

Indeed, this is a localization specification. This comes handy when there are items like brand/product names (or even URLs, time stamps, date formats, currency formats, etc.) in the source text which should not be modified by any means in the target text. Here is an example:

Please use %s by the end of %d. You can find more details under chapter %d%.

If the translator (or their reviewer) omits, misplaces, or changes one of these placeholders, the localized text will be wrong. Please note that these placeholders are not random, so their relative position matters. That is, one should never use these placeholders interchangeably (e.g. "use %d%" instead of "use %s" in the example above), because each token refers to a specific entity.

yevangel
  • 11
  • 1
  • 1