Multilingual Directory with Polylang

This topic contains 8 replies, has 4 voices, and was last updated by  Stiofan O’Connor 10 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #18978

    Aris Vernardos
    Free User
    Post count: 7

    Hello. Thanks for the fantastic plugin (again)!
    I develop a multilingual directory website using the Polylang plugin. It works fine except one thing: it doesn’t sync the place images (which are the same for every language). I don’t want to upload the same images for every place (which will take a lot of space without reason). If I could insert images to a place from the media library, would be a solution (not the optimal but I could do it). Is there a way to do it? Or, is there any other solution (which I can’t think of)?
    Thank you in advance!

    #18980

    Simone
    Expired Member
    Post count: 3515

    Hello Aris, this is not possible unfortunately. The plugin was tested using WPML, I will alert Stiofan in any case, he might knows something I don’t 🙂

    #19032

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    does the plugin offer an option to use the same images for let’s say blog posts or pages without uploading another one?

    Because I’m not sure WPML does…

    Let us know,

    #19053

    Aris Vernardos
    Free User
    Post count: 7

    Thank you for your answer. Well, I can think of a workaround, it’s ok. I just wanted to find a more solid solution.
    But there is another issue, which I believe you can help me. I cannot find a way to translate the region and the city in the breadcrumbs. I don’t see the strings in polylang’s strings translation tab (polylang is similar to wpml). So I tried to make a wpml-config.xml file like this:
    <wpml-config>
    <admin-texts>
    <key value=”geodir_default_location”>
    <key value=”city” />
    <key value=”region” />
    </key>
    </admin-texts>
    <wpml-config>
    but didn’t work. Did I do something wrong? Or there is a bug?
    Thanks again!

    #19056

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    regions and city are not part of WP default taxonomies, so both plugin wouldn’t know where to look for them.

    The only way to translate them is to add them to your po file.

    So probably the easiest way would be to add them to your language.php file and then rescan source code.

    Let us know,

    Thx

    #19079

    Aris Vernardos
    Free User
    Post count: 7

    Hi Paolo and thank you for your answers.
    Polylang offers the option to sync data between posts and pages (such as featured image). But fails with geodirectory. Never mind, I can add manually the records.
    Regarding your second message about the breadcrumbs, unfortunately it didn’t work.
    Fortunately, I found the solution. In general_functions.php:
    Line 607:
    $location_term_actual_region = $location_info->region;
    should change to:
    $location_term_actual_region = __( $location_info->region, GEODIRECTORY_TEXTDOMAIN );
    Line 609 (the same):
    $location_term_actual_city = $location_info->city;
    should change to:
    $location_term_actual_city = __( $location_info->city, GEODIRECTORY_TEXTDOMAIN );
    I think you should include these changes to the next update, because it is important (for SEO purposes) to have the breadcrumbs localized.
    Thanks again.

    #19080

    Paolo
    Site Admin
    Post count: 31206

    No Aris,

    thank you for spotting the bug!

    I’ll definitely ask Stiofan to include it in the next version that we will release tomorrow.

    Thx

    #19081

    Aris Vernardos
    Free User
    Post count: 7

    Dear Paolo,
    if you are going to release an update, you could add another change in the same file:
    Line 568:
    $breadcrumb .= $separator.’‘ . ucfirst($post_type_info->label) .’‘;
    should change to:
    $breadcrumb .= $separator.’‘ . __( ucfirst($post_type_info->label), GEODIRECTORY_TEXTDOMAIN ) .’‘;
    so the post type (places) could be localized, too (which is nice).
    There is no need to argue, though. I have a fantastic plugin (for free). So THANK YOU!

    #19124

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    These have both been added to the next version and will be released later tonight.

    Thanks,

    Stiofan

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount