HI !
I am setting up EE + Calendar on my french website, and need a fully translated front end. I am rewieing and completing the fr_FR translation with GlotPress.
1/ Some original strings are in… spanish ! Eg:
# 2362 : Información de Facturación
# 2700 : Número de Identificación
Please, reset all original strings !
2/ Week and day Calendar views display the : all-day string and hours are 12h format (10am…). Needing to change the string and hour format I have edited fullcalendar.min.js and it’s OK !
Is there a better way to do that (to avoid problems in case of updates) ?
3/ Some strings, specially in calendar’s tooltip can’t be translated : they do not appear in GlotPress. I have edited espresso-calendar.php and hardcoded the translation.
But I assume that : $events[ $cntr ]['tooltip'] .= $show_time && $startTime ? '<p class="time_cal_qtip">' . __('Event Time: ', 'event_espresso') . $startTime . ' - ' . $endTime . '</p>' : '';
means : replace the string “Event Time: ” by the one in the fr_FR .mo file ?
But all occurences of this string have been translated in GP !
Best regards,
Michel Leprêtre
1) We can’t do that as it will reset all the 2000 or so translated strings. However if you see any incorrect strings, feel free to modify the translations in Glotpress.
2) Thanks for the feedback. I’ll raise a ticket for this to be looked into in future versions.
3) There should be no need to modify the javascript here. The strings are already translatable. However the EE3 language packs are outdated and we have a ticket raised to update them. In the mean time you could add the strings directly to the PO file via text editor and then save the PO file in Poedit (a free application) which will also generate an up to date MO file.
1/ I mean some ORIGINAL STRINGS (supposed to be in english) are in spanish.
Eg editing the .po file :
#: ../../../plugins/event-espresso/gateways/megasoft/payment.php:31
msgid “Información de Facturación”
msgstr “Information de facturation”
2/ Thanks, CLOSED !
3/ At least I have corrected 2 coding errors espresso-calendar.php :
__(‘Event Time: ‘, ‘event_espresso’) >> __(‘Event Time’, ‘event_espresso’) . ” : ”
__(‘Registration Closed’, ‘event_espresso’) >> __(‘REGISTRATION CLOSED’, ‘event_espresso’)
Now, it works fine ! As some strings do not translate in back office, I guess this come from the same reason.
I’m wating for next release !
CLOSED
Hi !
1/ OK !!!
4/ I will have a look to the topic !
5/ I had to modify also : paypal_vars.php in PayPal gateway to translate ‘ for ‘ & ‘. Attendee: ‘ item_name_1 parameter to display a french text in PP interface. i should be nice to internationalize these strings in next release !
6/ I noticed that in General settings > Add a Default Logo, the upload button does not work in french, swtiching to english it’s OK
Best regards
Michel Leprêtre
Hi Dean,
The link was usefull.
In custom_functions.php I solved the translation pb with :
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Bill To: ' => utf8_decode('Facturé à : '), /// Use utf8_decode to avoid problems with accentuated chars
// More strings
);
// See if the current string is in the $strings array
// If so, replace it's translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );
And to get the months names translated, I made some changes in /gateways/invoice/template.php :
/// Array added to get local names for months
$mois = array("","Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
$datefr = $jour[date("w")]." ".date("d")." ".$mois[date("n")]." ".date("Y");
// Changed line 115 :
// $pdf->Cell(180, 0, __('Date: ', 'event_espresso') . date(get_option('date_format')), 0, 1, 'R');
$pdf->Cell(180, 0, __('Date: ', 'event_espresso') . $datefr, 0, 1, 'R'); /// Set french invoice date
Thanks,
Michel
Viewing 8 reply threads
The support post ‘Calendar french translation’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.