Skip to main content

Switching languages

For language management, use useLanguage composition function, which is reactive, so you can use it easily with v-model:

<select v-model="language" class="lang-selector">
<option value="en">🇬🇧 English</option>
<option value="de">🇩🇪 Deutsch</option>

import { defineComponent } from 'vue';
import { useLanguage } from '@tolgee/vue';

export default defineComponent({
setup() {
const language = useLanguage();
return { language };

Of course you can use it also to manually get or set language.