Closed mbattista closed 1 year ago
That looks like a good solution, although its not permanent and controlled by user.
I think adding env NEKO_LANG=de
would be prefered way if your audience expect certain language. Though we don't have any way how to pass env variables to the frontend especially before login. Therefore I don't think its worth the effort and your solution is elegant. People could even add this parameter to their reverse proxy and that way enforce it for everyone.
My first thought also was to add it to the env variables. Like add a replace line into the i18n.ts and replace it before the static FileServer gets started.
But I thought, that a clear cut between client and server should be keepd, so I added it as a URL parameter, which also has the advantage that you can send links in the language you want.
closes #295
Added lang parameter to the URL for default lang. Should probably edit the README or the docs to reflect the change.