Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting plural strings for localization

I've defined pluralized strings using the .stringsdict format as referenced here.

I'm using XCode's "Editor > Export for Localization.." option to create XLIFF files suitable for translators and translation software, but the strings defined in Localizable.stringsdict don't get exported to the XLIFF file.

How is it possible to export these plural forms into the XLIFF format - get them translated - and import them back into the project?

I'm aware that XLIFF has no native plural markup, but the format is extensible so I don't see why it wouldn't be possible.

like image 354
Tim Avatar asked Jan 09 '15 21:01

Tim


1 Answers

Xcode automatically exports stringsdict (plural) strings only beginning in Xcode 9. I know, I know. Although stringsdict has been the way to do plurals in iOS and Mac for a few years now, Apple only half-heartedly supported it until Xcode 9. You can now also view stringsdict files in a format that makes them easier to read, including templates so you can add plurals with a couple of clicks. Xcode 9 and above can also view XLIFF files in a table format. Double-click on your XLIFF in Xcode to see. Before you’d just get the raw XML.

See here: https://www.ibabbleon.com/copywriter-translator/2017/06/whats-new-in-localization-in-xcode-9-ios-11/

like image 131
Localizer Avatar answered Nov 17 '22 05:11

Localizer