From 2ffee2659ed5d34579086ac5608582accf391e7d Mon Sep 17 00:00:00 2001 From: JYC Date: Thu, 11 Jan 2024 19:28:48 +0100 Subject: [PATCH] Update localization settings and translations (#211) --- .../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', + }, + + //... + }, }, - }, + }), }, }); ```