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
In next.js 12 page router support multi language feature without introducing path/folder, handled internally by framework.
Let's say I have 3 language en, bn, and de. and en is the default, So if i visit my site with / then it should be the lang in defaultLocale = en, but if I go to any other sub lang path it should load that locale /en, /bn, /de etc.
So for no sub lang path it should be the default locale set in the next config file.
and if possible, support to change the default locale in runtime for support SAAS application.
Non-Goals
Background
We have a SAAS web application currently running on next js 12 page router and have multi language feature, many of our users not enabling multi lang feature yet or they do not need, Now they simply visit their website without any lang subpath, that is ideal. Now we want to upgrade to next 14 app router, we can't . Because every user have to add some lang subpath to their site. this is not wanted by the user if we do so we may lose users.
We found some library that manually create all folders under direct app folder from lang sub folder during dev mood, that seems not ideal and kinda hacky.
Proposal
You can do it like before the way page router i18n works. If we configure i18n configuration then it should do all the routing behind the scene, developer mange it like a framework feature, not by manually doing framework work. If I could help I am glad to contribute.
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
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
We have a SAAS web application currently running on next js 12 page router and have multi language feature, many of our users not enabling multi lang feature yet or they do not need, Now they simply visit their website without any lang subpath, that is ideal. Now we want to upgrade to next 14 app router, we can't . Because every user have to add some lang subpath to their site. this is not wanted by the user if we do so we may lose users.
We found some library that manually create all folders under direct app folder from lang sub folder during dev mood, that seems not ideal and kinda hacky.
Proposal
You can do it like before the way page router i18n works. If we configure i18n configuration then it should do all the routing behind the scene, developer mange it like a framework feature, not by manually doing framework work. If I could help I am glad to contribute.
Beta Was this translation helpful? Give feedback.
All reactions