تخطَّ إلى المحتوى
Sonenta
← All documentation

Quickstart · Vue 3

Use Sonenta in Vue 3

The official @sonenta/vue-i18n SDK loads your released translations live 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.

1 · Create a project & get your keys

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 →

2 · Install the SDK

npm i @sonenta/vue-i18n i18next vue

3 · Initialize Sonenta

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");

4 · Translate in your components

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.

Add-ons

Same SDK family, framework-native: @sonenta/realtime/vue, @sonenta/in-context/vue, @sonenta/feedback/vue.