Premium support for our pure JavaScript UI components


Post by EarlyHost »

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...


Post by marcio »

Hello EarlyHost,

Perhaps you're looking for the name key?? Could you please share how are you setting up the use of the localization in your presets configuration??

Best regards,
Márcio


Post by EarlyHost »

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.


Post by alex.l »

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


Post Reply