Strumento Gratuito

    Editor e formattatore di messaggi Intlayer

    Crea, testa e convalida dichiarazioni di contenuto tipizzate di Intlayer con interpolazioni {{var}}, t(), plural(), enu(), select(), cond() e markdown.

    Modelli18
    INTLAYER Editor
    Sintassi valida
    36 caratteri1 righe

    Variabili di test e anteprima dal vivo

    Regola le variabili e cambia lingua per verificare le regole CLDR

    Lingua:
    Risultato generato (en):
    Hello Alex, welcome to Intlayer!
    Esporta nella dichiarazione sicura per i tipi di Intlayer
    import { type Dictionary } from 'intlayer';const convertedMessageContent = {  key: 'converted-message',  content: 'Hello {{name}}, welcome to Intlayer!',} satisfies Dictionary;export default convertedMessageContent;
    Intlayer convalida le traduzioni in fase di compilazione con completamento automatico TypeScript completo.

    Intlayer Message Format Syntax Cheat Sheet

    Regole sintattiche rapide e corrispondenze tipizzate con Intlayer

    FunzionalitàSintassiEsempioNoteEquivalente Intlayer
    Variable Interpolation{{variableName}}Hello {{name}}!Double curly braces for dynamic parameter insertionuseIntlayer(key).name or resolveMessage()
    Multilingual Translationt({ en: "...", fr: "..." })t({ en: "Hello", fr: "Bonjour" })Locale-keyed translations with type safety and fallbackt({ [locale]: string })
    Pluralization (plural)plural({ one: "...", other: "..." })plural({ one: "1 item", other: "{{count}} items" })CLDR cardinal plural rules with automatic count lookupplural({ [category]: string })
    Exact Enumeration (enu)enu({ 0: "...", 1: "...", fallback: "..." })enu({ 0: "Zero", 1: "One", fallback: "{{count}}" })Exact numeric matching with fallback for remaining countsenu({ [number]: string, fallback })
    Dynamic Selection (select)select({ key: "...", fallback: "..." }, "variable")select({ admin: "Admin", fallback: "User" }, "role")Branch on any custom string variable discriminatorselect({ [key]: string }, variableKey)
    Gender Agreement (gender)gender({ male: "...", female: "...", fallback: "..." })gender({ male: "He", female: "She", fallback: "They" })Grammatical gender concordance with automatic lookupgender({ male, female, fallback })
    Boolean Condition (cond)cond({ true: "...", false: "..." })cond({ true: "Logged In", false: "Guest" })Evaluates boolean state conditionscond({ true: string, false: string })
    Markdown Content (md)md("# ...\n**bold**")md("# Title\n\n**Bold** {{variable}}")Rich markdown rendered to React / HTML nodesmd(markdownString)
    Embedded HTML (html)html("<tag>...</tag>")html("<p>Visit <a href=\"/\">home</a></p>")Embedded safe HTML markup for links and formattinghtml(htmlString)
    L’architettura basata su compilatore di Intlayer sostituisce il parsing a runtime con la sicurezza dei tipi in fase di compilazione.
    Ecosistema Intlayer

    Non preoccuparti mai più di sintassi complesse

    Intlayer trasforma l’internazionalizzazione in un’esperienza di sviluppo piacevole con sicurezza dei tipi in fase di compilazione, estrazione automatica e CMS integrato.