A Ruby implementation of ICU using CLDR to format dates, numbers, currencies, plurals, and more with full Unicode support.
TwitterCldr is a Ruby gem that implements the International Components for Unicode (ICU) using the Common Locale Data Repository (CLDR). It provides comprehensive tools for formatting dates, times, numbers, currencies, and handling plurals, transliteration, and text segmentation across multiple languages and locales. It solves the problem of building internationalized Ruby applications that need consistent, locale-aware text processing.
Ruby developers building applications with internationalization (i18n) and localization (l10n) requirements, especially those needing robust support for date/number formatting, plural rules, and Unicode text manipulation beyond basic Rails i18n.
Developers choose TwitterCldr for its deep integration with Unicode standards (CLDR/ICU), extensive locale support, and convenience features like patching core Ruby objects. It offers more comprehensive i18n capabilities than built-in Ruby or Rails i18n, with advanced features like collation, transliteration, and bidirectional text handling.
Ruby implementation of the ICU (International Components for Unicode) that uses the Common Locale Data Repository to format dates, plurals, and more.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Integrates CLDR data for authoritative formatting of dates, numbers, currencies, and handling plurals across numerous locales, ensuring compliance with international standards.
Patches core Ruby objects like Integer and Date with methods like .localize and .to_currency, making localization straightforward without deep API knowledge.
Offers features like text segmentation with ULI exceptions, collation for language-sensitive sorting, and transliteration between scripts, which are rare in other Ruby i18n libraries.
Supports a wide range of locales used on Twitter.com, with utilities for territory names, postal codes, and language codes conversion between standards like ISO-639 and BCP-47.
The collator does not pass all Unicode collation tests, and rule-based number formatting for decimals is limited in non-English languages, as noted in the README.
With features like bidirectional text handling and hyphenation using external data, setup and usage can be overwhelming for apps that only need basic i18n.
Relies on CLDR data snapshots, so new locale features or fixes require gem updates, and some features like telephone codes were deprecated and removed, limiting backward compatibility.