Skip to content

Commit

Permalink
fixup! Update README with simpler syntax and update LICENSE date
Browse files Browse the repository at this point in the history
  • Loading branch information
erickguan committed Mar 5, 2024
1 parent a013064 commit ef63989
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ef63989

Please sign in to comment.