Answer the question
In order to leave comments, you need to log in
How to display different forms in different languages?
How to bring it out correctly?
<?php
$locale = get_locale();
if($locale == 'ru_RU') {
$contact_form = 'echo do_shortcode( '[contact-form-7 id="420" title="Оформити заявку"]' );';
} else if($locale == 'uk'){
$contact_form = 'echo do_shortcode( '[contact-form-7 id="419" title="Оформить заявку"]' );';
} else {
$contact_form = 'echo do_shortcode( '[contact-form-7 id="421" title="Make a request"]' );';
}
?>
<?php $contact_form ?>
Answer the question
In order to leave comments, you need to log in
$locale = get_locale();
if( $locale == 'uk' ) {
echo do_shortcode( '[contact-form-7 id="420" title="Оформити заявку"]' );
} elseif( $locale == 'ru_RU' ) {
echo do_shortcode( '[contact-form-7 id="419" title="Оформить заявку"]' );
} else {
echo do_shortcode( '[contact-form-7 id="421" title="Make a request"]' );
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question