how can i control which lang do i have
-
Hello i would like please your help. I would like to check what lang is and depend on lang to load a specific CF7. Can you please help me? I am sorry but i am newbie and still trying to figure it out. I want to add this code on functions.php. I have this code:`
if ( ! defined( ‘ABSPATH’ ) ) exit;
/**
* Check if WooCommerce is active
**/
if ( ! in_array( ‘woocommerce/woocommerce.php’, apply_filters( ‘active_plugins’, get_option( ‘active_plugins’ ) ) ) ) {
return;
}
// let’s add a filter to woocommerce_product_tabs to add our additional tab..
add_filter(‘woocommerce_single_product_summary’,’woocommerce_product_tabs_contact_form7′,10,1);
function woocommerce_product_tabs_contact_form7($tabs){$tabs[‘contact_form7’] = array(
‘title’ => __( ‘Enquiry’, ‘woocommerce’ ),
‘priority’ => 20,
‘callback’ => ‘woocommerce_product_contact_form7_tab’
);return $tabs;
}
// our tab’s callback…
function woocommerce_product_contact_form7_tab(){
// do the thing zhu li! Let’s echo our shortcode for contact form 7
echo do_shortcode(‘[contact-form-7 id=”216″ title=”Product Form”]’);
}`
And i want if it is englsih to load the 216 contact form e.g. if it is greek to load for instance 217 form. Can you please help me?
- The topic ‘how can i control which lang do i have’ is closed to new replies.