Appearance
Vue 3
bash
pnpm add @stringpush/vue @stringpush/sdk vuets
import { createApp } from "vue";
import { createTranslationPlugin } from "@stringpush/vue";
import App from "./App.vue";
const app = createApp(App);
app.use(
createTranslationPlugin({
applicationId: "<uuid>",
environment: "staging",
locale: "en",
apiKey: "trt_…",
apiBaseUrl: "https://api.platform.stringpush.com",
origin: window.location.origin,
}),
);
app.mount("#app");ts
import { useTranslation } from "@stringpush/vue";
const { t, isReady } = useTranslation();
// template: <p v-if="isReady">{{ t("common.greeting") }}</p>Overlay options pass through the plugin config — same fields as init() on the SDK.