IntlListFormatter::__construct

(No version information available, might only be in Git)

IntlListFormatter::__construct新しい IntlListFormatter のインスタンスを作成する

説明

public function IntlListFormatter::__construct(string $locale, int $type = IntlListFormatter::TYPE_AND, int $width = IntlListFormatter::WIDTH_WIDE)

指定したロケール用の新しい IntlListFormatter のインスタンスを作成します。

パラメータ

locale
フォーマットに使用するロケール。
type
リストの種類。IntlListFormatter::TYPE_* 定数 (IntlListFormatter::TYPE_AND, IntlListFormatter::TYPE_OR, IntlListFormatter::TYPE_UNITS) のいずれかです。
width
リストの幅。IntlListFormatter::WIDTH_* 定数 (IntlListFormatter::WIDTH_WIDE, IntlListFormatter::WIDTH_SHORT, IntlListFormatter::WIDTH_NARROW) のいずれかです。

エラー / 例外

フォーマッタを作成できない場合 (ロケールが不正な場合や、ICU のバージョンが 67 未満の場合など)、 IntlException をスローします。

変更履歴

バージョン 説明
8.5.0 このクラスが追加されました。

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.