Paraglide JS works with any message syntax and file format via inlang plugins. This means you can use JSON, YAML, i18next format, or any other format that has a plugin.
Choosing a Plugin
| Plugin | Best For | File Format |
|---|---|---|
| Inlang Message Format | New projects, full inlang feature support | messages/{locale}.json |
| i18next | Migrating from i18next | locales/{locale}.json |
| JSON | Simple key-value translations | {locale}.json |
Browse all plugins at inlang.com/c/plugins.
Message Syntax Examples
Inlang Message Format
messages/en.json
{
"greeting": "Hello {name}!",
"items_count": "{count, plural, one {# item} other {# items}}",
"welcome_message": "Welcome to {appName}, {username}!"
}
messages/de.json
{
"greeting": "Hallo {name}!",
"items_count": "{count, plural, one {# Artikel} other {# Artikel}}",
"welcome_message": "Willkommen bei {appName}, {username}!"
}
i18next Format
locales/en.json
{
"greeting": "Hello {{name}}!",
"items_count": "{{count}} item",
"items_count_plural": "{{count}} items"
}
Simple JSON
en.json
{
"greeting": "Hello!",
"goodbye": "Goodbye!"
}
Installing a Plugin
Add the plugin URL to the modules array in your project.inlang/settings.json:
[!NOTE]Refer to each plugin's documentation for specific configuration options.
{
"baseLocale": "en",
"locales": ["en", "de"],
"modules": [
- "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4.5.0/dist/index.js"
+ "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@6.0.11/dist/index.js"
]
}
Using Multiple Plugins
You can use multiple plugins to support different file formats in the same project:
{
"baseLocale": "en",
"locales": ["en", "de"],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4.5.0/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@6.0.11/dist/index.js"
]
}
This is useful when migrating from one format to another, or when different parts of your app use different translation formats.
Translator descriptions
A bundle can have one shared description explaining its meaning, where it appears, and translation constraints. Paraglide includes that description in generated JSDoc and TypeScript declarations, so it is available when hovering over a message function. It does not add descriptions to message runtime metadata or translated output.
With a description-capable inlang SDK and message-format plugin, author the description in the source-locale file using the complex entry form:
{
"checkout_confirm": [
{
"description": "Final checkout button. Confirms payment immediately. Keep it short.",
"match": { "*": "Pay now" }
}
]
}
For formats without translator metadata, such as i18next JSON, the SDK stores descriptions in project.inlang/descriptions.json. Keep that companion file in version control alongside the translation files. Description edits refresh generated documentation just like message edits.
