diff --git a/README.md b/README.md index bafa29e..ac23c28 100644 --- a/README.md +++ b/README.md @@ -186,4 +186,17 @@ Example: ICU::Transliteration.transliterate('Traditional-Simplified', '沈從文') # => "沈从文" ``` +## Locale + +Examples: + +```ruby +locale = ICU::Locale.new('en-US') +locale.display_country('en-US') #=> "United States" +locale.display_language('es') #=> "inglés" +locale.display_name('es') #=> "inglés (Estados Unidos)" +locale.display_name_with_context('en-US', [:length_short]) #=> "English (US)" +locale.display_name_with_context('en-US', [:length_long]) #=> "English (United States)" +``` + [icu]: https://github.com/unicode-org/icu