Dynamically load i18n messages based on context
I'm using
I tried to achieve this using lazy loading:
However, because I'm using
How can I best achieve dynamic loading of messages based on a context other than locale? (e.g. based on a certain route param)
@nuxtjs/i18n and was wondering if it's possible to dynamically load/switch messages based on context (in my case, context is organization). In my case, organizations are of different types/templates, and for some organization templates, I would like to switch the messages to use different terminology.I tried to achieve this using lazy loading:
However, because I'm using
useRoute() in that handler, it results in the following error:How can I best achieve dynamic loading of messages based on a context other than locale? (e.g. based on a certain route param)