Next-Intl + Tauri (or Electron, or generally { output: 'export' }
)
#1637
Replies: 2 comments
-
So I spent all day chasing this, and I'm beginning to sense that it is just not possible... Would love any thoughts to the contrary and/or points in the right direction. But otherwise will look to use |
Beta Was this translation helpful? Give feedback.
-
Have you seen Usage without middleware (static export)?
That's not quite true. The limitation however is that you can't use APIs like
You could probably implement this if you use On a separate note, have you considered just using a setup with Vite? With the current constraints of Next.js, this might be a good option. You can still use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to build a mobile app leveraging NextJS, Next-Intl, and Tauri (but I think this discussion would apply for any NextJS app with
{ output: 'export' }
).Because there is no middleware support when you
export
, I think I am required to use a "Without i18n routing" strategy (but maybe not?).I've followed along in the discussions here:
In addition to there not being any middleware support (for obvious reasons) the other challenge you face when using
{ output: 'export' }
is that there is also no'use server'
support. Again, all for the same reason... there is no server.What would a "Client only" strategy look like that is in addition to the "With i18n routing" and "Without i18n routing" strategies?
I'll note that it should still be possible for a user to change their selected language. Additionally, if no language preference exists then it should default to the
Navigator.language
. The implication of this later point is that the locale would not be available until the first render.I've tried a number of ways to accomplish this, but all of them seem a little awkward. And I am not entirely familiar with the nextjs-plugin and the magic that happens there.
Any support greatly appreciated! ❤️
Beta Was this translation helpful? Give feedback.
All reactions