Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2019年9月.
* Some parts of this feature may have varying levels of support.
Intl.PluralRules オブジェクトは、複数形が影響する書式や言語ルールを使用できるようにします。
新しい Intl.PluralRules オブジェクトを生成します。
指定したロケールのうち、ランタイムの既定のロケールに代替されることなく対応されているものが入った配列を返します。
オブジェクトの初期化中に計算されたロケールとコレクションのオプションを反映したプロパティを持った新しいオブジェクトを返します。
Intl.PluralRules.prototype.select()ロケールを考慮した書式化に使用する複数形を示す文字列を返します。
Intl.PluralRules.prototype.selectRange()このメソッドは 2 つの値を受け取り、ロケールを考慮した書式化に使用する複数形を示す文字列を返します。
この例では、ローカライズされた複数形ルールのいくつかを表示します。アプリケーションのユーザーインターフェイスで使う言語の書式を取得するには、 locales 引数に言語(および必要に応じて代替言語)を指定してください。
| ECMAScript® 2027 Internationalization API Specification # pluralrules-objects |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023年8月2日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.