Search code examples
ioslocalizationxcode6missing-dataxliff

Missing Strings from xib in XLIFF (Xcode Base Localization)


  • I am using base localization in Xcode 6 to handle localizing my app.
  • When I go to Editor > Export for Localization, Xcode is supposed to put all strings from all nibs into an XLIFF file that I then send to translators.
  • In a particular nib, I have about 5 labels. Only 1 of them is included in the XLIFF file.

Why would some strings be detected in the nib and not others?

[Update] I just noticed that the strings excluded are attributed strings. Why would Xcode ignore attributed strings? Surely there is a way to include them?


Solution

  • The strings were not included in the XLIFF, because they were attributed strings. It makes sense that Xcode would not automatically localize attributed strings, because different parts of the string may have different attributes. How is the translator to know which parts of the translated string get which attributes? This is not currently accounted for in the localization process.