Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$dayjs not working multilingual #8

Open
Ischafak opened this issue Jun 27, 2024 · 1 comment
Open

$dayjs not working multilingual #8

Ischafak opened this issue Jun 27, 2024 · 1 comment

Comments

@Ischafak
Copy link

Ischafak commented Jun 27, 2024

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
Copy link
Owner

Can you provide a minimal representation repo?

Thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants