Translate "More details" link with qtranslate without changing the site language

New home Forums Pro Add-on Translate "More details" link with qtranslate without changing the site language

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32310
    jpsantos
    Member

    Hey guys, great job with plugin!

    I tried finding the answer for this here with no success.

    My site is using the qtranslate-x plugin and I need a way to translate the link text (“More details”) on the info windows.

    Given that the qtranslate plugin is what’s managing the translations how can I translate this string without changing the site’s language in the general settings?

    Thanks in advance

    #32495

    Hi there,

    Thanks for getting in touch with us.

    My sincere apologies for the delay in response.

    You can change this string from ‘Maps’ -> ‘Settings’ -> ‘InfoWindows’ -> ‘Link text’.

    Please let me know if this helps.

    Kind regards,
    Dylan

    #32503
    jpsantos
    Member

    Hey,

    That should work but it doesn’t, it sets the same string for all languages.
    I read somewhere in here that the plugin gets the general settings language setting to display the correct language but what I need is for it to work with qtranslate-x or a way to add it to my dictionary.

    Is there a way to do this?

    I hacked my through this with css, just making the link invisible and putting the text there with a pseudo element. I’ll just leave this here as it might help someone else.
    It’s not ideal but it works.

    html[lang="fr-FR"],
    html[lang="pt-PT"] {
      a.wpgmza_infowindow_link {
        visibility: hidden;
        position: relative;
        &:before {
          display: block;
          width: 100%;
          height: 100%;
          position: absolute;
          visibility: visible;
        }
      }
    }
    
    html[lang="fr-FR"] {
      a.wpgmza_infowindow_link:before {
        content: 'Plus de d├ętails';
      }
    }
    
    html[lang="pt-PT"] {
      a.wpgmza_infowindow_link:before {
        content: 'Mais detalhes';
      }
    }
    
    #32689

    Hi there,

    Sorry for the delay in response over the weekend.

    The string can be changed by editing the PO file for the language you are trying to edit. This can be done by going to ‘wp-content/plugins/wp-google-maps/langauges/. The PO file can be opened using a PO editing software and adding the translation.

    Please let me know if this helps.

    Kind regards,
    Dylan

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.