Vue I18n メッセージフォーマッター&エディター
パイプ複数形化(0 | 1 | その他)、名前付きフォーマット {name}、リンクされたメッセージ @:key を備えたVue I18nメッセージを作成およびテストします。
テンプレート10
VUE-I18N エディター
有効な構文
34 文字1 行
テスト変数とライブプレビュー
変数を調整し言語を切り替えてCLDR複数形ルールを確認します
言語:
出力結果 (en):
Hello Lucas, welcome to Vue i18n!
Intlayer の型安全な宣言にエクスポート
Intlayerは完全なTypeScript自動補完によりコンパイル時に翻訳を検証します。
Vue I18n Syntax Cheat Sheet
構文ルールとIntlayerの型安全な宣言へのマッピング一覧
| 機能 | 構文 | 例 | 備考 | Intlayer での同等表現 |
|---|---|---|---|---|
| Named Formatting | {variableName} | Hello {name}! | Single braces for named parameters | {{name}} |
| List Formatting | {0}, {1}, ... | Hello {0} and {1} | Index-based positional arguments | {{0}} or named variables |
| Pipe Pluralization | no items | 1 item | {n} items | no apples | 1 apple | {n} apples | Pipes separate 0, 1, and plural forms | plural({ 0: "no apples", 1: "1 apple", other: "{{count}} apples" }) |
| Linked Messages | @:path.to.message | Home of @:brand.name | References other messages in the dictionary | TypeScript object references |
| Literal Interpolation | {'literal'} | {'hello'} {name} | Single-quoted literal inside braces | Literal strings |
Intlayerのコンパイラ駆動アーキテクチャは、複雑な実行時パースをコンパイル時の型安全性と自動抽出に置き換えます。
Intlayer エコシステム
複雑な構文に悩まされることはもうありません
Intlayerは、コンパイル時の型安全性、自動コンポーネント抽出、シームレスなCMS統合により、国際化を快適な開発体験に変えます。