Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

切换语言不能响应式的变化 m #78

Open
lurongjie opened this issue Dec 30, 2024 · 5 comments
Open

切换语言不能响应式的变化 m #78

lurongjie opened this issue Dec 30, 2024 · 5 comments

Comments

@lurongjie
Copy link

lurongjie commented Dec 30, 2024

translate

const changeClick = async () => {
if (i18nScope.activeLanguage == "en") {
await i18nScope.change("zh")
}else {
await i18nScope.change("en")
}
}切换完成后语言成功了,但是页面无响应变化
项目配置:vue3 webpack

@lurongjie lurongjie changed the title 切换语言不能响应式的变化 切换语言不能响应式的变化 m Dec 30, 2024
@zhangfisher
Copy link
Owner

这是文档

还有示例,请检查是否有哪里少了一个步骤

@lurongjie
Copy link
Author

是否与项目搭建有关系,我的demo是用webpack搭的,切换后需要reload一下才能切换语言下显示

@ynxXt
Copy link

ynxXt commented Jan 14, 2025

vite项目 配置 Voerkai18nPlugin({ autoImport: false }) ;

@lurongjie
Copy link
Author

不是vite项目怎么办,只能reload吗

@zhangfisher
Copy link
Owner

切换语言与vite插件无关,如果是vue3则应访使用@voerkai18n/vue

文档

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants