Skip to content

Vue

The official @sonenta/vue-i18n SDK loads your released translations from the Sonenta CDN, resolved by the same shared engine as every other framework, so keys behave identically across React, Vue, Svelte and Next.js.

Sign in, create a project, copy its UUID. Manage keys and translations from your AI editor over MCP, the CLI, or the dashboard.

Open the dashboard

Fenêtre de terminal
npm i @sonenta/vue-i18n i18next vue

Wire the SDK with your project token, UUID and namespaces. Available languages come from the published CDN manifest, so there is no locales array. It fetches the released bundles and resolves them through the shared engine.

main.ts
import { createApp } from "vue";
import { createSonentaI18n } from "@sonenta/vue-i18n";
import App from "./App.vue";
const i18n = createSonentaI18n({
token: import.meta.env.VITE_SONENTA_TOKEN,
projectUuid: "<your-project-uuid>",
defaultLocale: "fr",
namespaces: ["common"],
});
createApp(App).use(i18n).mount("#app");

Use the framework-native binding: your usual translation call, backed by Sonenta:

<script setup>
import { useTranslation } from "@sonenta/vue-i18n";
const { t, ready } = useTranslation();
</script>
<template>
<h1 v-if="ready">{{ t("home.title") }}</h1>
</template>

Manage keys and translations from your editor: ask your agent over the Sonenta MCP, or use the CLI. No manual key entry.