Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-04-16 15:18:44 +03:00
parent 1831c45a0c
commit 2d369e7d7d
40 changed files with 3477 additions and 97 deletions

View File

@@ -0,0 +1,30 @@
import dayjs from 'dayjs'
import 'dayjs/locale/tr.js'
import 'dayjs/locale/en.js'
import 'dayjs/locale/de.js'
import 'dayjs/locale/it.js'
import 'dayjs/locale/es.js'
import 'dayjs/locale/ru.js'
import 'dayjs/locale/ar.js'
import { normalizeLocale } from './languages.js'
export const DATE_LOCALE_MAP = {
tr: 'tr-TR',
en: 'en-US',
de: 'de-DE',
it: 'it-IT',
es: 'es-ES',
ru: 'ru-RU',
ar: 'ar'
}
export function applyDayjsLocale(locale) {
const normalized = normalizeLocale(locale)
dayjs.locale(normalized)
}
export function getDateLocale(locale) {
const normalized = normalizeLocale(locale)
return DATE_LOCALE_MAP[normalized] || DATE_LOCALE_MAP.tr
}