• Resolved chapselle

    (@chapselle)


    Hello,

    I’d like to change the label when an event is free. I translated the plugin to French with Loco Translate and in my Files on my host server. I also translated the Events Calendar plugin. Yet the word is still ‘Gratuit’ instead of ‘Prix libre’. Do you have any idea as to why the translation isn’t working and where I can change the word ?

    Thank youuuu

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Darian

    (@d0153)

    Hi @chapselle

    Thanks for reaching out. Let me help you with this one.

    You can try adding the snippet below, and see if that works for you:

    function custom_tribe_get_formatted_cost ( $cost ) {
     	$regex = '/Free/';
    	$match = preg_match($regex, $cost);
    	
        if ( $cost === 0 || $cost == 'Free' || $cost == 'Gratuit'|| $match ) {
            //add actions for free tickets or RSVPs
            $cost = 'Prix libre';
        }
      
        return $cost;
    }
    add_filter ( 'tribe_get_formatted_cost', 'custom_tribe_get_formatted_cost' );

    If you’re not familiar with coding, you can use the Code Snippets plugin, which removes the need to add custom snippets to your theme’s functions.php file.

    As always, please test it first on a staging site before applying to your live site.

    I hope that helps, and let me know if you have further concerns.

    Plugin Support Darian

    (@d0153)

    Hi there,

    It appears that there hasn’t been any recent activity on this thread, so we’ll consider it resolved. However, if you have any additional questions or concerns, feel free to start a new thread.

    Thread Starter chapselle

    (@chapselle)

    Hi,

    Yes, sorry for taking such a long time to answer.

    Thank you for your help ! It worked for when you’re actually on the event, but not when you’re on the page that lists the events :

    https://qwobolo.fr/les-ateliers-calendrier/

    Plugin Support Darian

    (@d0153)

    Hi @chapselle

    Let me check on this further. I’ll update you once I have a snippet for the events calendar.

    Plugin Support Darian

    (@d0153)

    Hi @chapselle

    Thanks for patiently waiting

    Please try translating the following through Loco Translate, and see if that works on your end.

    You should be able to see something like this: https://share.zight.com/2Nu8p98D

    I hope this helps. Let me know if you have further concerns.

    Plugin Support Darian

    (@d0153)

    Hi there,

    It seems like it has been some time since we received a response from you, therefore, I will consider this matter as resolved. If you require any further assistance, please do not hesitate to start a new thread.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.