Pluralize stands for an automate script process, that checks a word (for example, english word "box") and adds its plural end "es", so it comes "boxes", when it is needed to be plural. Term is used in many programming languages.
Questions tagged [pluralize]
146 questions
20
votes
4 answers
How to pluralize a name in a template with jinja2?
If I have a template variable called num_countries, to pluralize with Django I could just write something like this:
countr{{ num_countries|pluralize:"y,ies" }}
Is there a way to do something like this with jinja2? (I do know this doesn't work in…

craftApprentice
- 2,697
- 17
- 58
- 86
16
votes
3 answers
String parameter in pluralized NSLocalizedString
I want to translate the string %@ there are up to %i sun hours with proper pluralization.
%@ contains a day, %i the sun hours.
This is my Localizable.stringsdict file:

Cornelius
- 4,214
- 3
- 36
- 55
16
votes
2 answers
Xcode, Swift: how to add multi-language support in an iOS app and have strings with placeholders and plurals?
I need to add multi-language support in an iOS app that is written in Xcode using Swift. I need to localize
Static strings
Strings with placeholders
plurals (quantity-strings)
Such as below in Android we add named strings and plurals in XML…

AamirR
- 11,672
- 4
- 59
- 73
15
votes
3 answers
How to pluralize and format a number in angularjs
I want to do format a number and pluralize it with angular.
For example (given a number of bitcoins):
0 => "John has no bitcoins"
1 => "John has 1 bitcoin"
2 => "John has 2 bitcoins"
12345.6789 => "John has 12,345.67…

Benjamin Crouzier
- 40,265
- 44
- 171
- 236
14
votes
2 answers
Why was Relational() extention method removed in .net core 3?
The EF Core 2.0 had an extension method called Relational in the IMutableEntityTypeinterface.
Pluralizer pluralizer = new Pluralizer();
foreach (IMutableEntityType entityType in modelBuilder.Model.GetEntityTypes())
{
string tableName =…

Hamed Hajiloo
- 964
- 1
- 10
- 31
14
votes
3 answers
Android Pluralization not working, need help
I've been attempting to utilize the plurals resource with Android but have not had any luck.
Here is my resource file for my plurals:
…

celestialorb
- 1,901
- 7
- 29
- 50
13
votes
1 answer
undefined method pluralize for main:Object
I'm trying to test a method in my console, but even the basic pluralize -
pluralize(1, 'person')
wont work..
Output:
NoMethodError: undefined method 'pluralize' for main:Object
from (pry):42:in ''
but helper.method(:pluralize) shows me :…

Mini John
- 7,855
- 9
- 59
- 108
12
votes
3 answers
Pluralization in laravel blade @lang() localization?
Laravel 5 provides translations using the @lang helper
@lang('some text')
Laravel 5 also has the possibility to pluralize strings depending on a variable.
// file: controller.php
echo…

Hendrik Jan
- 4,396
- 8
- 39
- 75
12
votes
1 answer
Ruby on Rails ActiveRecord: pluralization
I'm new to Rails, so forgive my ignorance of ActiveRecord. One of my models is named "campus". I ran the migration and it pluralized everything except "campus".
I thought that was lame so I added the code to the environment config to leave…

Donald Hughes
- 6,627
- 8
- 35
- 46
10
votes
1 answer
PluralizationServices changing Status to Statu
We have a T4 template using System.Data.Entity.Design.PluralizationServices to handle table names for some model generation.
When we run a table with Status in the name, such as CompanyStatus, the Singularize method returns CompanyStatu. I have some…

M Kenyon II
- 4,136
- 4
- 46
- 94
10
votes
3 answers
Ruby on Rails: how to check pluralized and single form of names
I have created a model Anonymous with command
rails g model Anonymous section_id:integer aid:string fake:bool active:bool
but table name in the migration is called anonymous
class CreateAnonymous < ActiveRecord::Migration
def change
…

s9gf4ult
- 862
- 6
- 20
9
votes
2 answers
Formatted pluralize
I have a case where I need to use pluralize to properly spell something. However, I need to render the html like so:
1 thing
or,
3 things
I could write a helper method, but I'm just making sure there isn't something in…

Tim Sullivan
- 16,808
- 11
- 74
- 120
9
votes
3 answers
How to pluralize a symbol in Ruby (on Rails)?
This works, but looks a little bit ugly:
s = :shop
s.to_s.pluralize.to_sym # => :shops
Is there a nicer way to pluralize a Symbol ?

Misha Moroshko
- 166,356
- 226
- 505
- 746
9
votes
3 answers
Howto customize pluralisation for Entity Framework 5
As my database was designed using german table- and column names, the default pluralisation feature of entity framework doesn't work for me.
I have found a couple of resources where this is discussed, but none of them seem to work.
What i have…

Gerwald
- 1,549
- 2
- 18
- 42
7
votes
1 answer
Manage Plural / gender in localization on flutter using json
I'm developing a mobile application using flutter / dart.
The app needs to be localized using JSON files.
I need to handle the plural / gender in strings.
Actually i'm using sprintf library, with some placeholder in the JSON code like:
{
...
…

Biro
- 199
- 3
- 16