Premium support for our pure JavaScript UI components


Post by NARESH.RAI »

Hello,

I have checked gantt localization example but didn't found any reference for GANTT localization in angular.
Please provide details how we can user it with Gantt/ Scheduler Pro / Calendar angular wrappers.

And do we have German language support ?


Post by pmiklashevich »

I have checked gantt localization example but didn't found any reference for GANTT localization in angular.
Please provide details how we can user it with Gantt/ Scheduler Pro / Calendar angular wrappers.

Localization is implemented the same way in all products. Everything is described in this guide is applicable to Angular.
https://www.bryntum.com/docs/gantt/#guides/customization/localization.md

We also have an example of localization is Angular demo in Scheduler. Please check out Scheduler/examples/angular/localization. Though it's a bit different, because it uses i18next which is not required, but to show such usecase.

Also https://www.bryntum.com/docs/gantt/#Core/localization/LocaleManager docs shoud describe everything you need to localize your application.

And do we have German language support ?

Yes, we have German locale but it's not a part of lib. It's a part of examples. Please see localization demo in every product. You'll find localization/locale/custom.locale.De.js file. Feel free to copy it and extend the way you need.

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by NARESH.RAI »

Hello,

Want to apply 1 local to all three components (Gantt/scheduler-pro/calendar) from single file.
So is there any example or any solution you can provide ?


Post by pmiklashevich »

You can use https://www.bryntum.com/docs/gantt/#Core/localization/LocaleHelper#function-mergeLocales-static function to merge different locales in one. Please see how it's done in SchedulerPro, for example:
SchedulerPro/lib/SchedulerPro/localization/En.js

import parentLocale from '../../Scheduler/localization/En.js';
import LocaleHelper from '../../Core/localization/LocaleHelper.js';

const
    locale = LocaleHelper.mergeLocales(parentLocale, /* ...other locales */{
        ConstraintTypePicker : {.....
......
LocaleManager.registerLocale('En', { desc : 'English', locale : locale });

Just import locales from Calendar, Scheduler Pro, and Gantt, merge them into one locale, and override/extend translation if needed.

Cheers!

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply