CLDR 48 · ny
Nyanja plural rules
CLDR 48 gives Nyanja (ny) two plural forms: one and other. What decides each, which numbers fall where, and an Android <plurals> block with every form, ready to paste.
- one
- other
The rules
What decides each Nyanja form.
- one
The number is 1.
- Integers
- 1
- Decimals
- 1.0, 1.00, 1.000, 1.0000
- CLDR rule
- n = 1
- other
Every number the other forms do not take.
- Integers
- 0, 2–16, 100, 1000, 10000, 100000, 1000000, …
- Decimals
- 0.0–0.9, 1.1–1.6, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …
- CLDR rule
- No condition: what is left
Reading the CLDR rule
- n
- the number itself, where 1.0 counts as 1
- i
- the integer part (1 for 1.50)
- v
- how many decimals are shown (2 for 1.50)
- w
- how many decimals are shown, without trailing zeros (1 for 1.50)
- f
- the shown decimals as a whole number (50 for 1.50)
- t
- the shown decimals without trailing zeros (5 for 1.50)
- c, e
- the compact exponent, for a number shown in a compact form such as 1M; CLDR writes 1M as 1c6 (6 for 1c6)
% is the remainder, .. a range of whole numbers, and and binds before or. From UTS #35: plural operand meanings.
Numbers
Which form a number takes.
Common counts under CLDR 48's Nyanja rules, then any number you type.
- 0other
- 1one
- 2other
- 3other
- 4other
- 5other
- 7other
- 11other
- 12other
- 21other
- 22other
- 25other
- 100other
- 101other
- 1000000other
- 0.5other
- 1.0one
- 1.5other
Decimals count as written: 1.0 and 1 can take different forms.
takes other
Ready to paste
An Android block.
Every form filled with an English stand-in. Write each one as you would say it for that form's sample numbers.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<plurals name="files_count">
<item quantity="one">%d file</item>
<item quantity="other">%d files</item>
</plurals>
</resources>// Compose
Text(pluralStringResource(R.plurals.files_count, count, count))
// Views
resources.getQuantityString(R.plurals.files_count, count, count)Good to know
- 0 takes
otherin Nyanja: CLDR 48 has no zero form for it, so under CLDR 48's rules Android never selects aquantity="zero"item here. - Xcode 26.6's String Catalog plural table has no entry for
ny, so this page has no.xcstringsentry to paste.
In anylocale
How anylocale handles Nyanja.
anylocale gives Nyanja the same two forms as CLDR 48: one and other. It stores each form as its own translation and counts a plural key as translated once every form has text.
iOS and Android
What the platforms do with these forms.
Apple: Xcode and Foundation
- When you vary a string by plural, Xcode adds the forms the language needs. Apple's examples are One and Other for English, and One, Few, Many and Other for Russian. Localizing and varying text with a string catalog
- Xcode picks the specifier from the interpolation: in Apple's example, the count in
Text("\(collection.landmarks.count) items")becomes%lld, a 64-bit integer, with One%lld itemand Other%lld items. Localizing and varying text with a string catalog - Only
otheris required. A form the language does not use is ignored in favour ofother, and leaving out one it does use can make the text grammatically wrong. Localizing strings that contain plurals - Keep the number in the text: Apple advises the format specifier, or a spelled-out word, over a digit such as 1, which may not be localized correctly when the user changes regions. Localizing strings that contain plurals
- English may carry an optional
zeroin a .stringsdict: Apple's example returns "No homes found" for 0. Localizing strings that contain plurals - A localization's identifier is a language code, optionally with a region or a script:
srfor Serbian,sr-Latnfor Serbian in the Latin script, andzh-Hansandzh-Hantfor Chinese in the simplified and traditional scripts. Choosing localization regions and scripts
Android: resources and lint
- Android has the same six quantities and picks one by grammatical necessity only: in English a
zeroitem is ignored even for 0, and in Korean onlyotheris ever used. String resources: quantity strings - The pick uses ICU's PluralRules for the configuration's first locale. When the chosen quantity has no item, Android falls back to
other, and throws NotFoundException whenotheris missing too. ResourcesImpl.getQuantityText in AOSP getQuantityStringtakes the quantity as an int, so on Android a decimal never selects a form. Resources.getQuantityString- Lint's MissingQuantity check is an error when a translation lacks a quantity its language needs. Google's example is Polish without
many. Lint: MissingQuantity - Lint's UnusedQuantity check warns about quantities a language does not use: in Chinese only
otheris used, sozeroandoneare never returned, even for 0 or 1. Lint: UnusedQuantity - Lint's ImpliedQuantity check is an error when a
oneitem has no number butonematches more than one number, as in Slovenian: 1, 101, 201 and so on. Lint: ImpliedQuantity - A region takes an r, as in
values-pt-rBR. A script or a numeric region needs the BCP 47 form Android 7.0 (API 24) added, such asvalues-b+zh+Hantorvalues-b+es+419. App resources: language and region qualifiers - Android's qualifier parser also accepts a three-letter language in the plain form, so Filipino can be
values-fil. LocaleValue::InitFromParts in AOSP
Each linked page was read on November 9, 2026.
Questions
- How many plural forms does Nyanja have?
- Two in CLDR 48:
oneandother. - Which plural form does 0 take in Nyanja?
other. In CLDR 48, Nyanjaothertakes 0, 2–16, 100, 1000, 10000, 100000 and so on.- Which plural form does 1.5 take in Nyanja?
other. Decimals have rules of their own: in CLDR 48, Nyanjaothertakes decimals such as 0.0–0.9, 1.1–1.6 and so on.- Which Android resource folder holds Nyanja strings?
values-ny, so the plurals go inapp/src/main/res/values-ny/strings.xml.- How do I add Nyanja plurals to a String Catalog?
- Xcode 26.6's String Catalog plural table has no entry for
ny, so this page has no entry to paste.
Plural rules and samples from Unicode CLDR 48, read from supplemental/plurals.json in the cldr-core 48.2.0 package. Unicode publishes the same data as the CLDR 48 plural rules chart. String Catalog forms come from the plural table in Xcode 26.6 (17F113), XCStringsParser.framework/Resources/variationConfigFile.plist, read on November 9, 2026.
Start with the file your app already ships.
After checkout, import one strings file and read the first drafts within minutes.
Nothing to connect and nothing to install. The CLI is optional.