Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change locale of Schedule string #2188

Closed
cagataycivici opened this issue Mar 1, 2017 · 1 comment
Closed

Change locale of Schedule string #2188

cagataycivici opened this issue Mar 1, 2017 · 1 comment
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cagataycivici
Copy link
Member

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

@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Mar 1, 2017
@cagataycivici cagataycivici added this to the 2.0.2 milestone Mar 1, 2017
@cagataycivici cagataycivici self-assigned this Mar 1, 2017
@ragnarwestad
Copy link

ragnarwestad commented Jun 12, 2017

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

...

"<p-schedule [events]="events" locale="es">"

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants