Closed Ischafak closed 9 months ago
oh ok i guess its about threshhold when i write dddd it wrote truly
Ok, no problem. You can check the last line in playground. I upgraded the dependencies.
@GaborTorma i have 1 more thing to ask actually when i change language with $i18n.setLocale the texts are changing directly but date is not rerendering is there anything i can do about that
You can check the config of playground. If you change the languange with the comcobox, it use $i18n.setLocale and the date changed immediately.
i am trying to do it with buttons right now. I have 2 buttons one of them is changing language to en the other one changing to tr. When i click buttons my other texts are changing but {{ $df(company.subscription.data.renewal_at, 'dddd') }} this one is not changing.
It works well in the playground. Can you provide a minimum repo for testing?
i dont know did i do something wrong but this https://codesandbox.io/p/devbox/keen-volhard-8t9hw9?file=%2Fpages%2Findex.vue @GaborTorma
in my project looks like it is working on index.vue but in component it is not changing
1 more thing even if there is a single valid $t('') the component rerenders so it looks alright but if there is no $t the component is not rendering again so day looks old
Thanx for reporting this. It's an interesting issue. Later I will check it.
Fixed: Codesandbox
Sorry for the late response.
there is a problem that i dont understand
{{ $df('2023-09-07 15:00:02', 'L LTS') }} when i write this i see 'L LTS' in screen
i18n: { locales: [{ code: 'tr', iso: 'tr', file: '/i18n/tr/index.js', name: 'Turkish', }, { // use same code with dayjs locale file names: // https://github.com/iamkun/dayjs/tree/dev/src/locale code: 'en', iso: 'en', file: '/i18n/en/index.js', name: 'English', }], defaultLocale: 'tr', detectBrowserLanguage: false, vueI18n: './i18n.config.ts' }, dayjs: { locales: ['tr', 'en'] }, dayjsI18n: { computedPlugins: true, // you can specify in array: ['localiztedFormat', 'relativeTime', 'localeData'] provideFormat: true, // provide $df for Vue debug: false, },
"nuxt": "3.8.1", "dayjs-nuxt": "^2.1.9", "@gabortorma/nuxt-dayjs-i18n": "^2.0.1",
inside modules '@gabortorma/nuxt-dayjs-i18n', '@nuxtjs/i18n', ['dayjs-nuxt', {plugins: ['customParseFormat']}],