Calendar Layout – Language Localization

The  calendar will attempt to localize the language based on the WordPress website setting.

However, the calendar uses a third party library ( fullcalendar.io )  and the language support is not aligned or as broad as WordPress, the plugin will attempt to derive the correct language / locale setting from WordPress but that may not always suit your requirements.

However the plugin has a filter  wfea_cal_locale that allows you to specify the language your desire.   This filter can be applied in your child theme’s functions.php for instance.

e.g. to force the calendar to use  Taiwan Chinese and ignore the WordPress setting you could add a filter as follows

add_filter('wfea_cal_locale','my_locale_func');

function my_locale_func($locale) {
   return 'zh-tw';
}

This is of language codes currently supported by fullcalendar.io is

af
ar-dz
ar
ar-kw
ar-ly
ar-ma
ar-sa
ar-tn
bg
bs
ca
cs
da
de-at
de-ch
de
el
en-au
en-ca
en-gb
en-ie
en-nz
es-do
es
es-us
et
eu
fa
fi
fr-ca
fr-ch
fr
gl
he
hi
hr
hu
id
is
it
ja
ka
kk
ko
lb
lt
lv
mk
ms
ms-my
nb
nl-be
nl
nn
pl
pt-br
pt
_reset
ro
ru
sk
sl
sq
sr-cyrl
sr
sv
th
tr
uk
vi
zh-cn
zh-tw

Was this helpful?