Private: Home › Forums › WordPress Themes › Elvyre – Retina Ready WordPress Theme › Homepage Slider Translation with Polylang › Reply To: Homepage Slider Translation with Polylang
January 28, 2015 at 5:04 pm
#1784
Participant
Hello.
This can be done by using the polylang language detection function (pll_current_language()).
You will need to modify the php code of the content-slider.php file which is located in wp-content/themes/elvyre/ folder. Also, you will need to create sliders with the translated content for english and spanish language.
Based on the current language, you will need to include particular slider id in template.
For example (content-slider.php):
if (function_exists('putRevSlider') && !empty($slider_id)) {
echo "<div class='rs-wrapper'>";
if ($pll_current_lang == 'en') {
putRevSlider(english-slider-alias-goes-here);
} else {
putRevSlider(spanish-slider-alias-goes-here);
}
echo "<div class='slider-shadow'></div></div>";
}
Robert