Stop changing of urls

Popular automatic website translation tool

Stop changing of urls

Postby eustahije » Thu Apr 12, 2012 4:08 pm

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!
eustahije
 
Posts: 4
Joined: Mon Mar 26, 2012 12:55 am

Re: Stop changing of urls

Postby eustahije » Thu Apr 12, 2012 6:21 pm

Can I pls get any reply on this ?
tnx
eustahije
 
Posts: 4
Joined: Mon Mar 26, 2012 12:55 am

Re: Stop changing of urls

Postby Yana » Thu Apr 12, 2012 9:56 pm

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?
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4135
Joined: Thu Jan 12, 2012 6:21 pm

Re: Stop changing of urls

Postby eustahije » Tue Apr 17, 2012 5:03 pm

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
eustahije
 
Posts: 4
Joined: Mon Mar 26, 2012 12:55 am

Re: Stop changing of urls

Postby eustahije » Tue Apr 17, 2012 6:32 pm

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/)
eustahije
 
Posts: 4
Joined: Mon Mar 26, 2012 12:55 am

Re: Stop changing of urls

Postby Edvard » Tue Apr 17, 2012 11:46 pm

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.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest

2GLux