currently no, your other solution could be to use WPML or similar, but atm they are treated as different events when it comes to bookings.
I don’t know if this interests you but here’s a patch that will make it compatible with qTranslate. It would be nice if there was a hook/filter to latch onto, I’m not super keen on hacking core but this is a requirement of the site I’m working on.
Index: tickets-list.php
===================================================================
--- tickets-list.php (revision 210)
+++ tickets-list.php (working copy)
@@ -28,7 +28,7 @@
switch($type){
case 'type':
?>
- <td class="em-bookings-ticket-table-type"><?php echo wp_kses_data($EM_Ticket->ticket_name); ?><?php if(!empty($EM_Ticket->ticket_description)) :?><br><span class="ticket-desc"><?php echo wp_kses($EM_Ticket->ticket_description,$allowedposttags); ?></span><?php endif; ?></td>
+ <td class="em-bookings-ticket-table-type"><?php echo (wp_kses_data(__($EM_Ticket->ticket_name))); ?><?php if(!empty($EM_Ticket->ticket_description)) :?><br><span class="ticket-desc"><?php echo wp_kses(__($EM_Ticket->ticket_description),$allowedposttags); ?></span><?php endif; ?></td>
<?php
break;
case 'price':
thanks for contributing
On every ticket instantiation, the action em_ticket is run and passes the $EM_Ticket as the first parameter, which you can modify
if that works, a snippet would be great 🙂
Sweet, thank you. Some of the code below is borrowed from here: http://wordpress.org/support/topic/plugin-events-manager-when-used-with-qtranslate-displays-tags-in-titles?replies=23#post-2976608
// qTranslate function
function em_qtranslate_string($raw_string) {
if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage'))
$output = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($raw_string);
else
$output = __($raw_string);
return $output;
}
function em_qtranslate_ticket($target, $arg1=null, $arg2=null, $arg3=null) {
$target->ticket_name = em_qtranslate_string($target->ticket_name);
}
add_action('em_ticket', em_qtranslate_ticket, 0, 3);
Thanks for contributing. Im curious, you say
here’s a patch that will make it compatible with qTranslate
does this solve all the problems with qTranslate and EM working together?
No, just the particular issue of ticket names. Users can enter qTranslate magic codes (i.e. <!–:en–>english text<!–:–><!–:de–>german text<!–:–> and [:en]English[:fr]French) in the ticket name text field and they’ll be translated.
thanks, I’m keeping this snippet for the day I tackle qTranslate compatability myself.