Is there any algorithm in c# to singularize - pluralize a word?

前端 未结 11 1825
臣服心动
臣服心动 2020-12-07 10:55

Is there any algorithm in c# to singularize - pluralize a word (in english) or does exist a .net library to do this (may be also in different languages)?

11条回答
  •  萌比男神i
    2020-12-07 11:37

    Using Microsoft's Northwind example database:

     System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(new System.Globalization.CultureInfo("en-US"));
    

    Singularize does not Singularize "Order_Details" It returns "Order_Details" with the s at the end. What is the work around?

提交回复
热议问题