mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
25 lines
723 B
Vue
25 lines
723 B
Vue
<script setup lang="ts">
|
|
// see ../composables/locale.ts for the implementation
|
|
const locales = useLocales()
|
|
const locale = useLocale()
|
|
const date = useLocaleDate(new Date('2016-10-26') /* NUXT_BIRTHDAY */)
|
|
</script>
|
|
|
|
<template>
|
|
<NuxtExampleLayout example="other/locale">
|
|
<h1 class="text-xl opacity-50">
|
|
Nuxt birthday
|
|
</h1>
|
|
<p class="text-4xl">
|
|
{{ date }}
|
|
</p>
|
|
<div class="mt-4" />
|
|
<label for="locale-chooser">Preview a different locale</label>
|
|
<select id="locale-chooser" v-model="locale" class="m-auto w-50 border n-border-base rounded p-1">
|
|
<option v-for="l of locales" :key="l" :value="l">
|
|
{{ l }}
|
|
</option>
|
|
</select>
|
|
</NuxtExampleLayout>
|
|
</template>
|