Our powerful JS Calendar component


Post by luiscloud »

I want to translate Agenda filters (Decade, Year, Month, Week and Day)

On example deutch translations i only find "decade" translation on "unitNames" object.
I add "unitNames" in spanish but it doesnt work. The others translations keys works fine but agenda filters continue on english.

 const localeEs = {
  localeName: 'Es', 
  localeDesc: 'Spanish',
  Calendar : {
    Today    : 'Hoy',    
}, DateHelper : { locale: 'es-ES', unitNames : [ { single : 'Milisegundo', plural : 'Milisegundos', abbrev : 'ms' }, { single : 'Segundo', plural : 'Segundos', abbrev : 's' }, { single : 'Minuto', plural : 'Minutos', abbrev : 'min' }, { single : 'Hora', plural : 'Horas', abbrev : 'h' }, { single : 'Día', plural : 'Días', abbrev : 'd' }, { single : 'Semana', plural : 'Semanas', abbrev : 'S' }, { single : 'Mes', plural : 'Meses', abbrev : 'M' }, { single : 'Cuarto', plural : 'Cuartos', abbrev : 'Q' }, { single : 'Año', plural : 'Años', abbrev : 'a' }, { single : 'Década', plural : 'Décadas', abbrev : 'dec' } ], }, NumberFormat : { locale : 'es-ES', currency : 'EUR' }, DayView : { Day : 'Día', dayUnit : 'día', daysUnit : 'días', expandAllDayRow : 'Mostrar todo el día', collapseAllDayRow : 'Ocultar todo el día' }, WeekView : { Week : 'Semana', weekUnit : 'Semanas' }, MonthView : { Month : 'Mes', monthUnit : 'mes' }, YearView : { Year : 'Año', yearUnit : 'año' }, AgendaView : { Agenda : 'Agenda', }, } LocaleManager.registerLocale('Es', { desc : 'Spanish', locale : LocaleHelper.mergeLocales(En, localeEs) }) LocaleManager.applyLocale('Es')

Screenshoot to explain:

Image


Post by alex.l »

Hi luiscloud,

Thank you for creating a new thread.

It re-uses EventEdit localization object. In locale it should be defined like:

EventEdit : {
        // ...
        'All day'    : 'Den ganzen tag',
        day          : 'Tag',
        week         : 'Woche',
        month        : 'Monat',
        year         : 'Jahr',
        decade       : 'Dekade'
    },

If it doesn't work, try to upgrade version. We had it not localized a while ago, but fixed.

All the best,
Alex


Post by luiscloud »

It works, thanks


Post Reply