Как я могу передать I18n.locale
в fullcalendar, чтобы язык календаря менялся, если пользователь изменяет I18.locale
?
Мой JS:
return $('#event_calendar').fullCalendar({
events: app.vars.events,
locale: 'I18n.locale' )}
('I18n.locale') не работает и отображает язык по умолчанию.
application_controller:
I18n.locale = Tenant.current_tenant.try(:locale) || I18n.default_locale