• Hello LLOC,

    I use the same single page template for US and FR version (single-our-offers.php).
    I have a form on this template and i have to change some id, fields id for the US version.
    Is-that possible to switch static content on the same template when you’r reading the US or FR version ?

    I use formidable plugin to manage my form.
    This is my form in my template :

    <div class="content active" id="panel2-1">
    					<?php echo
    						FrmAppController::get_form_shortcode(array(
    							'id' => 10, 'key' => 'contact232',
    							'title' => false,
    							'description' => false,
    							'readonly' => false,
    							'entry_id' => false,
    							'fields' => '120,121,122,123,124,125,126'));
    					?>
    				  </div>

    I see it’s possible to get the language like this :

    $blog     = MslsBlogCollection::instance()->get_current_blog();
    	$language = $blog->get_language();
    	echo $language;

    Do you have any idea ?
    tks for your help ?
    and really tks for your great plug !!!!! Save my life 🙂

    https://ww.wp.xz.cn/plugins/multisite-language-switcher/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dennis Ploetner

    (@realloc)

    I’m not sure what you want to do but ‘yes’ you can print out the language in this way.

    Cheers,
    Dennis.

    Thread Starter lepressing

    (@lepressing)

    I’d like to change a form between US & fr.
    But the form must be in my template.

    Thread Starter lepressing

    (@lepressing)

    I found what i need. I used the ID blog like this

    <?php
     global $current_blog;
     if($current_blog-> blog_id == 2){
    echo 'my form US';
     } else {
     echo 'my form fr';
     }
    ?>

    Maybe helful.

    Plugin Author Dennis Ploetner

    (@realloc)

    Yes or something like …

    $language = MslsBlogCollection::instance()
        ->get_current_blog()
        ->get_language();
    if ( 'us' == $language ) {
        echo 'my form US';
    }
    else {
        echo 'my form fr';
    }

    … if you don’t want to use another approach how the use of functions like __ and _e in your form.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Form’ is closed to new replies.