How to translate Popup Maker
This tutorial explain how to translate the Popup Maker plugin see https://wordpress.org/plugins/popup-maker/
1 Translate the content
Falang for Wordpress pro version 1.11+ is necessary
Enabled the popups translation in front-end
Enabled the popup_title translation
Translate the content like all other post type
Translate the popup title , it's in the meta
2 Translate the close button
The close button is stored in a meta field with all the popup configuration, it's not possible to translate it directly in the Falang interface some code need to be done in function.php for this
//use for popupmaker to translate the close text
function falang_pum_popup_close_text($text, $ID)
{
if (class_exists('Falang')){
$current_locale = Falang()->get_current_language()->locale;
if ($current_locale == 'en_US') {
$text = 'close';
}
if ($current_locale == 'fr_FR') {
$text = 'fermer';
}
if ($current_locale == 'de_DE') {
$text = 'schließen';
}
}
return $text;
}
add_filter('pum_popup_close_text','falang_pum_popup_close_text',10,2);