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 6980531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:01:59+00:00 2026-05-27T18:01:59+00:00

Paging Jay Querido… Downloaded the Pluralizer NuGet package. My goal is to display a

  • 0

Paging Jay Querido…

Downloaded the Pluralizer NuGet package. My goal is to display a string like so:

X contracts with Y partners in Z countries

If X is 1, word should change to contract. If Z is 1, word should change to country. Same for 1 partner.

The following does not work. It always results in TotalContracts being the same number for the whole sentence.

@Html.Pluralize("{_} {contract} with {_} {partner} in {_} {country}",
    Model.TotalContracts, Model.TotalPartners, Model.TotalCountries)
@* result is X contracts with X partners in X countries *@

The following does work, but is not quite as readable. Is there a better way?

@Html.Pluralize("{_} {contract}", Model.TotalContracts) with
@Html.Pluralize("{_} {partner}", Model.TotalPartners.Count) in
@Html.Pluralize("{_} {country}", Model.TotalCountries)
  • 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-27T18:02:00+00:00Added an answer on May 27, 2026 at 6:02 pm

    It looks like my comment obscured an underscore. This works with a single call to Pluralize:

    @Html.Pluralize("{0|_} {0|contract} with {1|_} {1|partner} in {2|_} {country}",
        Model.TotalContracts, Model.TotalPartners, Model.TotalCountries)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use a paging system like this: <?php $p = $_GET['p']; switch($p) { case
I just want the paging like the google adsense. Means paging using the ajax..
I have developed a paging control that I would like to use in a
i'm paging countries in an alfabet, so countries starting A-D, E-H etc. But i
I have a paging menu PartialView in my MVC app that looks like: <%
When I use CakePHP Paging I get an url like this: http://example.com/php/page:2 What do
I'm having some paging issues when I wan't to display the next page with
I wrote paging logic: My requirement: total elements to display:100 per page,if i click
I have: 1 paging scroll view at the bottom (like a panel) that is
How do get the paging functionality (like we have in asp.net gridview) in Listview

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.