Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/CloudIngenium.com/htdocs/wp-includes/functions.php on line 6114
Pluralization Services – Knowledge eXchange

Pluralization Services

Recently as part of my work with the Entity Framework (EF) I came across a very interesting feature that could be leveraged in many other areas beyond the EF: The Pluralization Services. As you may be aware of, the EF has a feature that pluralizes the name of an entity when making entity sets. In order to pluralize the name it uses the Pluralization Services through which it figures what name to assign to the set.

You can access the PluralizationService at the System.Data.Entity.Design.PluralizationServices namespace:

Pluralization4

Keep in mind this is an abstract class so you’ll need to use the static CreateService method on the class to access the different services. Thus far though the only culture implemented is: “en-us”.

If you want to see some examples on how to manually use this class as well as to how to add your own mappings (How you would like for a word to be pluralized) you can visit this page: Entity Framework 4.0: Pluralization

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.