MEC | notifications | WPML

Hi,
cannot translate notifications with WPML. Tried to add the fields, but only the subject is translateable…

Any Idea?

Cy.

Hi Cy,

Thanks for reaching out.

May I know which notification? Is it booking reminder, google calendar notification, or admin notification? I checked the codes and they are translatable. Please let us know the exact text you’re translating so I could try it on my installation as well.

Thanks!

All MEC Notifications.

Hi @cyrock,

I just tried translating one sample notification like

<?php _e('Notifications', 'mec'); ?>

<?php _e('Booking Notification', 'mec'); ?>

<h2 class="dark-text">Notifications <hr></h2><strong>You can edit your messages in there.</strong><strong>Mec Notificatoin Module</strong><iframe width="600" height="300" src="https://www.youtube.com/embed/ZAA8zVewOj0" frameborder="0" allowfullscreen></iframe>

And other texts too, they are all translatable and I’m able to change it. But if these aren’t the notification you’re trying to translate then would you mind providing a sample screenshot? It will be more helpful if I can try the exact same issue that you’re getting.

Thanks!

Another Issue:

IMPORTANT: The placeholder %%attendees_full_info%%
is working fine in admin notification, but not in the booking confirmation, where it is also very important to show the attendee his own full infos…

How can that happen?

regards,
cy.

No, they are not translatable in the wpml-string translations…all others are …
i also had many many issues with PRO an MEC and WPML i had to solve. No Harmony.

SOLVED! Another Issue. Map is showing up…in english version event this error screen is not showing…SOLVED!

ps. website is now live: ecc-event.com

cy.

Hi @cyrock,

Ah, you’re referring to the dynamic data, they aren’t really translatable. The only translatable are the strings added to the code and templates (permanent strings like https://codex.wordpress.org/Function_Reference/_2) and not the dynamic one. The dynamic one is the processed, modified, and saved dynamically which will always change based on user inputs. And it can’t be translated the usual way and WPML has no built-in capability like auto-translate similar to google translate (at least with standalone WPML, I’m not sure with other extensions/addons).

And glad the map issue is now solved.

Thanks!

Another Issue:

  1. IMPORTANT: The placeholder %%attendees_full_info%%
    is working fine in admin notification, but not in the booking confirmation, where it is also very important to show the attendee his own full infos…

  2. Confirmation-Emails comin from “WordPress@ecc-event.com” i need change this to “info@ecc-event.com”, but where…?!

regards,
cy.

Hi Cy,

  1. Please provide your admin and notification screenshots so I could test it as well on my installation. And you mean by not working that it’s blank? Sorry for the confusion, I thought you mean it’s not working with the translation which yes, it will not work since it’s a dynamic data.

  2. It’s wp_mail() default email address, to change that please add this to your child theme’s functions.php

//Change the mail from header to From:info@ecc-event.com
add_filter( 'wp_mail_from', 'wp_mail_from_change' );
function wp_mail_from_change( $email ) {
    return "info@ecc-event.com";
}

Thanks!

THANK You for this!
cy.

To 1.

The placeholder %%attendees_full_info%%
is working fine in admin notification, but not in the booking confirmation, where it is also very important to show the attendee his own full infos…strange thing

Thanks.

Hi There,

The placeholder %%attendees_full_info%% will not work in booking confirmation email. It’s available for the admin notification and booking notification only.

To make it work for the booking confirmation email, please take a look at this file:

modern-events-calendar/app/libraries/notification around line 139-145:

        if(strpos($message, '%%attendee_full_info%%') !== false or strpos($message, '%%attendees_full_info%%') !== false)
        {
            $attendees_full_info = $this->get_full_attendees_info($book_id);

            $message = str_replace('%%attendee_full_info%%', $attendees_full_info, $message);
            $message = str_replace('%%attendees_full_info%%', $attendees_full_info, $message);
        }

Then copy the above code to the public function booking_confirmation($book_id) function before this text:

// Set Email Type to HTML

Hope that helps and thank you for understanding.

THis is one of the topics, where MCE fails at all…

Thanks, i did, but the code is already in there…

and i cant find :

somewhere…?

Hey CY,

Thai said to copy the code to the booking_confirmation function which is in line 165 of modern-events-calendar/app/libraries/notification

Please just note that if this does not work, the furthest we could do here is post this to our issue tracker so this will be forwarded to the developers of MEC and they might release a feature for this.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.