GaborTorma / nuxt-dayjs-i18n

4 stars 1 forks source link

$dayjs not working multilingual #8

Open Ischafak opened 5 months ago

Ischafak commented 5 months ago

hi am i doing something wrong

in nuxt config js modules: [ ['dayjs-nuxt', { plugins: ['customParseFormat', 'isBetween', 'localizedFormat', 'relativeTime', 'localeData'] }], '@nuxtjs/i18n', '@gabortorma/nuxt-dayjs-i18n', ],

i18n: { strategy: 'no_prefix', locales: ['tr', 'en'], defaultLocale: 'tr', detectBrowserLanguage: false, vueI18n: './i18n.config.ts' }, dayjs: { locales: ['tr', 'en'] }, dayjsI18n: { computedPlugins: true, provideFormat: true, debug: false },

i18nconfigjs file

import tr from './i18n/tr'; import en from './i18n/en'; export default defineI18nConfig(() => ({ fallbackLocale: 'tr', messages: { tr, en, }, }));

with $df is working fine but it is coming multilingual but when i try

{{ $dayjs($dayjs('1992')).fromNow() }}

its not showing the language right
GaborTorma commented 5 months ago

Can you provide a minimal representation repo?

Thanx!