iOS Internationalization: Handling Plurals
Article Summary
Lou Franco from Atlassian admits he spent decades writing plural-unfriendly strings because Brian Kernighan tricked him. Now, scaling Trello to 21 languages forced him to confront a hard truth: English pluralization is embarrassingly simple compared to most languages.
When Trello expanded beyond European languages into Russian and Czech, the classic "item(s)" hack stopped working. Franco shares how Atlassian tackled iOS internationalization using Unicode's CLDR pluralization rules, which define six categories (zero, one, two, few, many, other) that different languages use in wildly different ways.
Key Takeaways
- Russian pluralization rules are harder than FizzBuzz (involves mod 10 and mod 100 calculations)
- English uses only 2 plural categories while other languages need up to 6
- Smartling.i18n framework implements CLDR rules with special string key suffixes
- Trello added custom 'zero' category for better UX despite English not requiring it
Proper iOS internationalization requires abandoning simple one vs. not-one plural logic and implementing language-specific CLDR rules through frameworks like Smartling.i18n.
About This Article
When Trello expanded to 21 languages, the team discovered that English's simple plural rule (one vs. other) doesn't work in most languages. Russian, Czech, Chinese and others all have different requirements. Lou Franco's team had to build language-specific rules to handle this.
Atlassian turned to the Unicode Common Locale Data Repository, which defines six plural categories: zero, one, two, few, many, and other. They integrated Smartling.i18n, an iOS framework that uses special string key suffixes like 'member_count##{few}' to match numbers to the right plural form.
Trello now handles plurals correctly across 21 languages by including all six CLDR categories in Localizable.strings. The team even added a custom 'zero' category for better user experience, even though English doesn't need it. This approach makes the system easier to update if localization needs change later.