Setting Up String Pluralization in Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Setting Up String Pluralization in Mobile App
Simple
from 4 hours to 2 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Configuring String Pluralization in Mobile Applications

"1 item", "2 items", "5 items" — English has two variants: one/other. Russian, Ukrainian, and Polish have six: zero/one/two/few/many/other. Hardcoded logic like if (count == 1) "item" else "items" is a guaranteed bug when localizing to any language with non-trivial pluralization rules.

Correct Mechanism on Each Platform

Android. File res/values-ru/plurals.xml:

<plurals name="items_count">
    <item quantity="one">%d item</item>
    <item quantity="few">%d items</item>
    <item quantity="many">%d items</item>
    <item quantity="other">%d items</item>
</plurals>

Call: resources.getQuantityString(R.plurals.items_count, count, count). The first count selects the form, the second substitutes into %d. Common mistake: passing only one argument — then the number doesn't get substituted into the string.

iOS. Use Localizable.stringsdict instead of Localizable.strings for plural forms. Structure is a plist with key, nested NSStringLocalizedFormatKey, and CLDR-based rules. String(format: NSLocalizedString("items_count", comment: ""), count) automatically selects the correct form. For Swift packages with String Catalog (Xcode 15+) — visual editor for plural forms directly in IDE.

Flutter. Package intl, Intl.plural():

Intl.plural(
  count,
  zero: 'no items',
  one: '$count item',
  few: '$count items',
  many: '$count items',
  other: '$count items',
  locale: 'en',
);

Or through ARB-files with flutter gen-l10n — pluralization is described in app_en.arb via ICU syntax: {count, plural, one{# item} few{# items} many{# items} other{# items}}. Generator creates type-safe methods.

React Native. i18next + i18next-icu plugin for ICU syntax. Or react-i18next with Intl.PluralRules natively — available on RN 0.70+. Manually via new Intl.PluralRules('en').select(count) — returns string 'one'/'few'/'many'/'other', by which you select the form from the translation object.

Non-standard Cases

Arabic has six forms including dual (2 items — separate form). Chinese and Japanese have one form, but count suffixes depend on the noun (三本の本 — three books). This is not pluralization but a classifier system that Intl.plural doesn't cover.

Fractional numbers: 1.5 hours — which form? By CLDR rules for English, fractional numbers take the other form. Intl.PluralRules knows this; manual logic through % 10 doesn't.

Timeframe: from 4 hours (audit + hardcode replacement) to 2 days (if pluralization spans multiple languages and custom components). Cost is calculated after audit.