Closed pronikell closed 3 years ago
Hello @radek-altof. Thank you for your work. I have a problem with custom options for vue-i18n. (ex. DateTime, Pluralization etc. ) They cannot be transferred to a plugin vue-i18n.
I use a workaround:
--- a/src/plugin/index.js +++ b/src/plugin/index.js @@ -105,7 +105,9 @@ LangRouter.install = function (Vue, options) { i18n = new VueI18n({ locale: defaultLanguage, fallbackLocale: defaultLanguage, - messages, + messages: messages, + dateTimeFormats: options.i18nSettings.dateTimeFormats, + pluralizationRules: options.i18nSettings.pluralizationRules });
and router/index.js:
Vue.use(LangRouter, { defaultLanguage: 'ru', translations, localizedURLs, i18nSettings })
i18nSettings - dateTimeFormats: {...}, pluralizationRules: {..}
PS I see that vue3+ssr support is appearing, it' very cool. :+1:
Hi @pronikell, thanks for pointing that out. You're right, this should be added as an option. Will take a look at it.
Solved in v1.3.0 for Vue 2 and v2.1.1 for Vue 3.
Hello @radek-altof. Thank you for your work. I have a problem with custom options for vue-i18n. (ex. DateTime, Pluralization etc. ) They cannot be transferred to a plugin vue-i18n.
I use a workaround:
and router/index.js:
i18nSettings - dateTimeFormats: {...}, pluralizationRules: {..}
PS I see that vue3+ssr support is appearing, it' very cool. :+1: