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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:07:02+00:00 2026-06-18T17:07:02+00:00

Take a sentence like this: I visited this place {0} {1} ago. While {0}

  • 0

Take a sentence like this:

"I visited this place {0} {1} ago."

While {0} stands for an integer, {1} is the word “year” or “years” respectively.
Now, in Russian, the word “year” is not just singular or plural, but depends on the exact number instead (год-года-лет). So, any rule just differentiating between “year” or “years” is insufficient for Russian.

Now, the information I need is this: is there any way to add rules in the resource bundle or in the source code, keeping the entire string, or do I have to split up the string into

"I visited this place {0} " + "{1} " + "ago."

… expanding the rule in the source code? How do you handle problems like this? Is there any best practice?

  • 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-06-18T17:07:03+00:00Added an answer on June 18, 2026 at 5:07 pm

    To some extent you already answered your question. You should not concatenate strings. Basically, placeholders could be used for numbers, dates and dynamic text.
    I would argue that the unit of measurement (time in this case) is not dynamic text.

    How can you resolve this problem?

    I’ll give you some basic blueprints of two ideas. Both require using full sentences.

    1. You can re-arrange the sentence, so that you don’t have the problems with plurality, i.e. “The place has been visited this number of years|months|days|hours|minutes ago: {0}”.
      This has obvious drawbacks and does not sound naturally. And although I can’t give you an example of language where this concept won’t work, there is a non-zero probability that such language exists (Slavic languages are not among them, that one is for sure.)

    2. Use some rules-based selection method to select valid plural form from resource files. To do that you need to know just a bit of Language Plural Rules. Basically, you can use these CLDR’s rules on your own or you can decide on something else, like wrapping ICU4C’s PluralRules class and use its select method to well, select valid plural form.
      The ICU Project site even lists existing wrappers that you can use in your C# application, namely GenICUWrapper and ICU-Dotnet.

    Personally, I’d recommend latter method (with ICU wrapper). You may want to see my answer regarding similar problem with solution in Java. I believe .Net’s would be based on the same idea, only you would use string.Format() instead of MessageFormat and you would read the resources in .Net’s way (whatever style you actually prefer).

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

Sidebar

Related Questions

I would like to take the words of a sentence, if that word has
I take a sentence as input like this: abcd 01234 87 01235 Next, I
I have a sentence like this (in Hebrew,RTL): ואמר was here אוראל Now, when
Take an input field like this : ​<input type='number' step='1' />​​​​​​​​​​​​​​​​​ In Chrome, you
I need a way to abbreviate a sentence. I would like to take at
So I want to take the words in a sentence and flip the word,
First, my objective with this code: take in a sentence into a C string.
I need to take a sentence in that is all on one line with
Take a look at this example here: http://denise.brixwork.com/showlisting/1/8297-Valley-Drive-Alpine-Meadows-Whistler-denise-brown-real-estate And the red tables under Specifications
Take a look at this: http://thebekker.dk/_skole/GFeksamen/ You can see the 2nd menu item show

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.