Simply returning vocative for first names used in Czech Republic
Add this line to your application's Gemfile:
gem 'czech_names_vocative'
And then execute:
$ bundle
Or install it yourself as:
$ gem install czech_names_vocative
"Josef".vocative #=> "Josefe"
"Petr".vocative #=> "Petře"
"NonExistingName".vocative! #=> nil
"Josef".vocative! #=> "Josefe"
"Petr".vocative! #=> "Petře"
"NonExistingName".vocative! #=> "NonExistingName"
There can be names which have different vocative for female and male variant (e.g. Dagmar), gem will simply returns the last one in db.
Thanks for database to validace.cz http://blog.trixi.cz/2012/08/5-pady-vsech-jmen-osob-v-cr-volne-ke-stazeni/
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request