简体   繁体   中英

Inflection - German rules (Rails or others)

What are the best Rails inflection rules for the German language out there? Examples from other languages to be ported would be great, too.

In my experience looking for a complete set of German inflection rules is hopeless. Even the default ones (English) are incomplete.

Here's what I do in my Rails applications.

  • Only use pluralize and Co. for code identifiers.
  • For model names (and all "user facing" strings) use the I18n API even if there's only one language.

Configuring the I18n stuff is slightly more work to set up, on the other hand your code is no longer cluttered with end-user messages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM