Atlassian Lou Franco Mar 16, 2017

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

Critical Insight

Proper iOS internationalization requires abandoning simple one vs. not-one plural logic and implementing language-specific CLDR rules through frameworks like Smartling.i18n.

The article hints at chrome.i18n string interpolation techniques coming in a future installment that complement the pluralization approach.

About This Article

Problem

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.

Solution

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.

Impact

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.