Forum Archive - Stop changing of urls

Stop changing of urls
Apr 12, 2012 12:08 pm by eustahije
Hey, I'm stuck on this for more that 5 hours now. I have absolute url on site (site.com/assets/style.css) How I mark that link (<link href="http://site.com/assets/style.com" />) not to change (strip domain part) I have tried with class, but it seems that is not working (same goes for change language) href="http://site.com/iw/ is changed to href="iw" I WANT to use absolute URL, dont want some jaba jaba relative paths or anything like that. I dont want <base> tag to define where to go. I only need to exclude link and a from been converted. Is there a way to do so ? And that is working!
Re: Stop changing of urls
Apr 12, 2012 2:21 pm by eustahije
Can I pls get any reply on this ? tnx
Re: Stop changing of urls
Apr 12, 2012 5:56 pm by Yana
Hi, Sorry ,but I don't understand what you mean. Could you please post your website address and try to explain more clearly what you want to do?
Re: Stop changing of urls
Apr 17, 2012 1:03 pm by eustahije
Hi Yana. This is the thing. I crate link href to lead on http://www.domain.com/assets/css/style.css and when page is not translated that url seems fine in source (it is link tag) when I go on www.domain.com/es/ that same href look like assets/css/style.css (http://www.domain.com/ part has been striped). I was looking on a way to use absolute url without those urls being writed (striped) by gtranslate. I tried with class="nturl" but no luck, that href path is still striped. Is there a way to keep absolute urls in href and src paths (link and a tags) without those urls being stripped. Tnx
Re: Stop changing of urls
Apr 17, 2012 2:32 pm by eustahije
other example (I tried with relative URL - as much as I don't want to do it that way) this is without gtranslate <p><a href="/es//" class="nturl">Spanish</a></p> but same line when it is generated from gtranslate looks like this <p><a href="es/" class="nturl">EspaƱol</a></p> missing / in front of href in second case. Ofc that is causing wrong urls to be generated after (/de/es/)
Re: Stop changing of urls
Apr 17, 2012 7:46 pm by Edvard
If you have <a href="/something">Read something</a> and after translation you don't want the language code to be added (<a href="/fr/something">Lisez quelque chose</a>), then you need to add class="nturl", so it will be <a href="/something" class="nturl">Lisez quelque chose</a> after translation. If you want the text also not to be translated, then you need to add also notranslate, so it will become <a href="/something" class="nturl notranslate">Read something</a> after translation. On your site you should use absolute URLs for CSS, JavaScript and other assets. Otherwise you will need to use <base> to define the base path for relative URLs, so when you are on domain.com/fr/ the relative URLs will not be counted starting from /fr/... Hope this makes sense. If you can provide your website URL and show how it is now and how you want it to be, I might be able to assist you better.

SIMILAR TOPICS

Changing Numbers and URL LinksJun 19, 2018 4:05 pmReplies: 1Post by: ryancomtek
How to stop my subscription for gtranslate paidment optionJun 17, 2018 7:24 amReplies: 1Post by: hored
Enterprise URLs not workingMay 14, 2018 8:25 pmReplies: 1Post by: dpitfield
Gtranslate changing some numbers to text in calendarApr 13, 2018 4:38 pmReplies: 1Post by: pazaz
Stop sub domain redirection to main domainApr 12, 2016 7:45 pmReplies: 3Post by: xperthere

Try GTranslate with a free 15 day trial