The language of the country name in [gd_locations what="country"]

This topic contains 15 replies, has 3 voices, and was last updated by  Alexander Krutov 4 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #530056

    Alexander Krutov
    Expired Member
    Post count: 652

    Can the country name in [gd_locations what=”country”] be shown in the map language?

    #530057

    Alexander Krutov
    Expired Member
    Post count: 652
    This reply has been marked as private.
    #530083

    Alex Rollin
    Moderator
    Post count: 27815

    It would be shown as the name from the Locations table for countries, which you can translate.

    https://wpgeodirectory.com/docs-v2/translation/country/

    #530097

    Alexander Krutov
    Expired Member
    Post count: 652

    I don’t understand your recommendation. I don’t want to change the slug of the country, I’m fine with the slug written in English. I just want the name of Ukraine in [gd_locations what=”country”] to be displayed in the same language as the names of cities and regions – in Ukrainian, because the language of the map is Ukrainian.

    Now it is displayed in English in Ukrainian and Russian versions of the site.

    What should be done to do this?

    #530183

    Alex Rollin
    Moderator
    Post count: 27815

    Translate the name of the country to Ukrainian as described in the link above. It is for the name also, not just the slug.

    #530209

    Alexander Krutov
    Expired Member
    Post count: 652

    I’m asking you to explain to me what to do. I translated the countries in the translation file. Now I need to apply the translation to the GeoDirectory – Settings – Locations – Countries page? But then the country slug will be translated and the site will no longer work with links that are already present on resources that link to the site. Do I understand correctly?

    http://dl4.joxi.net/drive/2020/02/14/0028/2664/1870440/40/f83c904a7b.png

    #530219

    Alex Rollin
    Moderator
    Post count: 27815

    Then don’t change the slug, just the title/label.

    #530260

    Alexander Krutov
    Expired Member
    Post count: 652

    How do I make sure the slug doesn’t change?

    #530310

    Alexander Krutov
    Expired Member
    Post count: 652

    Remind me, please, how the country slug is formed – by plugin or manually? I don’t remember if I translated the slug myself or if this site creates slug countries using the country name?

    #530384

    Alex Rollin
    Moderator
    Post count: 27815

    Ah, I was mistaken, it does also require changing the slug for the country. The developers are looking into it and will post if they find a workaround.

    #530387

    Alexander Krutov
    Expired Member
    Post count: 652

    I’m glad you noticed that 🙂

    #530989

    Alexander Krutov
    Expired Member
    Post count: 652

    Good afternoon! Just wondering if you have a deadline for this task?

    #531339

    Kiran
    Moderator
    Post count: 7069

    Hi Alexander,

    This has been fixed and it will be in next release of Location Manager.

    If you have access to files then you can apply patch to fix on your site.

    – Open file WORDPRESS_ROOT\wp-content\plugins\geodir_location_manager\templates\loop\location-list.php
    – Replace line no. 8

    foreach ($locations as $location) {

    with

    
    
    foreach ($locations as $location) {
    		if ( ! empty( $location->country ) ) {
    			$location->country = __( $location->country, 'geodirectory' );
    		}

    – Save file

    Let us know.

    Thanks,
    Kiran

    #531371

    Alexander Krutov
    Expired Member
    Post count: 652

    Good afternoon, Kiran!
    This is good, but not what I asked. Now the country name is displayed in the active language of the site. It’s already better than in English, but I asked if I could show the country name in the language of the map. It is important that there is no disagreement in the fact that when the active language of the site is Russian – the country is shown in Russian, and cities and regions in Ukrainian. It is better to show the country in the same language as cities and regions.

    #531372

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 16 total)

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

Open Support Ticket