ืืขืฆื ืืขืืจื ืืืืขืืช Vue I18n
ืื ื ืืืืงื ืืืืขืืช ืชืจืืื ืฉื Vue I18n ืขื ืจืืื ืืขืืจืช pipe โ(0 | 1 | other), ืขืืฆืื ืืขื ืฉื {name} ืืืืืขืืช ืืงืืฉืจืืช @:key.
ืชืื ืืืช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.