Our state of the art Gantt chart


Post by Jean2 »

Hi team bryntum,

I have read the documentation on how to change the location and followed the steps, but only the last option has worked for me ...

4.Change single entries ...
https://bryntum.com/docs/gantt/#guides/customization/localization.md

Well, I created a file with the settings, from English to Spanish.
(attached file localeEs.js)

I made the reference to the file, I change the texts of the components, but in the case of the dates it does not.

import localeEs from '../components/gantt/localeEs';

gantt.localeManager.locale = localeEs;

Could you tell me where or what additional settings should I add to change it to the language I want?

Attachments
Dates in english
Dates in english
gantt_calendar_english.PNG (147.34 KiB) Viewed 565 times
Code attached file localeEs.js
Code attached file localeEs.js
gantlocalees.PNG (76.98 KiB) Viewed 565 times
localeEs.js
(21.5 KiB) Downloaded 98 times

Post by pmiklashevich »

To localize the day names please override DateHelper.locale property. Change 'en-US' to 'es-ES'.

        DateHelper : {
            locale       : 'es-ES',

When create a new locale please register it. See registerLocale. You can also extend one of existing locales. To apply new locale please use applyLocale

// ganttlocale is your locale definitions
LocaleManager.registerLocale('Es', { desc : 'Spanish', locale : ganttlocale });

And apply locale

LocaleManager.applyLocale('Es');

We will update our guide. Thank you for the feedback!

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply