Answer the question
In order to leave comments, you need to log in
How to display different contact forms in different languages?
<?php
$locale = get_locale();
if ($locale == 'ru-RU'){
$contact-form = '[contact-form-7 id="158" title="Контактная форма"]';
}
else ($locale == 'uk'){
$contact-form = '[contact-form-7 id="485" title="Контактна форма"]';
}
?>
<?php echo do_shortcode( '$contact-form' ); ?>
Answer the question
In order to leave comments, you need to log in
$locale = get_locale();
if ( $locale == 'ru_RU' ) {
echo do_shortcode( '[contact-form-7 id="158" title="Контактная форма"]' );
} else {
echo do_shortcode( '[contact-form-7 id="485" title="Контактна форма"]' );
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question