Support » Plugin: ALO EasyMail Newsletter » Language codes in email

  • I am using WordPress 5.4.2 and the latest version of Alo Easymail with Qtranslate-xt… but now both my languages are appearing in the newsletters (ex: [:en] Our site…. [:fr] Notre site…. This did not happen before I upgraded.

    This happens only with the [‘SITE-NAME’], [‘SITE-LINK’] and [‘SITE-DESCRIPTION’] placeholders. Everything else, date, content, etc. is translated correctly. Anyone have a solution ? or can tell me where to look ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author eventualo

    (@eventualo)

    Hi, thanks for the remark. I’ve not a ready solution, I have to test the compatibility with that plugin again.

    Thread Starter communicaction

    (@communicaction)

    I ended up adding this code at Line 306:

    	$blogname = esc_html( get_option('blogname') );
    	$blogname = qtranxf_use($recipient->lang, $blogname);
    	$blogdescription = esc_html( get_option('blogdescription') );
    	$blogdescription = qtranxf_use($recipient->lang, $blogdescription);

    It works for the blogname and blogdescription part, but I was not able to have the date translated to the correct recipients language. I changed the way WordPress was displaying the date for now… to show it without the month name.

    I also changed lines 537 to 540 to this:

    	$blogname = esc_html( get_option('blogname') );
    	$blogname = qtranxf_use($recipient->lang, $blogname);
    
    	$content = str_replace("[SITE-LINK]", "<a href='". qtranxf_convertURL($trackable_home_url) /*esc_url ( alo_em_translate_home_url ( $recipient->lang ) )*/ ."'>". $blogname ."</a>", $content);

    because the link and the link label were not translated.

    I’m sure this is not the way it should be but it is working for me for now, until there’s a better solution I’ll use this.

    Plugin Author eventualo

    (@eventualo)

    Thanks communicaction! I keep this code in mind for next plugin version and I’ll try to add it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Language codes in email’ is closed to new replies.