Shortest way of determining a name ends with an `s`, `x` or `z`, and then use the `I18n.t` method wi
- by Koning Baard XIV
I'm creating a Rails application where users can have a first and last name. Since I'm a perfectionist, the application may not show something like Dennis's profile or Xianx's profile, but rather Dennis' profile and Xianx' profile. I use L18n, so I wanted to ask what is the shortest way of implementing this? This grammar is the same for both English and Dutch, where the application will be translated to.
Oh, some important things:
I am not afraid of using helpers and the application controller
My language files are in Ruby, not YAML
Thanks!