Next.js Discord

Discord Forum

Issues with Next Internationalization

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Avatar
Masai LionOP
I'm currently working on implementing language support for both Spanish and English on my website using Next Internationalization. To achieve this, I've organized my project with a directory named 'components' where I intend to house various components to be translated. However, as I began translating texts within this directory, I encountered an error indicating that the context from 'NextIntlClientProvider' was not found. Despite diligently following the troubleshooting steps outlined in the [Next Internationalization documentation](https://next-intl-docs.vercel.app/docs/environments/server-client-components#using-internationalization-in-server-components) and referencing their [sample code on github](https://github.com/amannn/next-intl/blob/main/examples/example-app-router/src/components/Navigation.tsx), the issue persists. I'm currently at a loss as to why this error is occurring and how to resolve it.

Here I will leave the link for my GitHub Repository that only contains the file I think the issue lives on.
[Github Repo](https://github.com/yoboywhat/NextInternationalizationIssue/blob/main/TopPage.tsx)

12 Replies

Avatar
Masai LionOP
Hello, I just send this to prevent my post to get lost.

I modified my file and made it so it is server-sided, but some tools only work on client, so like it or not I have to make the file work on client :meow_stare:
Avatar
not-milo.tsx
My server username used to be milo loves docs & i18n :noice:
I'll clone the repo and see if I can fix it
Avatar
Masai LionOP
I am reading the docs and using gpt to discover what could be the best answer to this dilemma. I already “cloned” the repo and nothing.
Because i18n works on the server-side. But the tools I use are client-side. Lmao
Avatar
Masai LionOP
I think I got an answer. I will test it and see what happens ig
Avatar
not-milo.tsx
Could you share the actual repo or some relevant code?
Avatar
Masai LionOP
I shared my code above. I only placed only a piece of the code, just the relevant.
Avatar
not-milo.tsx
Yeah I saw that, but I meant sharing it here so other people can see it even if you delete the repo.
Avatar
Masai LionOP
I think I found a solution. I will see that first, tho I don’t think it’s really important to care if I delete or not the repo if I am going to delete this forum when there is a solution
Avatar
Masai LionOP
I finally could access this forum