ICU メッセージフォーマッター&エディター
ライブプレビュー、100以上のテンプレート、多言語CLDR複数形検証を備えたICU MessageFormat文字列を作成、テスト、検証します。
テンプレート50
ICU エディター
有効な構文
14 文字1 行
テスト変数とライブプレビュー
変数を調整し言語を切り替えてCLDR複数形ルールを確認します
言語:
出力結果 (en):
Hello, Alex!
Intlayer の型安全な宣言にエクスポート
Intlayerは完全なTypeScript自動補完によりコンパイル時に翻訳を検証します。
ICU MessageFormat Syntax Cheat Sheet
構文ルールとIntlayerの型安全な宣言へのマッピング一覧
| 機能 | 構文 | 例 | 備考 | Intlayer での同等表現 |
|---|---|---|---|---|
| Simple Variable | {variableName} | Hello {name}! | Alphanumeric names, single brackets | {{name}} |
| Pluralization | {count, plural, one {...} other {...}} | {n, plural, one {# item} other {# items}} | Requires "other". # is replaced by count. | plural({ one: "1 item", other: "{{count}} items" }) |
| Exact Match Plural | =0 {...} =1 {...} | {n, plural, =0 {None} one {#} other {#}} | Takes precedence over CLDR keywords | enu({ 0: "None", 1: "1", fallback: "{{count}}" }) |
| Select (Context/Gender) | {key, select, choice1 {...} other {...}} | {gender, select, male {He} other {They}} | Case-sensitive exact string comparison | select({ male: "He", fallback: "They" }, "gender") |
| Selectordinal | {rank, selectordinal, one {#st} other {#th}} | {pos, selectordinal, one {#st} two {#nd} other {#th}} | Ordinal suffix rules per CLDR | enu({ 1: "1st", 2: "2nd", fallback: "{{pos}}th" }) |
| Number Formatting | {val, number, [style]} | {price, number, currency} | Supports percent, currency, integer styles | Intl.NumberFormat or type-safe formatting |
| Escaping | '{' and '' for apostrophes | Don''t '{'escape'}' | Single quotes escape literal blocks, '' escapes quote | Literal strings naturally supported |
Intlayerのコンパイラ駆動アーキテクチャは、複雑な実行時パースをコンパイル時の型安全性と自動抽出に置き換えます。
Intlayer エコシステム
複雑な構文に悩まされることはもうありません
Intlayerは、コンパイル時の型安全性、自動コンポーネント抽出、シームレスなCMS統合により、国際化を快適な開発体験に変えます。