| | |
| | | /* |
| | | * @Description: file content |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-18 15:09:47 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-17 04:31:26 |
| | | */ |
| | | import type { App } from 'vue'; |
| | | import type { I18nOptions } from 'vue-i18n'; |
| | | import type { I18n, I18nOptions } from 'vue-i18n'; |
| | | |
| | | import { createI18n } from 'vue-i18n'; |
| | | import { setHtmlPageLang, setLoadLocalePool } from './helper'; |
| | |
| | | // setup i18n instance with glob |
| | | export async function setupI18n(app: App) { |
| | | const options = await createI18nOptions(); |
| | | i18n = createI18n(options); |
| | | i18n = createI18n(options) as I18n; |
| | | app.use(i18n); |
| | | } |