Change Link URL for different language

open (11 posts) (3 voices)

  1. farbecht
    Member

    Hello support team,

    is it possible to change the URL Link in the home slider for different languages.
    WPML shortcodes are not working.

    Thanks in advance.
    Micha

    Attachments

    1. Bildschirmfoto_2016-04-20_um_12.18.03..png (58.9 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  2. farbecht
    Member

    Hi there,

    any updates here?
    Thanks in advance.

    Cheers
    Micha

    Posted 1 year ago #
  3. can you not just add in the next language manually?
    {wpml_translate_ lang=de].....

    Change the de in to the other language??

    Posted 1 year ago #
  4. sorry that last post was in the wrong post

    Posted 1 year ago #
  5. farbecht
    Member

    Hi there,

    thanks for your reply. That's what didn't work. I already tried it with the wpml language shortcodes but in the link url field that doesn't work. :( I get a broken link. Please also see the attached file.

    Any other Ideas?
    Thanks.

    Cheers
    Micha

    Attachments

    1. Bildschirmfoto_2016-04-29_um_14.10.26..png (100.1 KB, 1 downloads) 1 year old
    Posted 1 year ago #
  6. farbecht
    Member

    Any news for that? I really need a solution for that for more than one website.

    Thanks a lot.

    Cheers
    Micha

    Posted 1 year ago #
  7. OnePressTech
    Member

    Do you want the link itself to be in a different language (as appears in the browser command / status bar) or do you want the target page people go to when they click the link to be in a different language? These are two different problems with different solutions.

    Assuming you want to solve the latter problem (the target page needs to be language-specific) you could do the following:

    1) Organise your language-specific pages to have a common parent (so x/y/au , x/y/en , etc)
    2) Use a combination of the CSS Selectors :lang and :after to dynamically adjust the target link

    See the following example: https://css-tricks.com/almanac/selectors/l/lang/

    NOTE: MysiteMyWay support has not been responding to this forum for quite some time. I'm just another unsupported MSMW client who shares your pain :-)

    Hope that helps.

    Kind regards,
    Tim Hibberd
    Managing Director OnePressTech

    Posted 1 year ago #
  8. farbecht
    Member

    Hi Tim,

    thanks for sharing! :)

    Can I change the link in href with :after?
    Tried it, but didn't work for me.
    What did I miss?

    I only changed the text link...

    Thanks a lot!

    Cheers
    Micha

    Posted 1 year ago #
  9. OnePressTech
    Member

    Hi Micha,

    I was afraid there was a possibility that the AFTER Selector would not be rendered in the DOM. Sorry for leading you down a false path (see http://stackoverflow.com/questions/9704802/css-after-element-to-insert-mailto-link for limitations of CSS Selectors).

    The only alternatives would be:
    1) Write some Javscript on the page or modify the php to dynamically alter the link
    2) Make this a link to a page with some Javascript to perform a redirect based on language

    Option 2 would be the simplest option if you are not a coder.

    Again...sorry about the false path with the CSS!

    Cheers,
    Tim

    Posted 1 year ago #
  10. its a short code so you might need to place it in raw brackets, thats what is needed when you use another plugin on the site in other places? like below

    [raw][wpml_translate_ lang=de] URLforDE language {/wpml_translate]{wpml_translate_ lang=??] URLfor?? language {/wpml_translate][/raw]

    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme