Localization
-
Hi,
Firstly, congratulations for the excellent plugin.
How can I set the localization of the calendar to Portuguese Brazilian? Week and month names display in English. My wordpress install is localized.
Thank you.
-
hi,
did you mean the default EM calendar? EM calendar uses wordpress date_i18n – http://codex.wordpress.org/Function_Reference/date_i18n
also, are you using wordpress language? e.g. http://codex.wordpress.org/WordPress_in_Your_Language#Brazilian_Portuguese_.28pt_BR.29
I mean both EM calendar and WP fullcalendar alone. Week days (monday, tuesday etc) and months apear in English although my wordpress installation is the pt_BR downloaded from the localized brazilian wordpress site.
So it should show months and week days in portuguese, just as dates show in pt_BR, shouldn’t it? It’s not happening.
For a personal project it makes no difference, but for a professional project, it does.
Do you know how to address this?there’s some calendar bits that need to be translated within the php file
if you see wp-fullcalendar.php around lines 120-140 you’ll see two sections that require a pt translation
Hi, thank you for the hint. I changed these bits in my local files and it seems to be working fine now. The file missed strings for pt_BR language. Here’s what I included in the file:
Right after line 131 and before the comment “//extra WP FUllCalendar translations here please”:
‘pt_BR’=>array(‘closeText’=>’Fechar’,’prevText’=>’Anterior’,’nextText’=>’Próximo’,’currentText’=>’Hoje’,’monthNames’=>array(‘Janeiro’,’Fevereiro’,’Março’,’Abril’,’Maio’,’Junho’,’Julho’,’Agosto’,’Setembro’,’Outubro’,’Novembro’,’Dezembro’),’monthNamesShort’=>array(‘Jan’,’Fev’,’Mar’,’Abr’,’Mai’,’Jun’,’Jul’,’Ago’,’Set’,’Out’,’Nov’,’Dez’),’dayNames’=>array(‘Domingo’,’Segunda’,’Terça’,’Quarta’,’Quinta’,’Sexta’,’Sábado’),’dayNamesShort’=>array(‘Dom’,’Seg’,’Ter’,’Qua’,’Qui’,’Sex’,’Sáb’),’dayNamesMin’=>array(‘Do’,’Se’,’Te’,’Qu’,’Qu’,’Se’,’Sa’),’weekHeader’=>’Sem’,’dateFormat’=>’dd/mm/yy’,’firstDay’=>1,’isRTL’=>false,’showMonthAfterYear’=>false,’yearSuffix’=>”)
);Right after the item starting with ‘pt’ below the above mentioned comment:
‘pt_BR’ => array(‘buttonText’ => array(‘today’=>’Hoje’,’month’=>’Mês’,’week’=>’Semana’,’day’=>’Dia’)),I hope you find it useful and once again thank you for this nice piece of plugin.
thx, will include that!
Sorry, I forgot to wrap to the code. Some accent marks got messed up. Here’s the right code:
'pt_BR'=>array('closeText'=>'Fechar','prevText'=>'Anterior','nextText'=>'Próximo','currentText'=>'Hoje','monthNames'=>array('Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'),'monthNamesShort'=>array('Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'),'dayNames'=>array('Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'),'dayNamesShort'=>array('Dom','Seg','Ter','Qua','Qui','Sex','Sáb'),'dayNamesMin'=>array('Do','Se','Te','Qu','Qu','Se','Sa'),'weekHeader'=>'Sem','dateFormat'=>'dd/mm/yy','firstDay'=>1,'isRTL'=>false,'showMonthAfterYear'=>false,'yearSuffix'=>'')
);
'pt_BR' => array('buttonText' => array('today'=>'Hoje','month'=>'Mês','week'=>'Semana','day'=>'Dia')),
It didn’t fix. Please, beware of this when using this code. Accent marks should be ‘ó’, for instance, to be rightly rendered as ó.
Sorry for the little mess.I’m confused by
Accent marks should be ‘ó’, for instance, to be rightly rendered as ó.
could you rephrase?
btw, someone else submtted a portuguese translation a few weeks ago (sorry, forgot!), I’ll be adding that one to the next update, but I can compare with this one to see the difference
Sorry Marcus. I made the mistake.
What I mean is that accented characters should not be included in your code, like ó, á and ê. Instead they should be encoded for html as&oaculte;,&oaculte;andê.
That’s just it.
Hope this helps.thanks, I tried this out btw with the accents and it works ok that way too
don’t mention it. btw, do you intend to update the wp fullcalendar as well?
yes, certainly! It may not be this week, probably next week.
Thanks. I’ll be looking forward.
The topic ‘Localization’ is closed to new replies.