This thread is resolved. Here is a description of the problem and solution.
Problem:
You added a button to the header using the MaxButtons plugin, but the text on it doesn't translate.
Solution:
We recommend creating a separate button for each language using MaxButtons. Then, update your PHP code to display the correct button based on the current language. Here's how you can do it:
add_action( 'ocean_before_logo', function() {<br /> $current_language = apply_filters( 'wpml_current_language', null );<br /> if ( $current_language === 'el' ) {<br /> echo '<div class="header-left-shortcode">' . do_shortcode('[maxbutton id="2"]') . '</div>';<br /> } elseif ( $current_language === 'en' ) {<br /> echo '<div class="header-left-shortcode">' . do_shortcode('[maxbutton id="3"]') . '</div>';<br /> }<br />});<br />This solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 5 replies, has 0 voices.
Last updated by 4 weeks ago.
Assisted by: Paola Mendiburu.