question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Schedule: Allow custom localization

See original GitHub issue

Description In PF < 7.0 the Schedule component was configured using PF locales: https://github.com/primefaces/primefaces/wiki/Locales

When we upgraded to Full Calendar 4.X for PF 8.0 it was decided to use the already built translations that come with FullCalendar so if you used locale="fr" for French you would get the French translation from FullCalendar: https://github.com/fullcalendar/fullcalendar/blob/master/packages/core/src/locales/fr.ts

Full list of locales: https://github.com/fullcalendar/fullcalendar/tree/master/packages/core/src/locales

However the ability to override the default or customize the localization was lost.

@christophs78 @blutorange @tandraschko

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
mertsincancommented, Oct 6, 2020

Hi all,

I made the following changes;

  • Added slotLabelFormat to primefaces-p.taglib.xml https://fullcalendar.io/docs/slotLabelFormat
  • Removed monthNames, monthNamesShort, dayNames and dayNamesShort; https://fullcalendar.io/docs/v4/upgrading-from-v3 Users can use the extender method to customize these options. Please see “Locales” section in the above link.
  • For backward compatibility, options supported by FullCalendar (not related to any plugin) have been merged with PrimeFaces locale.
  • Now two separate local values ​​are passed to the widget for FullCalendar and PrimeFaces.locales. Please see this case; PrimeFaces.locales -> pt_BR FullCalendar -> pt-br Maybe there will be two separate locale attributes for Schedule component in the future.
1reaction
blutorangecommented, Sep 26, 2020

@melloware It seems the removed localizations options pertain to date and time formatting. By default, FullCalendar uses the native built-in Intl.DateTimeFormat for localizing dates and times. Additionally, there’s also the moment plugin (which we use). The built-in formatter is used when the date/time format is an object, moment is used when the date/time format is a string (e.g. “dd-MMMM”).

It’s possible to customize the dates and times shown in the FullCalendar by setting a date/time format (e.g.titleFormat), and update moment’s localization options, like this:

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a custom Localization Framework setting to enable bulk ...
Add a custom Localization Framework setting to enable bulk translations · Navigate to All > Localization Framework > Settings. · In the Setting ......
Read more >
Custom Localization - Stardew Valley - Nexus Mods
Custom Localization is a Localization Mod for Stardew Valley Android only. It allow you to custom game's language select button and add new ......
Read more >
Globalization in JavaScript Schedule control - Syncfusion
Localization library allows to display all the static text, date content, and time mode of the Scheduler following the localized language.
Read more >
Understanding localization and Customer interface text
You to localize the Customer scheduling experience by applying different languages, date/time formats, and other language-specific and culture- ...
Read more >
Configuring a custom localization provider - Optimizely
Register localization providers during site initialization. The preferred way to do this is to implement the IInitializableModule interface and handle the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found