Intlayer-Nachrichten-Formatierer & Editor
Erstellen, testen und validieren Sie typsichere Intlayer-Inhaltsdeklarationen mit {{var}}-Interpolationen, t(), plural(), enu(), select(), cond() und Markdown.
Vorlagen18
INTLAYER Editor
Gültige Syntax
36 Zeichen1 Zeilen
Testvariablen & Live-Vorschau
Passen Sie Variablen an und wechseln Sie Sprachen, um CLDR-Regeln zu prüfen
Sprache:
Gerenderte Ausgabe (en):
Hello Alex, welcome to Intlayer!
In typsichere Intlayer-Deklaration exportieren
Intlayer validiert Übersetzungen zur Kompilierzeit mit vollständiger TypeScript-Autovervollständigung.
Intlayer Message Format Syntax Cheat Sheet
Schnelle Syntaxregeln und wie jedes Muster auf typsichere Intlayer-Deklarationen abbildet
| Funktion | Syntax | Beispiel | Hinweise | Intlayer-Äquivalent |
|---|---|---|---|---|
| Variable Interpolation | {{variableName}} | Hello {{name}}! | Double curly braces for dynamic parameter insertion | useIntlayer(key).name or resolveMessage() |
| Multilingual Translation | t({ en: "...", fr: "..." }) | t({ en: "Hello", fr: "Bonjour" }) | Locale-keyed translations with type safety and fallback | t({ [locale]: string }) |
| Pluralization (plural) | plural({ one: "...", other: "..." }) | plural({ one: "1 item", other: "{{count}} items" }) | CLDR cardinal plural rules with automatic count lookup | plural({ [category]: string }) |
| Exact Enumeration (enu) | enu({ 0: "...", 1: "...", fallback: "..." }) | enu({ 0: "Zero", 1: "One", fallback: "{{count}}" }) | Exact numeric matching with fallback for remaining counts | enu({ [number]: string, fallback }) |
| Dynamic Selection (select) | select({ key: "...", fallback: "..." }, "variable") | select({ admin: "Admin", fallback: "User" }, "role") | Branch on any custom string variable discriminator | select({ [key]: string }, variableKey) |
| Gender Agreement (gender) | gender({ male: "...", female: "...", fallback: "..." }) | gender({ male: "He", female: "She", fallback: "They" }) | Grammatical gender concordance with automatic lookup | gender({ male, female, fallback }) |
| Boolean Condition (cond) | cond({ true: "...", false: "..." }) | cond({ true: "Logged In", false: "Guest" }) | Evaluates boolean state conditions | cond({ true: string, false: string }) |
| Markdown Content (md) | md("# ...\n**bold**") | md("# Title\n\n**Bold** {{variable}}") | Rich markdown rendered to React / HTML nodes | md(markdownString) |
| Embedded HTML (html) | html("<tag>...</tag>") | html("<p>Visit <a href=\"/\">home</a></p>") | Embedded safe HTML markup for links and formatting | html(htmlString) |
Die compilergesteuerte Architektur von Intlayer ersetzt komplexes Laufzeit-Parsing durch Typsicherheit zur Kompilierzeit.
Intlayer Ökosystem
Machen Sie sich nie wieder Gedanken über komplexe Syntax
Intlayer verwandelt die Internationalisierung mit Typsicherheit zur Kompilierzeit, automatischer Komponentenextraktion und nahtloser CMS-Integration in ein Vergnügen.