How is the correct way to localize the name of a preset?
I try in locale-de.js
, PresetManager: {
weekAndDay: {
"weekAndDay" : "Wochen",
but scheduler shows only the key weekAndDay
...
Sorry for the delay, but i was out of office.
The code snippet show an entry in the localization.js wich is loaded by the locale manger.
So weekAndDay is the Id of an preset and i hoped that preset manager or scheduler localize the name-property of this preset according to the id. Localization guids so nothing about localize a name of a preset, only date and time formats.
Every viewPreset
has a name
property that may contain human readable text.
This property has not being localized, I've opened a ticket for that https://github.com/bryntum/support/issues/5195
As a workaround, you could manually go throw it in scheduler.presets
store and apply localized name.
https://bryntum.com/docs/scheduler/api/Scheduler/view/Scheduler#property-presets
https://bryntum.com/docs/scheduler/api/Scheduler/preset/PresetStore
https://bryntum.com/docs/scheduler/api/Scheduler/preset/PresetStore#function-forEach
but scheduler shows only the key weekAndDay...
Please let us know where in the Scheduler you see this key?
All the best,
Alex
Heres the snippet from our custom locale
PresetManager: {
minuteAndHour: {
topDateFormat: 'ddd DD.MM, HH:mm'
, name: "Minuten"
},
hourAndDay: {
topDateFormat: 'ddd DD.MM'
, name: "Stunden"
},
weekAndDay: {
displayDateFormat: 'HH:mm'
, name: "Wochen"
}
, day: { name: "Tag/Stunden" }
, week: { name: "Woche/Stunden" }
, dayAndWeek: { name: "Woche/Tage" }
, dayWeekOfTheYear: { name: "Kalenderwoche/Tage" }
, dayAndMonth: { name: "Monat" }
, weekOfTheYear: { name: "Monat/Kalenderwoche" }
, weekAndDay: { name: "Woche" }
, weekAndMonth: { name: "Wochen" }
, weekAndDayLetter: { name: "Wochen/Wochentag" }
, weekDateAndMonth: { name: "Monate/Wochen" }
, monthAndYear: { name: "Monate" }
, year: { name: "Jahre" }
, manyYears: { name: "mehrerer Jahre" }
},
Thank you, you're right, it works, but not on the fly. We will fix this moment and update docs accordingly in bounds of this ticket https://github.com/bryntum/support/issues/5195
All the best,
Alex