I18n configuration server-side
Hello π I have a app with the nuxt-i18n module and different domains. I have a server route for verifying emails:
/verify-email
In this server-route I'm calling an external backend which requires a locale parameter, so I need to figure which language corresponds to the incoming request host.
The app runs in a few different environments which have their domains specified by .env variables.
Preferably I would like to get access to the current i18n configuration in my server/route. Does anyone have any idea how I could achieve that?
Thank you π1 Reply
I ended up including the i18n configurations in runtimeConfig. Not sure if it's the most optimal way of doing it but it works for my purpose: