Skip to content

Commit

Permalink
Move localizedLocale to locales folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Elweyn committed Mar 23, 2024
1 parent 022c869 commit d3bc59a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion presenter/locales/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { extractLocale } from './extractLocale'
export { locales, localeDefault } from './locales'
export { locales, localeDefault, localizedLocale } from './locales'
4 changes: 4 additions & 0 deletions presenter/locales/locales.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export type LocaleCode = 'de' | 'en'
export const locales: LocaleCode[] = ['de', 'en']
export const localeDefault = 'de'
export const localizedLocale = [
{ locale: 'de', title: 'Deutsch' },
{ locale: 'en', title: 'English' },
]
8 changes: 2 additions & 6 deletions presenter/src/components/language/LanguageSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ import { ref } from 'vue'
import { usePageContext } from '#context/usePageContext'
import i18n from '#plugins/i18n'
import { locales } from '#root/locales'
import { locales, localizedLocale } from '#root/locales'
// TODO better place? maybe locales folder?
const languages = ref([
{ locale: 'de', title: 'Deutsch' },
{ locale: 'en', title: 'English' },
])
const languages = ref(localizedLocale)
const pageContext = usePageContext()
Expand Down

0 comments on commit d3bc59a

Please sign in to comment.