getAvailableLocaleCodes not refreshing when new locales are fetched dynamically
See original GitHub issueIn our code we fetch new locales dynamically and then eval them. This seems to work fine, that is, the calendar uses the new locale just fine when we do calendar.setOption('locale', locale)
. However, calendar.getAvailableLocaleCodes()
returns only the ones that were available when the calendar was created and doesn’t reflect the newly added ones. In version 3 we did the same with $.fullCalendar.locales
and it did refresh when we evaled new locales.
P.S. Another thing is that the firstDay
doesn’t change when calendar.setOption('locale', locale)
is invoked. It only dynamically changes when a new calendar is created. Should I open a new issue for that?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
java - Why some locales are not working even if available?
I know that the localization depends on the locales available on the JRE, my app is currently running in a Docker container where...
Read more >Need help designing some JUnit tests - Google Groups
Your current JVM doesn't have new Locales, so writing for ones that don't exist is clearly not possible. However, you can use
Read more >Locale getAvailableLocales() Method in Java with Examples
Return Value: This method returns the array collection of all the installed locales. Below program illustrates the working of ...
Read more >A Beginner's Guide to Internationalization in Java | Phrase
Compound messages have constituents that need to be translated into locale-specific code, and cannot be handled by resource bundles alone.
Read more >Advanced Features: Internationalized Routing - Next.js
The default locale does not have a prefix. Domain Routing. By using domain routing you can configure locales to be served from different ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Loading locales after the calendar was initialized wasn’t documented in v3 so I think it’s not really a regression but I can leave this open as a feature request.
@arshaw - well, this issue is even worse in FullCalendar version 5. The locales there are not browserified and one cannot simply import them dynamically in a website:
I have configured my bundler to copy these locales to my distribution and then I have setup code to dynamically load locales as requested by the user - in order to not download to that user all locales upfront.
In version 4 that worked fine because the locale files were browserified. But then
getAvailableLocaleCodes
didn’t “refresh” when a new locale was added - I had to create a new Calendar instance for it to work.In version 5 I have to manually “fix” the locale files to work in a browser. And I removed my workarounds with creating a new Calendar instance and all that.
So the issue can be closed, yes, even though the underlying problem is still there albeit not relevant any more to me.
Thanks for the support!