From dbcd18b00c65fa5a169a5c2b13c273bbc66e0ccd Mon Sep 17 00:00:00 2001 From: jycouet Date: Thu, 11 Jan 2024 17:37:40 +0100 Subject: [PATCH] Update localization settings and translations --- .../src/routes/customization/+page.md | 87 +++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/packages/svelte-ux/src/routes/customization/+page.md b/packages/svelte-ux/src/routes/customization/+page.md index d1bf55d2d..57d280faf 100644 --- a/packages/svelte-ux/src/routes/customization/+page.md +++ b/packages/svelte-ux/src/routes/customization/+page.md @@ -62,57 +62,54 @@ settings({ }, }, - formats: { - numbers: { - // This is the default, but you can override it here for your app globally - default: { - locales: 'en', - currency: 'USD', - fractionDigits: 2, - currencyDisplay: 'symbol', - }, - // and/or per preset - currency: { - locales: 'fr', - currency: 'EUR', - }, - decimal: { - fractionDigits: 4, - }, - }, - - dates: { - // This is the default, but you can override it here for your app - locales: 'en', - weekStartsOn: DayOfWeek.Sunday, - - presets: { - day: { - long: { dateStyle: 'full' }, - }, - month: { - default: [DateToken.Month_long], + // fallbackLocale: 'fr', + localeFormats: { + fr: createLocaleSettings({ + locale: 'fr', + + formats: { + dates: { + baseParsing: 'dd/MM/yyyy', + ordinalSuffixes: { + one: 'er', + }, }, - }, - ordinalSuffixes: { - en: { - one: 'st', - two: 'nd', - few: 'rd', + numbers: { + defaults: { + currency: 'EUR', + }, }, }, - dico: { - Day: 'Day', - Week: 'Week', - BiWeek: 'Bi-Week', - Month: 'Month', - Quarter: 'Quarter', - CalendarYear: 'Calendar Year', - FiscalYearOct: 'Fiscal Year (Oct)', + dictionary: { + Ok: 'Valider', + Cancel: 'Annuler', + + Date: { + Start: 'Début', + End: 'Fin', + + Day: 'Jour', + DayTime: 'Jour & Heure', + Time: 'Heure', + Week: 'Semaine', + Month: 'Mois', + Quarter: 'Trimestre', + CalendarYear: 'Année', + FiscalYearOct: 'Année fiscale (octobre)', + BiWeek: 'Bi-hebdomadaire', + + PeriodDay: { + Current: "Aujourd'hui", + Last: 'Hier', + LastX: 'Les {0} derniers jours', + }, + + //... + }, }, - }, + }), }, }); ```