How to change URL in second language?

Popular automatic website translation tool

How to change URL in second language?

Postby 5126 » Fri Aug 01, 2014 8:22 pm

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.
5126
 
Posts: 23
Joined: Mon May 19, 2014 5:57 pm

Re: How to change URL in second language?

Postby Edvard » Mon Aug 04, 2014 1:12 am

Hi,

Can you provide an exact example of what you want to have?

Thanks!
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to change URL in second language?

Postby 5126 » Tue Aug 05, 2014 4:20 pm

Edvard wrote: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...
5126
 
Posts: 23
Joined: Mon May 19, 2014 5:57 pm

Re: How to change URL in second language?

Postby Edvard » Wed Aug 06, 2014 2:35 am

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!
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to change URL in second language?

Postby 5126 » Wed Aug 06, 2014 5:34 am

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...
5126
 
Posts: 23
Joined: Mon May 19, 2014 5:57 pm

Re: How to change URL in second language?

Postby Edvard » Thu Aug 07, 2014 8:13 am

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!
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to change URL in second language?

Postby 5126 » Fri Aug 08, 2014 8:10 pm

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...
5126
 
Posts: 23
Joined: Mon May 19, 2014 5:57 pm

Re: How to change URL in second language?

Postby Edvard » Mon Aug 11, 2014 9:58 pm

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!
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: 4186
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: How to change URL in second language?

Postby 5126 » Wed Aug 13, 2014 9:33 pm

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.
5126
 
Posts: 23
Joined: Mon May 19, 2014 5:57 pm

Re: How to change URL in second language?

Postby Edvard » Thu Aug 14, 2014 4:56 am

Good to hear that. Thanks!
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: 4186
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 0 guests

2GLux
cron