Integrates Intlayer internationalization with Vue.js and Nuxt applications. Use when the user asks to "setup Vue i18n", use the "useIntlayer" composable, or manage translations in Vue components.
Recursos
2Instal·la
npx skillscat add aymericzip/intlayer-skills/intlayer-vue Instal·la des del registre de SkillsCat.
SKILL.md
Intlayer Vue Usage
Setup
useIntlayer Composable
<script setup>
import { useIntlayer } from "vue-intlayer";
const content = useIntlayer("my-dictionary-key");
console.log(content.title.raw); // Render as raw
</script>
<template>
<div>
<h1>
<!-- Render the visual editor -->
<content.title />
</h1>
<h1>
<!-- Render as string -->
{{ content.title }}
</h1>
<img :src="content.image.src" :alt="content.image.alt" />
</div>
</template>