Forum Archive - unable to edit link

unable to edit link
Jan 23, 2015 10:38 am by earthpulse
Hi, I'm not able to edit the link for a button on a page (points to external website) Any idea why? I am able to change other links but not that one the external website is a shop. we need to change the link in language page so it points to the french language version of the shop. Regards, Sid
Re: unable to edit link
Jan 23, 2015 10:40 am by Edvard
Hi, You cannot edit external links. If you want to change the link depending on the selected language you will need to program it on your side. You can check $_SERVER['HTTP_X_GT_LANG'] variable to detect selected language and depending on it change the link. Thanks!
Re: unable to edit link
Jan 23, 2015 10:53 am by earthpulse
hi edvard, can you tell me how to set that up. All i can understand it involves the .htaccess file?
Re: unable to edit link
Jan 23, 2015 11:09 am by Edvard
You need to find the source file where you add the link and add PHP script to check the language and show correct link. It requires some basic PHP knowledge. This can be an example of code, you may consult with your developer: <?php if(isset($_SERVER['HTTP_X_GT_LANG']) and $_SERVER['HTTP_X_GT_LANG'] == 'fr') echo '<a target="_blank" href=""><img src="new-art/ia-up.png"></a>'; else echo '<a target="_blank" href=""><img src="new-art/ia-up.png"></a>'; ?>
Re: unable to edit link
Jan 23, 2015 12:46 pm by earthpulse
hi im the developer so..i'll have to do it myself. the website currently is HTML. Should i simply add the code u sent me to the HTML pages? will that work? i am also developing the same website in wordpress at the moment. In that case can i add that code to the footer?
Re: unable to edit link
Jan 23, 2015 12:52 pm by earthpulse
tried adding the code getting an error :( any idea how to get it to work?
Re: unable to edit link
Jan 23, 2015 2:11 pm by earthpulse
hi again i noticed i am able to edit the other buttons link which is also an external link, but not the i agree button. all other external links seem editable without changing the domain name. in this case too the buttons link i want to change will only need edit after the domain name from to
Re: unable to edit link
Jan 24, 2015 8:05 am by Edvard
Hi, I have already provided enough code, so you can make it work. I cannot tell exactly where or what you need to edit, since I do not know anything about your system. If you want I can do the customization for you for additional payment. You can contact me on [email protected]. Thanks!
Re: unable to edit link
Jan 25, 2015 8:44 am by earthpulse
hi edvard i used .htaccess file on the website where i needed the redirection as per language RewriteEngine On RewriteCond %{HTTP_REFERER} .**$ [OR] RewriteCond %{HTTP_REFERER} .**$ [OR] RewriteCond %{HTTP_REFERER} .**$ [OR] RewriteCond %{HTTP_REFERER} .**$ RewriteRule ^(.*)$ http://your_site/different_page/ this worked easily. u can recommend this to others as well cheers
Re: unable to edit link
Jan 25, 2015 4:23 pm by earthpulse
found one more way to do this (since outgoing links to other domains were not customizable) create en.htm (with meta redirect to the english versin of our other website) fr.htm (with meta .. to fr version of our other domain site) now its possible to change links to external sites for different languages without messing .htaccess or php cheers
Re: unable to edit link
Jan 25, 2015 7:33 pm by Yana
Thank you!


wordpress amp link not translateDec 31, 2016 10:11 amReplies: 12Post by: besybuy
Joomshaper Pagebuilder buttons Link edit problemJan 11, 2019 10:04 amReplies: 1Post by: kumatest
Change Link ColorSep 11, 2018 7:10 pmReplies: 3Post by: onechance
Translation link not working after module upgradeNov 28, 2017 11:45 pmReplies: 1Post by: andru
A spam link known as translate.googleapis.comAug 8, 2017 6:21 amReplies: 3Post by: jedimoff

Try GTranslate with a free 15 day trial