• Resolved striboss

    (@striboss)


    I have created map with 2 locations, I use polylang and want to translate information in the popup modal for locations. Polylang can’t find string for that, is there a way to translate that?

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author 100plugins

    (@100plugins)

    Hi @striboss,

    Please take a look at this article. It describes how to make custom post types and taxonomies translatable with Polylang. Locations are a Custom Post Type and Marker Categories are a Taxonomy.

    Best regards,
    Daniel

    Thread Starter striboss

    (@striboss)

    Yes, but I have no option to translate open user map CPT.

    https://ibb.co/cLBF8LP

    Thread Starter striboss

    (@striboss)

    Can someone help me or not?

    Plugin Author 100plugins

    (@100plugins)

    Hi @striboss,

    Sorry for the delay. With the next update, Locations and Marker Categories will automatically be translatable with Polylang.

    In the meantime, just add this code to the functions.php of your theme:

    // enables language and translation management for 'oum-location'
    add_filter( 'pll_get_post_types', 'add_cpt_to_pll', 10, 2 );
    function add_cpt_to_pll( $post_types, $is_settings ) {

    $post_types['oum-location'] = 'oum-location';

    return $post_types;
    }

    // enables language and translation management for Marker Categories
    add_filter( 'pll_get_taxonomies', 'add_tax_to_pll', 10, 2 );
    function add_tax_to_pll( $taxonomies, $is_settings ) {

    $taxonomies['oum-type'] = 'oum-type';

    return $taxonomies;
    }

    Best regards,
    Daniel

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Translating locations’ is closed to new replies.