How to change URL in second language?
Aug 1, 2014 4:22 pm by 5126
Aug 1, 2014 4:22 pm by 5126
I'm using Pro version and all's working almost well. I got a few issues. The most importantly I would like to change direct link that displays in a main pullout menu after switching to a second language. Right now I cannot do that, but would like to open different URL in corresponding language. Using Joomla 3.3.3. Can that be done inside Joomla or I need to fiddle with rewriting code?
Thanks for your help Edvard.
Re: How to change URL in second language?
Aug 3, 2014 9:12 pm by Edvard
Aug 3, 2014 9:12 pm by Edvard
Hi,
Can you provide an exact example of what you want to have?
Thanks!
Re: How to change URL in second language?
Aug 5, 2014 12:20 pm by 5126
Aug 5, 2014 12:20 pm by 5126
Hi,
Can you provide an exact example of what you want to have?
Thanks!
This web site's URL is: http://piasttravelinc.com/. When you go to the menu: tours/by air the new open will open to another url (http://www.detourtravel.ca/By-Air-Tours/)
I would like this new url address to be different for the second language, after you switch to PL in this case, which I'm switching using gTranslate. This url for polish language should be: http://wycieczki.ca/oferta/lotnicze-wycieczki.html.
How do I get around that? Thanks for your help Edvard...
Re: How to change URL in second language?
Aug 5, 2014 10:35 pm by Edvard
Aug 5, 2014 10:35 pm by Edvard
OK, how do you redirect http://piasttravelinc.com/tours/by-air to http://www.detourtravel.ca/By-Air-Tours/ ?
If you are using .htaccess rule for it, please write it here, so I can write another rule for Polish language.
Thanks!
Re: How to change URL in second language?
Aug 6, 2014 1:34 am by 5126
Aug 6, 2014 1:34 am by 5126
Hi Edvard, I do not use any redirect .htaccess rules, scripts or anything. This menu item in Joomla is a simple "external item type" with a link that I assigned in the default field. But I need to change it to a different link when the second language gets active.
I have the same problem with displaying different images in articles in second language, have no idea how to do that in gTranslate, there is no documentation or anything that I can follow. I'm finding gTranslate very limited in terms of ability vs other translation software for Joomla. Cannot find that on forum neither...
Re: How to change URL in second language?
Aug 7, 2014 4:13 am by Edvard
Aug 7, 2014 4:13 am by Edvard
OK, now I understand how you use it.
The easier way to achieve what you want is to use .htaccess and it will be less pain. First of all you need to create a new menu item to be external URL and add URL of your choice which doesn't exist yet on your website, for example put URL to be /tours/by-air. You will use that link instead of your old one. So when you click on that link it will redirect you to the other site. When you are done you need to add special rewrite rule in .htaccess file which will look like this:
RewriteRule /tours/by-air http://domain.com/By-Air-Tours/ [R=301,L]
The other rule for Polish will look like this:
RewriteRule /pl/tours/by-air http://domain2.com/oferta/etc... [R=301,L]
Let me know if this makes sense.
Thanks!
Re: How to change URL in second language?
Aug 8, 2014 4:10 pm by 5126
Aug 8, 2014 4:10 pm by 5126
Hi Edvard,
I have followed the steps 3 times, and the end result is "404" error.
I created the menu direct url: /By-Air-Tours/
and then I added these 2 lines to .htaccess:
RewriteRule /By-Air-Tours/ http://detourtravel.ca/By-Air-Tours/ [R=301,L]
RewriteRule /pl/By-Air-Tours/ http://wycieczki.ca/oferta/lotnicze-wycieczki.html [R=301,L]
404 error in both languages.
I reverted it back since.
Any ideas?
PS. One more thing, somebody suggested that I should restart the apache after changing something in .haccess. Is that correct? Maybe that was the problem?
PS2. I have also tried the same approach with cPanel "redirect" on my host this morning. Still "404" error.
It simply does not work. Please advise... I'm getting desperate...
Re: How to change URL in second language?
Aug 11, 2014 5:58 pm by Edvard
Aug 11, 2014 5:58 pm by Edvard
Please try this:
RewriteRule ^By-Air-Tours/$ http://detourtravel.ca/By-Air-Tours/ [R=301,L]
RewriteRule ^pl/By-Air-Tours/$ http://wycieczki.ca/oferta/lotnicze-wycieczki.html [R=301,L]
Make sure to put it next line of RewriteEngine On line.
Thanks!
Re: How to change URL in second language?
Aug 13, 2014 5:33 pm by 5126
Aug 13, 2014 5:33 pm by 5126
Edvard, thanks... I have followed your last instructions and it works. I have done this:
/tours/rewrite1
RewriteRule ^tours/rewrite1$ http://detourtravel.ca/By-Air-Tours/ [R=301,L]
RewriteRule ^pl/tours/rewrite1$ http://wycieczki.ca/oferta/lotnicze-wycieczki.html [R=301,L]
Thanks Edvard... I have another question, but I'll open new topic on the forum.
Re: How to change URL in second language?
Aug 14, 2014 12:56 am by Edvard
Aug 14, 2014 12:56 am by Edvard
Good to hear that. Thanks!
SIMILAR TOPICS
Large numbers of crawl errors with double language code | Jan 24, 2019 1:43 am | Replies: 1 | Post by: natastna2 |
Translate website to any specific language, on page load | Jan 19, 2019 6:49 am | Replies: 1 | Post by: Leaon7756 |
Graphic translation for every language is missing | Dec 19, 2018 7:54 am | Replies: 1 | Post by: Daryl Dixon |
How to remove mobile Language Select Button transparency | Dec 5, 2018 10:06 pm | Replies: 10 | Post by: JeffTR |
Change language automatically | Nov 26, 2018 9:29 pm | Replies: 3 | Post by: Antilb |