Next.js Discord

Discord Forum

i18n questions (3 of them)

Unanswered
Chinese Alligator posted this in #help-forum
Open in Discord
Avatar
Chinese AlligatorOP
I am going to begin writing an app, and i had 3 questions about internationalization:
1. from what i read i need to have a file in my-app/locals/en-CA.json (is that correct), which would serve Canadian English. This file would become absolutely massive with the amount of text, so is there any way that it can be split so that I could have one for the welcome page and one for the dashboard and so on?
2. Is there a way to get a list of all supported locals?
3. Is there any way to get strings for a local i am not in using something like useTranslation();? I want to create a home page where some of the text loops between languages, and my current idea was to get a list of all locals, and then to randomize them and request each locals translations before looping them, but I have no idea if that can be done, or if my approach is correct.

1 Reply

Avatar
Cape lion
I think, we can't answer this as easy. you are asking for particullar features which could be different depending of which library you want to use for i18n