Primeng: Change locale of Schedule string

Created on 1 Mar 2017  路  1Comment  路  Source: primefaces/primeng

To be compatible with fullcalendar api, set locale as a string rather than an object.

enhancement

Most helpful comment

I have added PrimeNg Schedule (latest version 4.0.3) to my Angular 4 app and it works fine.
I would now like to change the locale from default english to "nb".

I see the doc (https://www.primefaces.org/primeng/#/schedule) says

"Localization for different languages and formats is defined by binding the settings object to the locale property. Following is a schedule with Spanish month names."

...

""

but using this exact code does not work. It is still showing the default english texts.

And looking at the changed code here it seems to have previously included an object with Spanish month names which explains the doc, but this is no longer correct.

And the doc saying it binds to the "settings object" is probably also outdated? Hard to tell since I don't see any description of said "settings object"

And the change in schedule.ts seems to simply assign the submitted locale to config.locale? Is that it? I would be suprised of you don't need a bit more code for this to work unless there has been changes in other commits.

I see in my "node_modules/fullcalendar/dist/locale" folder that a lot of locales are included there, including "es" and "nb". Why are they not used by Schedule's Locale support?

Regards
/Ragnar Westad

>All comments

I have added PrimeNg Schedule (latest version 4.0.3) to my Angular 4 app and it works fine.
I would now like to change the locale from default english to "nb".

I see the doc (https://www.primefaces.org/primeng/#/schedule) says

"Localization for different languages and formats is defined by binding the settings object to the locale property. Following is a schedule with Spanish month names."

...

""

but using this exact code does not work. It is still showing the default english texts.

And looking at the changed code here it seems to have previously included an object with Spanish month names which explains the doc, but this is no longer correct.

And the doc saying it binds to the "settings object" is probably also outdated? Hard to tell since I don't see any description of said "settings object"

And the change in schedule.ts seems to simply assign the submitted locale to config.locale? Is that it? I would be suprised of you don't need a bit more code for this to work unless there has been changes in other commits.

I see in my "node_modules/fullcalendar/dist/locale" folder that a lot of locales are included there, including "es" and "nb". Why are they not used by Schedule's Locale support?

Regards
/Ragnar Westad

Was this page helpful?
0 / 5 - 0 ratings

Related issues

just-paja picture just-paja  路  3Comments

philly-vanilly picture philly-vanilly  路  3Comments

papiroca-tm picture papiroca-tm  路  3Comments

Helayxa picture Helayxa  路  3Comments

cyberrranger picture cyberrranger  路  3Comments