\n\n\n```\n\n \n \n\nTo use plural content in Svelte components, retrieve it via the `useIntlayer` hook and call it with a count. The store is accessed with `$`. Here's an example:\n\n```svelte fileName=\"**/*.svelte\"\n\n\n
\n

{$content.totalOpenings(count)}

\n
\n```\n\n
\n \n\nTo use plural content in Preact components, retrieve it via the `useIntlayer` hook and call it with a count. Here's an example:\n\n```tsx fileName=\"**/*.tsx\" codeFormat={[\"typescript\", \"esm\"]}\nimport type { FC } from \"preact\";\nimport { useIntlayer } from \"preact-intlayer\";\n\nconst OpeningsComponent: FC<{ count: number }> = ({ count }) => {\n const { totalOpenings } = useIntlayer(\"total_openings\");\n\n return (\n
\n

{totalOpenings(count)}

\n
\n );\n};\n\nexport default OpeningsComponent;\n```\n\n
\n \n\nTo use plural content in SolidJS components, retrieve it via the `useIntlayer` hook and call it with a count. Here's an example:\n\n```tsx fileName=\"**/*.tsx\" codeFormat={[\"typescript\", \"esm\"]}\nimport type { Component } from \"solid-js\";\nimport { useIntlayer } from \"solid-intlayer\";\n\nconst OpeningsComponent: Component<{ count: number }> = (props) => {\n const { totalOpenings } = useIntlayer(\"total_openings\");\n\n return (\n
\n

{totalOpenings(props.count)}

\n
\n );\n};\n\nexport default OpeningsComponent;\n```\n\n
\n \n\nTo use plural content in Angular components, retrieve it via the `useIntlayer` hook and call it with a count. Here's an example:\n\n```typescript fileName=\"app.component.ts\" codeFormat=\"typescript\"\nimport { Component, Input } from \"@angular/core\";\nimport { useIntlayer } from \"angular-intlayer\";\n\n@Component({\n selector: \"app-openings\",\n template: `\n
\n

{{ content().totalOpenings(count) }}

\n
\n `,\n})\nexport class OpeningsComponent {\n @Input() count!: number;\n\n content = useIntlayer(\"total_openings\");\n}\n```\n\n
\n \n\nTo use plural content with `vanilla-intlayer`, retrieve it via the `useIntlayer` hook and call it with a count. Here's an example:\n\n```typescript fileName=\"**/*.ts\" codeFormat={[\"typescript\", \"esm\"]}\nimport { installIntlayer, useIntlayer } from \"vanilla-intlayer\";\n\ninstallIntlayer();\n\nconst content = useIntlayer(\"total_openings\").onChange((newContent) => {\n document.getElementById(\"openings\")!.textContent =\n newContent.totalOpenings(5);\n});\n\n// Initial render\ndocument.getElementById(\"openings\")!.textContent = content.totalOpenings(5);\n```\n\n \n\n\n## बहुवचन सामग्री सेट करना\n\nअपने Intlayer प्रोजेक्ट में बहुवचन सामग्री सेट करने के लिए, एक सामग्री मॉड्यूल बनाएं जो `plural` हेल्पर का उपयोग करता है। `other` श्रेणी आवश्यक है और इसका उपयोग फ़ालबैक (fallback) के रूप में किया जाता है जब कोई लोकेल अधिक विशिष्ट श्रेणी परिभाषित नहीं करता है।\n\n```typescript fileName=\"**/*.content.ts\" contentDeclarationFormat={[\"typescript\", \"esm\", \"commonjs\"]}\nimport { plural, t, type Dictionary } from \"intlayer\";\n\nconst openingsContent = {\n key: \"total_openings\",\n content: {\n totalOpenings: t({\n en: plural({\n one: \"{{count}} opening\",\n other: \"{{count}} openings\",\n }),\n hi: plural({\n one: \"{{count}} अवसर\",\n other: \"{{count}} अवसर\",\n }),\n }),\n },\n} satisfies Dictionary;\n\nexport default openingsContent;\n```\n\n```json fileName=\"**/*.content.json\" contentDeclarationFormat=\"json\"\n{\n \"$schema\": \"https://intlayer.org/schema.json\",\n \"key\": \"total_openings\",\n \"content\": {\n \"totalOpenings\": {\n \"nodeType\": \"translation\",\n \"translation\": {\n \"en\": {\n \"nodeType\": \"plural\",\n \"plural\": {\n \"one\": \"{{count}} opening\",\n \"other\": \"{{count}} openings\"\n }\n },\n \"hi\": {\n \"nodeType\": \"plural\",\n \"plural\": {\n \"one\": \"{{count}} अवसर\",\n \"other\": \"{{count}} अवसर\"\n }\n }\n }\n }\n }\n}\n```\n\n> समर्थित श्रेणियां `zero`, `one`, `two`, `few`, `many`, `other` हैं। आपको केवल उन श्रेणियों को घोषित करने की आवश्यकता है जो आपकी लक्षित भाषा उपयोग करती है, Intlayer `other` पर वापस आ जाता है जब कोई विशिष्ट श्रेणी मेल नहीं खाती है।\n>\n> `{{count}}` प्लेसहोल्डर स्वचालित रूप से उस गिनती से बदल दिया जाता है जिसे आप रनटाइम पर पास करते हैं। आप अन्य प्लेसहोल्डर भी शामिल कर सकते हैं (नीचे [कस्टम प्लेसहोल्डर्स](#custom-placeholders) देखें)।\n\n## React Intlayer के साथ बहुवचन सामग्री का उपयोग करना\n\nReact घटक के अंदर बहुवचन सामग्री का उपयोग करने के लिए, इसे `useIntlayer` हुक के माध्यम से प्राप्त करें और इसे गिनती (count) के साथ कॉल करें। सक्रिय लोकेल और गिनती को मिलान वाली CLDR श्रेणी चुनने के लिए संयोजित किया जाता है।\n\n```tsx fileName=\"**/*.tsx\" codeFormat={[\"typescript\", \"esm\"]}\nimport type { FC } from \"react\";\nimport { useIntlayer } from \"react-intlayer\";\n\nconst OpeningsComponent: FC<{ count: number }> = ({ count }) => {\n const { totalOpenings } = useIntlayer(\"total_openings\");\n\n return (\n
\n {/* अंग्रेजी में: */}\n {/* count=0 → \"0 openings\" (other) */}\n {/* count=1 → \"1 opening\" (one) */}\n {/* count=2 → \"2 openings\" (other) */}\n {/* count=21 → \"21 openings\" (other) */}\n

{totalOpenings(count)}

\n
\n );\n};\n\nexport default OpeningsComponent;\n```\n\nआप लौटाए गए फ़ंक्शन को दो समान तरीकों से कॉल कर सकते हैं:\n\n```tsx\ntotalOpenings(21); // संक्षिप्त: केवल गिनती\ntotalOpenings({ count: 21 }); // स्पष्ट रूप\n```\n\n## कस्टम प्लेसहोल्डर्स\n\nबहुवचन स्ट्रिंग्स में `{{count}}` के अलावा अन्य प्लेसहोल्डर्स शामिल हो सकते हैं। उन्हें `count` के साथ ऑब्जेक्ट रूप में पास करें:\n\n```typescript fileName=\"**/*.content.ts\" contentDeclarationFormat={[\"typescript\", \"esm\", \"commonjs\"]}\nimport { plural, type Dictionary } from \"intlayer\";\n\nconst inboxContent = {\n key: \"inbox_summary\",\n content: {\n summary: plural({\n one: \"{{name}}, आपके पास {{count}} नया संदेश है\",\n other: \"{{name}}, आपके पास {{count}} नए संदेश हैं\",\n }),\n },\n} satisfies Dictionary;\n\nexport default inboxContent;\n```\n\n```tsx fileName=\"**/*.tsx\" codeFormat={[\"typescript\", \"esm\"]}\nconst { summary } = useIntlayer(\"inbox_summary\");\n\nsummary({ count: 1, name: \"Alice\" });\n// → \"Alice, आपके पास 1 नया संदेश है\"\n\nsummary({ count: 7, name: \"Alice\" });\n// → \"Alice, आपके पास 7 नए संदेश हैं\"\n```\n\n## CLDR श्रेणियों पर एक नज़र\n\nविभिन्न भाषाएं CLDR श्रेणियों के विभिन्न उपसमुच्चयों का उपयोग करती हैं। कुछ सामान्य मामले:\n\n| भाषा | प्रयुक्त श्रेणियां |\n| --------------- | -------------------------------------------- |\n| अंग्रेजी (`en`) | `one`, `other` |\n| फ्रेंच (`fr`) | `one`, `many`, `other` |\n| रूसी (`ru`) | `one`, `few`, `many`, `other` |\n| पोलिश (`pl`) | `one`, `few`, `many`, `other` |\n| अरबी (`ar`) | `zero`, `one`, `two`, `few`, `many`, `other` |\n| जापानी / चीनी | केवल `other` |\n\nआपको इसे याद रखने की आवश्यकता नहीं है, उन श्रेणियों को घोषित करें जिनके लिए आपके पास अनुवाद हैं, और आवश्यकता पड़ने पर Intlayer `other` पर वापस आ जाएगा।\n\n## सीमा\n\nअन्य नोड्स की तुलना में, `plural` को अभी तक बाल नोड्स के साथ नेस्ट (imbricate) नहीं किया जा सकता है।\n\nउदाहरण:\n\nवैध:\n\n```ts\n totalOpenings: t({\n en: plural({\n one: \"{{count}} opening\",\n other: \"{{count}} openings\",\n }),\n fr: plural({\n one: \"{{count}} offre\",\n other: \"{{count}} offres\",\n }),\n }),\n```\n\nअवैध:\n\n```ts\ntotalOpenings: plural({\n one: t({\n en: \"{{count}} opening\",\n fr: \"{{count}} offre\",\n }),\n other: t({\n en: \"{{count}} openings\",\n fr: \"{{count}} offres\",\n }),\n}),\n```\n\n## अतिरिक्त संसाधन\n\nकॉन्फ़िगरेशन और उपयोग के बारे में अधिक विस्तृत जानकारी के लिए, निम्नलिखित संसाधनों का संदर्भ लें:\n\n- [Enumeration दस्तावेज़ीकरण](/hi/doc/concept/content/enumeration)\n- [Insertion दस्तावेज़ीकरण](/hi/doc/concept/content/insertion)\n- [Intlayer CLI दस्तावेज़ीकरण](/hi/doc/concept/cli)\n- [React Intlayer दस्तावेज़ीकरण](/hi/doc/environment/create-react-app)\n- [Next Intlayer दस्तावेज़ीकरण](/hi/doc/environment/nextjs/15)\n\nये संसाधन विभिन्न वातावरणों और रूपरेखाओं में Intlayer के सेटअप और उपयोग में और अंतर्दृष्टि प्रदान करते।\n","description":"जानें कि अपनी बहुभाषी वेबसाइट में लोकेल-जागरूक बहुवचन सामग्री (CLDR-आधारित) को कैसे घोषित और उपयोग करें। अपने प्रोजेक्ट को कुछ ही मिनटों में सेट करने के लिए इस ऑनलाइन दस्तावेज़ के चरणों का पालन करें।","url":"https://intlayer.org/hi/doc/concept/content/plural","datePublished":"2026-05-04","dateModified":"2026-05-04","version":"8.8.0","keywords":"बहुवचन, बहुवचन रूप, CLDR, अंतर्राष्ट्रीयकरण, दस्तावेज़ीकरण, Intlayer, Next.js, JavaScript, React","license":"https://raw.githubusercontent.com/aymericzip/intlayer/refs/heads/main/LICENSE","audience":{"@type":"Audience","audienceType":"डेवलपर्स, सामग्री प्रबंधक"}}
    Author:
    Creation:2026-05-04Last update:2026-05-04

    बहुवचन सामग्री / Intlayer में बहुवचन

    बहुवचन कैसे काम करता है

    Intlayer में, बहुवचन सामग्री plural फ़ंक्शन के माध्यम से प्राप्त की जाती है, जो CLDR बहुवचन श्रेणियों, zero, one, two, few, many, other, को उनकी संबंधित सामग्री से मैप करती है। प्लेटफ़ॉर्म के अंतर्निहित Intl.PluralRules API का उपयोग करके सक्रिय लोकेल और एक गिनती (count) मान के आधार पर सही श्रेणी स्वचालित रूप से चुनी जाती है।

    enu के विपरीत, जो आपके द्वारा स्वयं परिभाषित संख्यात्मक श्रेणियों के आधार पर सामग्री चुनता है, plural चयन को CLDR नियमों को सौंपता है। यही कारण है कि यह जटिल बहुवचन नियमों वाली भाषाओं, जैसे रूसी, पोलिश, अरबी, या वेल्श, के लिए स्केलेबल बनाता है, बिना हस्तलिखित मोडुलो (modulo) तर्क के।

    plural बनाम enu का कब उपयोग करें

    To use plural content inside a React component, retrieve it via the useIntlayer hook and call it with a count. The active locale and the count are combined to pick the matching CLDR category.

    **/*.tsx
    import type { FC } from "react";
    import { useIntlayer } from "react-intlayer";
    
    const OpeningsComponent: FC<{ count: number }> = ({ count }) => {
    const { totalOpenings } = useIntlayer("total_openings");
    
    return (
      <div>
        <p>{totalOpenings(count)}</p>
      </div>
    );
    };
    
    export default OpeningsComponent;

    बहुवचन सामग्री सेट करना

    अपने Intlayer प्रोजेक्ट में बहुवचन सामग्री सेट करने के लिए, एक सामग्री मॉड्यूल बनाएं जो plural हेल्पर का उपयोग करता है। other श्रेणी आवश्यक है और इसका उपयोग फ़ालबैक (fallback) के रूप में किया जाता है जब कोई लोकेल अधिक विशिष्ट श्रेणी परिभाषित नहीं करता है।

    **/*.content.ts
    import { plural, t, type Dictionary } from "intlayer";
    
    const openingsContent = {
      key: "total_openings",
      content: {
        totalOpenings: t({
          en: plural({
            one: "{{count}} opening",
            other: "{{count}} openings",
          }),
          hi: plural({
            one: "{{count}} अवसर",
            other: "{{count}} अवसर",
          }),
        }),
      },
    } satisfies Dictionary;
    
    export default openingsContent;

    समर्थित श्रेणियां zero, one, two, few, many, other हैं। आपको केवल उन श्रेणियों को घोषित करने की आवश्यकता है जो आपकी लक्षित भाषा उपयोग करती है, Intlayer other पर वापस आ जाता है जब कोई विशिष्ट श्रेणी मेल नहीं खाती है।

    {{count}} प्लेसहोल्डर स्वचालित रूप से उस गिनती से बदल दिया जाता है जिसे आप रनटाइम पर पास करते हैं। आप अन्य प्लेसहोल्डर भी शामिल कर सकते हैं (नीचे कस्टम प्लेसहोल्डर्स देखें)।

    React Intlayer के साथ बहुवचन सामग्री का उपयोग करना

    React घटक के अंदर बहुवचन सामग्री का उपयोग करने के लिए, इसे useIntlayer हुक के माध्यम से प्राप्त करें और इसे गिनती (count) के साथ कॉल करें। सक्रिय लोकेल और गिनती को मिलान वाली CLDR श्रेणी चुनने के लिए संयोजित किया जाता है।

    **/*.tsx
    import type { FC } from "react";
    import { useIntlayer } from "react-intlayer";
    
    const OpeningsComponent: FC<{ count: number }> = ({ count }) => {
      const { totalOpenings } = useIntlayer("total_openings");
    
      return (
        <div>
          {/* अंग्रेजी में:                                   */}
          {/*  count=0  → "0 openings"   (other)           */}
          {/*  count=1  → "1 opening"    (one)             */}
          {/*  count=2  → "2 openings"   (other)           */}
          {/*  count=21 → "21 openings"  (other)           */}
          <p>{totalOpenings(count)}</p>
        </div>
      );
    };
    
    export default OpeningsComponent;

    आप लौटाए गए फ़ंक्शन को दो समान तरीकों से कॉल कर सकते हैं:

    tsx
    totalOpenings(21); // संक्षिप्त: केवल गिनतीtotalOpenings({ count: 21 }); // स्पष्ट रूप

    कस्टम प्लेसहोल्डर्स

    बहुवचन स्ट्रिंग्स में {{count}} के अलावा अन्य प्लेसहोल्डर्स शामिल हो सकते हैं। उन्हें count के साथ ऑब्जेक्ट रूप में पास करें:

    **/*.content.ts
    import { plural, type Dictionary } from "intlayer";
    
    const inboxContent = {
      key: "inbox_summary",
      content: {
        summary: plural({
          one: "{{name}}, आपके पास {{count}} नया संदेश है",
          other: "{{name}}, आपके पास {{count}} नए संदेश हैं",
        }),
      },
    } satisfies Dictionary;
    
    export default inboxContent;
    **/*.tsx
    const { summary } = useIntlayer("inbox_summary");
    
    summary({ count: 1, name: "Alice" });
    // → "Alice, आपके पास 1 नया संदेश है"
    
    summary({ count: 7, name: "Alice" });
    // → "Alice, आपके पास 7 नए संदेश हैं"

    CLDR श्रेणियों पर एक नज़र

    विभिन्न भाषाएं CLDR श्रेणियों के विभिन्न उपसमुच्चयों का उपयोग करती हैं। कुछ सामान्य मामले:

    भाषा प्रयुक्त श्रेणियां
    अंग्रेजी (en) one, other
    फ्रेंच (fr) one, many, other
    रूसी (ru) one, few, many, other
    पोलिश (pl) one, few, many, other
    अरबी (ar) zero, one, two, few, many, other
    जापानी / चीनी केवल other

    आपको इसे याद रखने की आवश्यकता नहीं है, उन श्रेणियों को घोषित करें जिनके लिए आपके पास अनुवाद हैं, और आवश्यकता पड़ने पर Intlayer other पर वापस आ जाएगा।

    सीमा

    अन्य नोड्स की तुलना में, plural को अभी तक बाल नोड्स के साथ नेस्ट (imbricate) नहीं किया जा सकता है।

    उदाहरण:

    वैध:

    ts
        totalOpenings: t({      en: plural({        one: "{{count}} opening",        other: "{{count}} openings",      }),      fr: plural({        one: "{{count}} offre",        other: "{{count}} offres",      }),    }),

    अवैध:

    ts
    totalOpenings: plural({  one: t({    en: "{{count}} opening",    fr: "{{count}} offre",  }),  other: t({    en: "{{count}} openings",    fr: "{{count}} offres",  }),}),

    अतिरिक्त संसाधन

    कॉन्फ़िगरेशन और उपयोग के बारे में अधिक विस्तृत जानकारी के लिए, निम्नलिखित संसाधनों का संदर्भ लें:

    ये संसाधन विभिन्न वातावरणों और रूपरेखाओं में Intlayer के सेटअप और उपयोग में और अंतर्दृष्टि प्रदान करते।