I am building apps for a non-english audience. Right now, I use english nouns to name my models, yet I prefer to use native dutch ones. As the convention uses the plural of the
In addition, as far as views are concerned my preferred way of dealing with pluralizing foreign strings is i18n pluralization. Take a look at a straightforward example below.
# config/locales/en.yml
en:
message:
one: You have 1 message #Your foreign string
other: You have %{count} messages #Your foreign string
Then in view you can do
# app/views/messages/index.html.erb
<%= t("message", count: current_user.messages.count) %>
Check official documentation.
Hope that helps!
This is not answering the question specifically, but if a language has too much irregularities one can disable the inflector according to the discussion.
ActiveRecord::Base.pluralize_table_names = false
Perhaps won't help you because you want Dutch language, but for Spanish, French, Kazakh, Turkish or Norwegian, there is this:
https://github.com/davidcelis/inflections
Add your rules to an inflections.rb file in config/initializers. See the API documentation:
ActiveSupport::Inflector.inflections do |inflect|
inflect.plural 'boek', 'boeken'
end