Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update localization settings and translations #211

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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