Skip to main content
Version: 4.x.x

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.