mqTranslate URLs
-
Hey guys! I am using the mqTranslate plugin, and I know it’s not officially supported by Events Manager. But I read some earlier posts about this topic, and I managed to translate the event titles in calendar view with adding these lines to my theme’s function.php:
// hook
add_action(’em_event’, em_qtranslate, 0, 3);
// qtranslate
function em_qtranslate($target, $arg1=null, $arg2=null, $arg3=null) {
$target->event_name = em_qtranslate_string($target->event_name);
$target->event_owner = em_qtranslate_string($target->event_owner);
$target->post_content = em_qtranslate_string($target->post_content);
}function em_qtranslate_string($raw_string) {
if(function_exists(‘qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage’))
$output = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($raw_string);
else
$output = __($raw_string);
return $output;
}And it’s working beautifully. But I still have a problem, the URLs are not filtered by the mqTranslate. Is there a way to make this work with adding some similar code to my functions.php file? I read some posts, but those didn’t work – I’m not a PHP expert. Any help would be appreciated.
Thanks in advance
- The topic ‘mqTranslate URLs’ is closed to new replies.