Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Jan 13, 2024
1 parent f254751 commit 8be6c3c
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 185 deletions.
7 changes: 0 additions & 7 deletions packages/playground/locales/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/ar.yml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/de.yml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/id.yml

This file was deleted.

13 changes: 0 additions & 13 deletions packages/playground/locales/it.yml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/ka.yml

This file was deleted.

13 changes: 0 additions & 13 deletions packages/playground/locales/ko.yml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/pl.yml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/pt-BR.yml

This file was deleted.

13 changes: 0 additions & 13 deletions packages/playground/locales/ru.yml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/tr.yml

This file was deleted.

13 changes: 0 additions & 13 deletions packages/playground/locales/uk.yml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/playground/locales/uz.yml

This file was deleted.

13 changes: 0 additions & 13 deletions packages/playground/locales/vi.yml

This file was deleted.

17 changes: 16 additions & 1 deletion packages/playground/src/App.preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ import { useI18n } from 'vue-i18n'
import STC from './components/ScrollToComponent.vue'
import { useAppStore } from './stores'
const { t } = useI18n()
import { availableLocales, loadLanguageAsync } from './modules/i18n'
const age = ref(10)
const app = useAppStore()
const { t, locale } = useI18n()
async function toggleLocales() {
// change to some real logic
const locales = availableLocales
const newLocale = locales[(locales.indexOf(locale.value) + 1) % locales.length]
await loadLanguageAsync(newLocale)
locale.value = newLocale
}
</script>

<template>
Expand All @@ -16,6 +26,11 @@ const app = useAppStore()
<p>
<em text-sm opacity-75>{{ t('intro.desc') }}</em>
</p>
<p>
<a icon-btn :title="t('button.toggle_langs')" @click="toggleLocales()">
Toggle Langs
</a>
</p>
<p>
Age: {{ age }}
</p>
Expand Down

0 comments on commit 8be6c3c

Please sign in to comment.