Next-Intl + Tauri (or Electron, or generally { output: 'export' }
)
#1637
jd-carroll
started this conversation in
General
Replies: 1 comment
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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