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

hi, I am learning nuxt+i18n, but I encountered a problem when using t in step #2940

Open
zjluse opened this issue Apr 30, 2024 · 2 comments
Open

Comments

@zjluse
Copy link

zjluse commented Apr 30, 2024

Environment

see here:
https://codesandbox.io/p/github/zjluse/nuxt3-i18n-demo/main?workspaceId=8e4ff903-42a7-414f-a4d0-eae55a1e012d

Reproduction

see here:
https://codesandbox.io/p/github/zjluse/nuxt3-i18n-demo/main?workspaceId=8e4ff903-42a7-414f-a4d0-eae55a1e012d

Describe the bug

I want to use t in the setup function to set the language so that I can toast or dynamically load text, but setLocale does not take effect.

Additional context

No response

Logs

No response

@zjluse
Copy link
Author

zjluse commented Apr 30, 2024

The computed attribute is valid, but it is not suitable for use in some scenarios

const text = computed(() => {
  return t("welcome");
});

@BobbieGoede
Copy link
Collaborator

I'm not sure what the issue is and I'm unable to access your reproduction, perhaps it's not public?

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

No branches or pull requests

2 participants