WMPL Translations Category
-
Hello!
The problem with the translation of categories, I translated the categories with the help of the plugin WPML. After that, I switch to categories and switch languages, but it gives me 404 pages.
Please tell me what am I doing wrong?
Screen attached.
Regards Ismar
Attachments:
You must be
logged in to view attached files.
Hello,
Could you please check how it works with some default WordPress theme like twentysixteen to understand is it our theme issue or not?
Regards
In other stores, nothing is automatically added.
This happens when I try to translate a category. Auto prefix -en is added.
I do not understand what the problem is (
You can contact WPML support for help since they know its configuration best.
Solution.
I did not correctly use the translation output. I had to use the custom method.
Code:
function language_selector_flags(){
$languages = icl_get_languages('skip_missing=0&orderby=code');
if(!empty($languages)){
echo '<ul class="language">';
foreach($languages as $l){
echo "<li>";
if(!$l['active']) echo '<a href="'.$l['url'].'">';
echo '<img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" />';
if(!$l['active']) echo '</a>';
echo "</li>";
}
echo '</ul>';
}
}
add_shortcode("language_selector_flags", "language_selector_flags");
Thank you for posing your solution here.
The topic ‘WMPL Translations Category’ is closed to new replies.