product icon

Paraglide JS

App

Paraglide JS Vite example

This example shows how to use Paraglide with Vite.

Any frontend framework that works with Vite is automatically supported. Paraglide JS does not require framework specific code. If you are looking for metaframework features, check out Paraglide JS on the server.

The source code for the vite example is here.

Getting started

npx @inlang/paraglide-js@latest init

Add the vite plugin to your vite.config.ts:

import { defineConfig } from "vite";
+import { paraglideVitePlugin } from "@inlang/paraglide-js";

export default defineConfig({
  plugins: [
+    paraglideVitePlugin({
+      project: "./project.inlang",
+      outdir: "./src/paraglide",
+    }),
  ],
});

Usage

See the basics documentation for more information on how to use Paraglide's messages, parameters, and locale management.