Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6347235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:10:30+00:00 2026-05-24T21:10:30+00:00

I have been developing a .NET string formatting library to assist with localization of

  • 0

I have been developing a .NET string formatting library to assist with localization of an application. It’s called SmartFormat and is open-source on GitHub.

One of the issues it tries to address is Grammatical Numbers. This is also known as “singular and plural forms” or “conditional formatting”, and here’s a snippet of what it looks like in English:

var message = "There {0:is|are} {0} {0:item|items} remaining";

// You can use the Smart.Format method just like using String.Format:
var output = Smart.Format(CultureInfo.CurrentUICulture, message, items.Count);

The English rule, as I’m sure you know, is that there are 2 forms (singular and plural) that can apply to nouns, verbs, and adjectives. If the quantity is 1 then singular is used, otherwise the plural is used.

I am now trying to “broaden my horizons” by implementing the correct rules for other languages! I have come to understand that some languages can have up to 4 plural forms, and it takes some logic to determine the correct form. I would like to expand my code to accomodate multiple languages. For example, I’ve heard that Russian, Polish, and Turkish, have pretty different rules than English, so that might be a great starting point.

However, I only speak English and Spanish, so how can I determine the correct grammatical rules for many common languages?

Edit: I also would like to know some good non-English “test phrases” for my unit tests here: What are some good non-English phrases with singular and plural forms that can be used to test an internationalization and localization library?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:10:32+00:00Added an answer on May 24, 2026 at 9:10 pm

    Definitely, different languages have different pluralization rules. Especially interesting could be Arabic and Polish both of which contain quite a few plural forms.

    If you want to learn more about these rules, please visit Unicode Common Locale Data Repository, namely Language Plural Rules.

    There are quite a few interesting information there, unfortunately some of them are unfortunately wrong. I hope plural forms are correct (at least for Polish they are, as far as I could tell 🙂 ).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing an asp.net mvc application where i need to make large
I have been developing a web application with asp.net and I have smoe question
I have been developing an application in VS2010 and compiling it for the .NET
Recently, I was going through an open-source project and although I have been developing
I have been developing an application in asp.net mvc3. We have used models to
I have been developing an application for the last 12 months using VS2008, VB.NET(WPF)
I have been developing in asp.net since its existence (also classic asp before that)
I have been developing an app in VB.NET which requires a control object (for
I have been developing applications based on C# (.net) and Java (J2EE) for the
So I have been developing a small ASP.NET web app in C# for my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.