Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    Try adding snippets like the one below to your functions.php file, changing old and new for the words you need to translate.

    function my_em_text_rewrites($translation, $orig, $domain) {
    str_replace(‘old’,’new’, $translation);
    return $translation;
    }
    add_action ( ‘gettext’, ‘my_em_text_rewrites’, 1, 3 );

    Thread Starter helle.rob

    (@hellerobgmailcom)

    Thanks. I tried but it’s not working. I would think that this should be somewhere to be found in the events manager pluginfiles, but can not find it.

    Thanks.

    Can you tell me the pages where you need these words translated?

    Thread Starter helle.rob

    (@hellerobgmailcom)

    Yes sure.

    I’ve created some events with the booking option enabled. People can
    book spaces and leave a comment.

    If you click an event in my calender, you will arrive at that particular event. From here you can choose to book 1 or more spaces for that particular event. I managed to translate “comment”.

    IN fact there are a few more words which need to be tranlsated. ALl at the same place. I can not find out where to translate the words “price”, “spaces”, “phone” and “e-mail”.

    I’ve tried editing php- files en mass now, but to none effect. Your help is much appreciated!

    Thread Starter helle.rob

    (@hellerobgmailcom)

    If you need it, I can give you access to the site. It’s not official yet so I prefer to not open it up for the public yet.

    For Price, Spaces and other table headings you’ll need to use code like this:

    function my_custom_ticket_header($collumns){
    	$collumns = array( 'type' => __('New word for type','dbem'), 'price' => __('New word for price','dbem'), 'spaces' => __('New word for spaces','dbem'));
    	return $collumns;
    }
    add_filter('em_booking_form_tickets_cols','my_custom_ticket_header',1,1);

    The rest of the booking form can be edited using the templates here:
    /events-manager/templates/forms/booking-form/booking-fields.php

    Make sure you take a look at this tutorial which shows you how to use custom templates in an upgrade safe way:
    https://wp-events-plugin.com/documentation/using-template-files/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Translate price, comments and spaces’ is closed to new replies.