All files / src i18n-host.ce.vue

0% Statements 0/14
100% Branches 1/1
100% Functions 1/1
0% Lines 0/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                                                   
<template>
  <slot />
</template>
 
<script setup lang="ts">
import { provide } from "vue";
import { createI18n, I18nInjectionKey } from "vue-i18n";
 
import deDE from "./utils/de-DE.json";
import enUS from "./utils/en-US.json";
 
const i18n = createI18n({
  legacy: false,
  locale: "de-DE",
  messages: {
    "de-DE": deDE,
    "en-US": enUS,
  },
});
 
/**
 * provide i18n instance with `I18nInjectionKey` for other web components
 */
provide(I18nInjectionKey, i18n);
</script>