Just like the title says. I am using Xcode 8.3, and when I go to export a .xliff, it's not including the stuff in the localizable.stringsdict
. I have selected the localizable.stringsdict
and opened the file inspector and hit the big Localize
button as well. That didn't seem to solve any problems. Does anyone have experience with this?

- 9,082
- 13
- 73
- 131
3 Answers
I'm not sure if XLIFF is even capable of representing the contents of a stringsdict, but even if it is, as you've discovered Xcode does not include your stringsdict in the XLIFF output. Every translation service I've looked in to supports stringsdict files directly, so your solution is to just upload the stringsdict files along with the XLIFF to your translation service.
That said, it does seem like an oversight that when you export localizations Xcode doesn't at least copy the stringsdict files into the exported localizations folder alongside the xliff files. I recommend you file a bug report with Apple asking for this.

- 182,031
- 33
- 381
- 347
-
Since Xcode 9 the stringsdict contents are present in the Xliff file. There has been some bugs through the years, but in Xcode 11 it works pretty much perfectly. Neither XLIFF 1.2, that most software still use, neither the newer XLIFF 2.0 standard, has any native support for plural representation. To preserve the stringsdict groupings in the export-import roundtrip, Xcode assigns a specially created xliff translation-unit id to those translations. – guru_meditator Jan 21 '20 at 04:39
It works in Xcode 9.2, but I experienced some issues.
Currently my project have Base
and sv
localization. When I added localizable.stringsdict
the content was not included in the XLIFF.
I then pressed Localize button, selected the only available language en
(I was expecting Base
here). Then I added sv
as localization and did Export for localization for sv
- Voilà, it worked.
But a strange thing here is that the sv
localization have en
as its original.
<file original="Resources/en.lproj/Localizable.stringsdict" source-language="en" datatype="plaintext" target-language="sv">
(I tried adding Base
as localization and remove the en
-version, but then the Localizable.stringsdict
s content was missing in the export)

- 650
- 7
- 15
-
_But a strange thing here is that the sv localization have en as its original._ That is normal, as _en_ is likely your Xcode project development language. When you import the xliff back to Xcode, the _en_ strings files are going to be updated as expected. The "Base" concept is for the storyboard/xib base localisation, not for the string files. The source-language and target-language in the xliff are always going to be standard BCP47 language tags. The software translators use to open the xliff file would not be able to recognise the source language if it was indicated as "Base". – guru_meditator Jan 21 '20 at 04:35
As of Xcode 14 it still seems to be not working. The Localizable.stringsdict file is indeed showing up in the xliff file but it is not represented correctly. Here's the plural rule defined in Localizable.stringsdict:
<key>Localized.numberOfPhotosSelected</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@VARIABLE@</string>
<key>VARIABLE</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>u</string>
<key>one</key>
<string>%u Photo selected</string>
<key>other</key>
<string>%u Photos selected</string>
</dict>
</dict>
And here's how it's showing up in the xliff:
<trans-unit id="/Localized.numberOfPhotosSelected:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
<source>%#@VARIABLE@</source>
<target>%#@VARIABLE@</target>
<note>This is the text of a label that shows the user how many photos have been selected. The key references a plural rule defined in the strings dictionary. The rule will respond to the actual number of photos and return the correct pluralization of 'photo'.</note>
</trans-unit>
<trans-unit id="/Localized.numberOfPhotosSelected:dict/VARIABLE:dict/other:dict/:string" xml:space="preserve">
<source>%u Photos selected</source>
<target>%u Photos selected</target>
<note>This is the text of a label that shows the user how many photos have been selected. The key references a plural rule defined in the strings dictionary. The rule will respond to the actual number of photos and return the correct pluralization of 'photo'.</note>
</trans-unit>
Notice that the "one" rule is not represented. guru_meditator's comment probably still holds true.
Thankfully we don't have too many so we'll just do the plurals manually.

- 8,454
- 4
- 47
- 48