ื›ืœื™ ื—ื™ื ืžื™

    ืžืขืฆื‘ ื•ืขื•ืจืš ื”ื•ื“ืขื•ืช Vue I18n

    ื‘ื ื• ื•ื‘ื“ืงื• ื”ื•ื“ืขื•ืช ืชืจื’ื•ื ืฉืœ Vue I18n ืขื ืจื‘ื™ื ื‘ืขื–ืจืช pipe โ€(0 | 1 | other), ืขื™ืฆื•ื‘ ื‘ืขืœ ืฉื {name} ื•ื”ื•ื“ืขื•ืช ืžืงื•ืฉืจื•ืช @:key.

    ืชื‘ื ื™ื•ืช10
    VUE-I18N ืขื•ืจืš
    ืชื—ื‘ื™ืจ ืชืงื™ืŸ
    34 ืชื•ื•ื™ื1 ืฉื•ืจื•ืช

    ืžืฉืชื ื™ ื‘ื“ื™ืงื” ื•ืชืฆื•ื’ื” ืžืงื“ื™ืžื” ื—ื™ื”

    ืฉื ื• ืžืฉืชื ื™ื ื•ื”ื—ืœื™ืคื• ืฉืคื•ืช ื›ื“ื™ ืœืืžืช ืืช ื›ืœืœื™ ื”ืจื‘ื™ื ืฉืœ CLDR

    ืฉืคื”:
    ืคืœื˜ ืžืจื•ื ื“ืจ (en):
    Hello Lucas, welcome to Vue i18n!
    ื™ื™ืฆื•ื ืœื”ืฆื”ืจื” ื‘ื˜ื•ื—ื” ื‘ื˜ื™ืคื•ืกื™ื ืฉืœ Intlayer
    import { type Dictionary } from 'intlayer';const convertedMessageContent = {  key: 'converted-message',  content: 'Hello {{name}}, welcome to Vue i18n!',} satisfies Dictionary;export default convertedMessageContent;
    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 Pluralizationno items | 1 item | {n} itemsno apples | 1 apple | {n} applesPipes separate 0, 1, and plural formsplural({ 0: "no apples", 1: "1 apple", other: "{{count}} apples" })
    Linked Messages@:path.to.messageHome of @:brand.nameReferences other messages in the dictionaryTypeScript object references
    Literal Interpolation{'literal'}{'hello'} {name}Single-quoted literal inside bracesLiteral strings
    ื”ืืจื›ื™ื˜ืงื˜ื•ืจื” ืžื‘ื•ืกืกืช ื”ืงื•ืžืคื™ื™ืœืจ ืฉืœ Intlayer ืžื—ืœื™ืคื” ื ื™ืชื•ื— ื”ื•ื“ืขื•ืช ืžื•ืจื›ื‘ ื‘ื–ืžืŸ ืจื™ืฆื” ื‘ื‘ื˜ื™ื—ื•ืช ื˜ื™ืคื•ืกื™ื ื‘ื–ืžืŸ ืงื•ืžืคื™ืœืฆื™ื” ื•ื‘ื—ื™ืœื•ืฅ ืื•ื˜ื•ืžื˜ื™.
    ื”ืืงื•ืกื™ืกื˜ื ืฉืœ Intlayer

    ืœืขื•ืœื ืืœ ืชื“ืื’ื• ืฉื•ื‘ ืžืชื—ื‘ื™ืจ ืžื•ืจื›ื‘

    Intlayer ื”ื•ืคื›ืช ืืช ื”ื‘ื™ื ืื•ื ืœื—ื•ื•ื™ื™ืช ืคื™ืชื•ื— ืžื”ื ื” ืขื ื‘ื˜ื™ื—ื•ืช ื˜ื™ืคื•ืกื™ื ื‘ื–ืžืŸ ืงื•ืžืคื™ืœืฆื™ื”, ื—ื™ืœื•ืฅ ืื•ื˜ื•ืžื˜ื™ ืžืงื•ืžืคื•ื ื ื˜ื•ืช ื•ืฉื™ืœื•ื‘ ื—ืœืง ืขื ื”-CMS.