You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
615 B
21 lines
615 B
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { RouterView, useRoute } from 'vue-router'
|
|
import zhCn from 'element-plus/es/locale/lang/zh-cn.mjs'
|
|
import en from 'element-plus/es/locale/lang/en.mjs'
|
|
import { isRegistrationPortalRouteName, localeFromQuery, PORTAL_LOCALE_EN } from './i18n/portalLocale'
|
|
|
|
const route = useRoute()
|
|
const epLocale = computed(() =>
|
|
isRegistrationPortalRouteName(route.name) && localeFromQuery(route.query) === PORTAL_LOCALE_EN
|
|
? en
|
|
: zhCn,
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<el-config-provider :locale="epLocale">
|
|
<RouterView />
|
|
</el-config-provider>
|
|
</template>
|