product icon

Paraglide JS

App

Message file formats

You can use any message syntax and file formats with Paraglide JS via inlang plugins.

By default, Paraglide JS uses the inlang-message-format plugin, but you can use any other plugin that suits your needs. Mixing & matching is also possible.

graph LR; subgraph "Pipeline" A[Inlang Project] -->|Opened by| B[Paraglide Compiler] B -->|Compiles| C[Code] end A <-.->|Imports & Exports| D[Inlang Plugin] D <-.->|Reads & Writes| E[Translation File]

Available plugins

All plugins can be found on https://inlang.com/c/plugins. Here are some popular plugins:

Installing a plugin

Add the link of the plugin to the modules in the settings.json file.

Refer to the documentation of the plugin for the linkĀ and installation guide.
{
  "baseLocale": "en",
  "locales": ["en", "de"],
  "modules": [
     "other plugins...",
+    "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js"
  ]
}

Using multiple plugins

You can use multiple plugins in your project.

{
  "baseLocale": "en",
  "locales": ["en", "de"],
  "modules": [
     "other plugins...",
+     "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js"
+     "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@latest/dist/index.js"
  ]
}

Implementation Details

We learned the hard way that a binary .inlang file is needed to make localization simple. Unfortunately, git can't store binary files without losing the benefits of version control.

Hence, for now, unpacking .inlang files into directories and creating an in-memory sqlite on each load is the way to go.

Good-to-know: .inlang files

The long-term vision is to use .inlang files directly without depending on external message files and plugins.