Created a patch that enables custom translation messages passed to the v-calendar
Steps to include it in your project:
- set exact package version for
"v-calendar": "2.4.2"
in yourpackage.json
- in your imports use
import VCalendar from 'v-calendar/src/lib';
instead ofimport VCalendar from 'v-calendar';
- install as a dev dependency
"@popperjs/core": "^2.4.0"
because v-calendar won't run without it - add
build: { transpile: ['v-calendar'] }
to yournuxt.config.js
because it would complain "Cannot import outside module" - copy patches folder from this repository and include to your project
- install
patch-package postinstall-postinstall
packages as dev dependency - add
"postinstall": "patch-package"
to your scripts inpackage.json
npm install
oryarn
and your package will be patched
now you can pass
componentPrefix: 'vc',
locales: {
kz: {
translations: {
dayNames: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі"],
}
}
}
})
and it will work when you explicitly set required locale in your component <vc-calendar title-position="left" locale="kz" />