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-
AuthorPosts
-
October 20, 2014 at 7:42 pm #18978
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!October 20, 2014 at 8:39 pm #18980Hello 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 🙂
October 21, 2014 at 5:50 pm #19032Hi,
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,
October 21, 2014 at 7:06 pm #19053Thank 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!October 21, 2014 at 7:21 pm #19056Hi,
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
October 21, 2014 at 10:09 pm #19079Hi 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.October 21, 2014 at 10:11 pm #19080No 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
October 21, 2014 at 10:36 pm #19081Dear 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!October 22, 2014 at 4:51 pm #19124These have both been added to the next version and will be released later tonight.
Thanks,
Stiofan
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket