Skip to content

Commit

Permalink
Update localization settings and translations (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
jycouet authored and techniq committed Feb 6, 2024
1 parent 005e684 commit 2ffee26
Showing 1 changed file with 42 additions and 45 deletions.
87 changes: 42 additions & 45 deletions packages/svelte-ux/src/routes/customization/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},

//...
},
},
},
}),
},
});
```
Expand Down

0 comments on commit 2ffee26

Please sign in to comment.