How to add langs/locales list in nuxtjs-i18n configuration dynamically. #2794
Replies: 1 comment
-
Hello, I'm in a similar situation, I'm trying to find a way to dynamically set the list of locales with a list that I receive from a request to the backend. My app is not SSR though. If anyone has a solution for this, it would be greatly appreciated 😊 For now we've implemented a hack : we've been setting an extended list in the i18n configuration with all the possible languages that our app has ever been used with (10+ languages) and manually checking in the onBeforeLanguageSwitch hook that the language selected by the user is in the list of configured languages received from the backend. |
Beta Was this translation helpful? Give feedback.
-
Hi Can someone plz guide me , how i can update/add list of locales in i18n configuration.
In nuxt.config.js i don't have list of langs.
but on SSR I get list of locals/langs from strapi, that i want to add in i18 lang options list.
How i can do this.
Beta Was this translation helpful? Give feedback.
All reactions