French Translation seems incomplete (days, months)

Home Forums Additional Help Translations French Translation seems incomplete (days, months)

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1107680
    Anthony Dupré Dugas
    Guest

    Hi,

    My website using your plugin is in English and French (Canadian) and I’m translating it with WPML.
    Some of the strings seem to have worked properly and I was able to change a few more by following this page:
    https://theeventscalendar.com/knowledgebase/setting-up-the-events-calendar-with-wpml/

    But the things I need translated the most, days of the week and the months, are nowhere to be found in the strings.
    Here is what I see: http://imgur.com/4haddhn

    How can I translate these elements? And is it also possible to change the way “Événements” (Events) is written? It has apparently changed in recent years to “Évênements”.

    Thanks.

    #1108339
    Brook
    Participant

    Howdy Anthony!

    That is a strange one. In WordPress it is encouraged to not store the names of months/days within plugin language files, because WordPress offers its own localization API that contains the translations for all of these. So our Plugin uses the WordPress translation.

    Are you seeing dates translated elsewhere on the site? For instance when you post a blog article there is typically a timestamp, is that translating? If that is translating, could you try temporarily switching to the Twenty Fifteen theme and seeing if the dates now translate on the calendar as well?

    You can certainly change the way that’s written. If you would like to contribute a more accurate translation please checkout this guide. However, if you are just hoping to change it on your site right now and not really interested in helping improve the translation for everyone then I would use this snippet. You will want to alter it a bit so that it only affects the french version, to do that check the $translations variable and only swap stuff around if it is outputting French.

    Does that all make sense? Will that work for you? Please let me know.

    Cheers!

    – Brook

    #1108349
    Anthony Dupré Dugas
    Guest

    Hi Brook, thanks for the reply!

    I’m not too sure what you mean by “checking the $translation variable” as I’m not too comfortable with php. Looking for it in the functions.php file doesn’t bring back anything. So I suppose I have to create it and apply it to my calendar? Only for the days and the months somehow? How do I do that step?

    I’m from Quebec, Canada and French translation is a very important and sensitive issue here, especially for my client, so I really have to fix it somehow.

    #1108365
    Brook
    Participant

    Howdy Anthony,

    No problem. Here is what I meant:

    [php]function tribe_custom_theme_text ( $translations, $text, $domain ) {

    // If this text domain starts with "tribe-" or "the-events-", and we have replacement text
    if( ( strpos( $domain, ‘tribe-‘ ) === 0 || strpos( $domain, ‘the-events-‘ ) === 0 ) && $translations === ‘Évênements’ ) {
    $text = ‘Événements’;
    }

    return $text;
    }
    add_filter(‘gettext’, ‘tribe_custom_theme_text’, 20, 3);[/php]

    That should swap out Événements . Paste that at the top of your theme’s functions.php file.

    Regarding your other issue  though, where you able to follow the little guide I wrote for you? Here it is again:

    Are you seeing dates translated elsewhere on the site? For instance when you post a blog article there is typically a timestamp, is that translating? If that is translating, could you try temporarily switching to the Twenty Fifteen theme and seeing if the dates now translate on the calendar as well?

    Cheers!

    – Brook

    #1108380
    Anthony Dupré Dugas
    Guest

    Hi Brook,

    Is it possible for you guys to somehow make the changes on my site if I give you access and provide the words I need translating? Because pasting it at the top of functions.php crashed the whole site, even by removing the <?php as your link suggested above.

    Also If I changed the theme, the translation still didn’t work for the days and months.

    #1108614
    Brook
    Participant

    Howdy again,

    Is it possible for you guys to somehow make the changes on my site if I give you access and provide the words I need translating? Because pasting it at the top of functions.php crashed the whole site, even by removing the <?php as your link suggested above.

    That would not be possible, it would violate our TOS and put us in a legal predicament. But, I am happy you shared the details here because I think that is the problem. The snippet I shared above should not replace the <?php tag, because it does not have a the <?php tag in it. You should paste that snippet just underneath the existing <?php tag in your functions.php.

    If this continues giving you trouble you might consider hiring a developer. Most every website owner needs one at some point or another, especially if you need to make code changes. We even have a  list of freelance customizers who are ideally suited for smaller projects.

    What is happening with dates elsewhere on your site such as timestamps on your blog posts. Are dates there translating properly?

    Cheers!

    – Brook

    #1108696
    Anthony Dupré Dugas
    Guest

    Hi Brook, we tried on another theme and with a blog and it did not work, so the issue still exist. When pasting the code you provided and placing under the tag you mentioned it gave us the following error

    Parse error: syntax error, unexpected ‘;’ in /home/eileenmillerart/public_html/wp-content/themes/Avada/functions.php on line 6

    Which broke our access to wordpress and we had to revert back to date via cpanel.

    Bottom line is that this plugin does not good for us here in Quebec since we need both english and Frech, in fact i am not sure if any other sites have the same issues we are having. If you can share with me clear direction of what we can do to resolve this it will be great.

    Much appreciated.

    #1108804
    Brook
    Participant

    Oh I see what’s going with that snippet. Sometimes our forum HTML escapes random characters from within snippets. Our forum software is from a different company… we also are not immune to others software malfunctioning. 🙂

    Within that snippet you will see the following (which has been modified by the forums) :

    &amp;&amp;

    Swap that out for:

    &&

    Now the snippet should stop generating parse errors. Make sure to not modify anything else though like the spaces on either side of those characters.

    I should have been more clear earlier, ordinarily WPML translates dates/times like a champ. We have thousands of satisfied multilingual customers. Even one of our supports reps is also from Quebec and is a self professed WPML enthusiast, he too was puzzled by your issues. Your problem is not even with our plugin, it is with WPML. WPML is responsible for the translations of dates across WordPress, including when dates are displayed by our plugin.

    I did Google this issue when you brought it up and saw a few other people experiencing similar stuff while running WPML, just none of them were using our plugin. Since you say you are seeing the same issue on your blog that you are with our events I would head over to the WPML forums and start a topic there. I am as puzzled as you on why this is not working. If I were you I would not event mention The Events Calendar, as from what you have told me your issue manifests itself with dates anywhere on the site including in your blog.

    Cheers!

    – Brook

     

    #1114579
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘French Translation seems incomplete (days, months)’ is closed to new replies.