I ran into the same problem and I tried the links you provided. However, I could not get them to work. Finally, I came up with a solution:
1) add a new helper method in app/helpers/application_helper.rb
def ordinalize_number number case I18n.locale when :en return number.ordinalize when :'zh-TW' return number else return number end end
2) update your config/locales/*.yml (en.yml in this case)
end_quarter: 'End The %{order} Quarter'
3) use helper method with default i18n method in html.erb
<%= t('end_quarter', :order => ordinalize_number(3)) %>
Although I'm not sure if this is the best solution, it works without changing any environment settings.
source share