You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after some research about nextjs and internatilization my head is burning, because there are so many different possibilities to archive the same.
After a while I came to the point to use next-intl.
But I have two open questions here:
Is it possible to configure my application to operate without specifying a locale in the URL? For instance, accessing localhost:3000/mypage would display the page in the default language (English), while localhost:3000/en/mypage would show the same content in English. Conversely, selecting a different language, such as Dutch via localhost:3000/nl/mypage, would present the page in Dutch. This functionality mirrors the behavior observed on websites like tesla.com and apple.com, where the default language is displayed for the main page when no specific locale is included in the path.
Regarding the mechanism of translation retrieval on the client side, I'm curious about the specifics of how it operates. Does the client download the entire en.json file for parsing, or are only selected entries sent over by the server? This question arises from my observations of various i18n implementations where it appears that the client only downloads the data relevant to the current namespace specified within the useTranslation("myNamespace") function. This seems to be a more efficient approach, and I'm wondering if it's applicable or already in use within the context of next-intl.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
after some research about nextjs and internatilization my head is burning, because there are so many different possibilities to archive the same.
After a while I came to the point to use next-intl.
But I have two open questions here:
Is it possible to configure my application to operate without specifying a locale in the URL? For instance, accessing localhost:3000/mypage would display the page in the default language (English), while localhost:3000/en/mypage would show the same content in English. Conversely, selecting a different language, such as Dutch via localhost:3000/nl/mypage, would present the page in Dutch. This functionality mirrors the behavior observed on websites like tesla.com and apple.com, where the default language is displayed for the main page when no specific locale is included in the path.
Regarding the mechanism of translation retrieval on the client side, I'm curious about the specifics of how it operates. Does the client download the entire en.json file for parsing, or are only selected entries sent over by the server? This question arises from my observations of various i18n implementations where it appears that the client only downloads the data relevant to the current namespace specified within the useTranslation("myNamespace") function. This seems to be a more efficient approach, and I'm wondering if it's applicable or already in use within the context of next-intl.
T
Beta Was this translation helpful? Give feedback.
All reactions