Skip to content

Instantly share code, notes, and snippets.

@floriankugler
Created February 2, 2014 12:49
Show Gist options
  • Save floriankugler/8767926 to your computer and use it in GitHub Desktop.
Save floriankugler/8767926 to your computer and use it in GitHub Desktop.
NSStringGenderRuleType example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>congratulate %@ to %d(his/her) birthday</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>Congratulate %@ to %#@pronoun@ birthday</string>
<key>pronoun</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringGenderRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>0</key>
<string>his</string>
<key>1</key>
<string>her</string>
</dict>
</dict>
</dict>
</plist>
@joshwoods
Copy link

This is pretty much the only thing on all of the internet that provides an example for NSStringGenderRuleType...I have filed feedback to Apple to hopefully get their documentation for localization/stringsdict updated. I suggest everyone else does the same! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment