• Hi,
    I’ve just leave this message also in the personal website of “satollo.net”, the author of this amazing plugin.

    I try to explain you my problem:
    I’ve got a site in 3 languages (IT-EN-RU) – I use qTranslate to manage this situation, and I’m very satisfacted of this plugin.
    When I’ve tried to use “Newsletter“, everything was fine, but only in Italian(the WPLANG setted in my wp_config.php).

    There’s no way to use “get_bloginfo(‘language’)” for WPLAN into plugin.php?

    This is the lines of code:

    // Labels loading, after that $newsletter_labels is filled
    $newsletter_labels = null;
    @include_once(dirname(__FILE__) . '/languages/en_US.php');
    if (WPLANG != '') @include_once(dirname(__FILE__) . '/languages/' . get_bloginfo('language') . '.php');
    @include_once(ABSPATH . 'wp-content/plugins/newsletter-custom/languages/en_US.php');
    if (WPLANG != '') @include_once(ABSPATH . 'wp-content/plugins/newsletter-custom/languages/' . WPLANG . '.php');

    Thanks a lot,
    Benna

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Benna try this:

    // Labels loading, after that $newsletter_labels is filled
    $newsletter_labels = null;
    if (isset($_GET['lang'])) $lang_ecom_qtrans = $_GET['lang'];
    else $lang_ecom_qtrans = $_COOKIE['qlang_ecom_lang'];
    
    if($lang_ecom_qtrans != ''){
    	$lang = '';
    	switch($lang_ecom_qtrans){
    		case 'en':
    			$lang = 'en_US.php';
    		break;
    		case 'es':
    			$lang = 'it_IT.php';
    		break;
                    case 'ru':
                $lang = 'ru_RU.php';
            break;
    	// add cases for the langs youre using
    }
    
    require(dirname(__FILE__).'/languages/'.$lang);
    } else if(get_option('language_setting') != '') {
    require(dirname(__FILE__).'/languages/'.get_option('language_setting'));
    } else {
    require(dirname(__FILE__).'/languages/en_US.php');
    }
    @include_once(ABSPATH . 'wp-content/plugins/newsletter-custom/languages/en_US.php');
    if (WPLANG != '') @include_once(ABSPATH . 'wp-content/plugins/newsletter-custom/languages/' . WPLANG . '.php');

    hi, have the same issue. Need somehow to localize the plugin. bfvr, i will try your code. Thank you.

    Unfortunetly your solution is not working 🙁 Anyone, please help. Client is killing me 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Newsletter] Multilanguage site – form localization’ is closed to new replies.