Weglot Developer Documentation
Translate your project with Weglot, and customize the Weglot plugins and libraries.
Translate your project
Translate a React app in minutes
1
2
Install the package
npm install @weglot/translate-react
echo "WEGLOT_API_KEY=pk_your_weglot_api_key" >> .env3
Add the plugin
// next.config.ts
import { withWeglot } from "@weglot/translate-react/next";
export default async function () {
return await withWeglot({}, { sourceRoot: "./app" });
}// vite.config.ts
import { defineConfig } from "vite";
import { weglotPlugin } from "@weglot/translate-react/vite";
export default defineConfig({
plugins: [weglotPlugin({ sourceRoot: "src" })],
});Then wrap your app with WeglotProvider. See the full setup.
Customize your integration
Join the Weglot developer community
Ask questions, share feedback and follow what we build.
Last updated