Is there a way to dynamically pass the I18n.locale
to fullcalendar, so that the calendar language can change based on the user's selected locale?
This is my current JavaScript code:
return $('#event_calendar').fullCalendar({
events: app.vars.events,
locale: 'I18n.locale' )}
Unfortunately, using ('I18n.locale') as the locale parameter does not work and continues to render in the default language.
Here is part of the Application_controller setup:
I18n.locale = Tenant.current_tenant.try(:locale) || I18n.default_locale