mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 17:43:59 +00:00
16 lines
314 B
Vue
16 lines
314 B
Vue
<template>
|
|
<div>
|
|
Locale: {{ locale }}
|
|
<button @click="updateLocale">
|
|
Set to Klington
|
|
</button>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
// Defined in composables/stats.ts
|
|
// same as useState('locale')
|
|
const locale = useLocale()
|
|
const updateLocale = () => { locale.value = 'tlh-klingon' }
|
|
</script>
|