Home Forums WoodMart support forum WMPL Translations Category

WMPL Translations Category

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #81526

    Ismar
    Participant

    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.
    #81549

    Artem Temos
    Keymaster

    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

    #81658

    Ismar
    Participant

    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 (

    #81662

    Artem Temos
    Keymaster

    You can contact WPML support for help since they know its configuration best.

    #81666

    Ismar
    Participant

    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");
    #81707

    Artem Temos
    Keymaster

    Thank you for posing your solution here.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘WMPL Translations Category’ is closed to new replies.