• jakobwi

    (@jakobwi)


    im using polylang as my translation plugin.

    I have actually no need to translate the entire directory in all languages.
    Therefore i would like to show the english directory in all languages.
    English, German, Spanish

    It is simply too much work translating them for my purpose.
    Unfortunately the copy process doesnt copy all information and it has to be done in all languages.

    does the shortcode allow to include a different language than the page?
    Is there another workaround?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jakobwi

    (@jakobwi)

    could solve it with the following code

    
    add_filter( 'pll_get_post_types', 'remove_post_translation_from_pll', 10, 2 );
    function remove_post_translation_from_pll( $post_types, $is_settings ) {
    unset( $post_types['w2dc_listing'] );
    return $post_types;
    }
    

    https://polylang.pro/doc/filter-reference/#pll_get_post_types

    Thread Starter jakobwi

    (@jakobwi)

    Update.

    the code above works but then you have problems with the categories.

    The code below deactivated translation for all of them

    
    add_filter( 'pll_get_post_types', 'remove_post_translation_from_pll', 10, 2 );
    function remove_post_translation_from_pll( $post_types, $is_settings ) {
    unset( $post_types['w2dc_listing'] );
    return $post_types;
    }
    
    function turn_categoryblog_translation_off( $taxonomies, $is_settings ) {
        unset( $taxonomies['w2dc-category'] );
        return $taxonomies;
    }
    add_filter( 'pll_get_taxonomies', 'turn_categoryblog_translation_off', 10, 2 );
    
    function turn_tagblog_translation_off( $taxonomies, $is_settings ) {
        unset( $taxonomies['w2dc-location'] );
        return $taxonomies;
    }
    add_filter( 'pll_get_taxonomies', 'turn_tagblog_translation_off', 10, 2 );
    
    function turn_tagw2_translation_off( $taxonomies, $is_settings ) {
        unset( $taxonomies['w2dc-tag'] );
        return $taxonomies;
    }
    add_filter( 'pll_get_taxonomies', 'turn_tagw2_translation_off', 10, 2 );
    
    Thread Starter jakobwi

    (@jakobwi)

    I wanted to add an update that it would be a great feature to be able to use the same content with translated frontends.

    My Solution is a workaround but i have 3 Languages and cannot translate every entry

    Thread Starter jakobwi

    (@jakobwi)

    please see this post.

    Since a while the listings are directed to the wrong language.
    even withouth the above workaround

    https://www.ads-software.com/support/topic/problem-since-last-update-5/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘translation’ is closed to new replies.