Disable translation in subdirectories

Popular automatic website translation tool

Disable translation in subdirectories

Postby [email protected] » Fri Nov 19, 2010 2:49 am

Hello,

I have a member's area and a sign-up area of my website, because both areas use https and are forced with htaccess the translation script doesn't work, and if I disable SSL the translated pages still don't allow login to my member's area. I was wondering if there is a way to disable translation in a sub-directory.

Ex: http://www.domain.com/nl/ for dutch translation, then when the user clicks on either the signup link or members area link the /nl/ is removed and the user is sent to the original page.

EX: http://www.domain.com/nl/ clicking on signup would normally produce http://www.domain.com/nl/signup/signup.php ---> I need htaccess to remove /nl/ and stop translation so the user is sent to http://www.domain.com/signup/signup.php

Thank You,
Jason
[email protected]
 
Posts: 5
Joined: Fri Nov 19, 2010 2:43 am

Re: Disable translation in subdirectories

Postby Edvard » Fri Nov 19, 2010 2:38 pm

Hi,

You need to modify # gtranslate config block in your .htaccess this way:
Code: Select all
# gtranslate config
RewriteRule ^[a-z]{2}/signup/signup.php$ /signup/signup.php [QSA]
RewriteRule ^zh-CN/signup/signup.php$ /signup/signup.php [QSA]
RewriteRule ^zh-TW/signup/signup.php$ /signup/signup.php [QSA]

RewriteRule ^([a-z]{2})/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2})$ /gtranslate/translate.php?lang=$1 [L,QSA]
RewriteRule ^(zh-CN)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^(zh-CN)$ /gtranslate/translate.php?lang=$1 [L,QSA]
RewriteRule ^(zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^(zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
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: 4349
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Disable translation in subdirectories

Postby [email protected] » Sun Nov 21, 2010 12:11 pm

Hello,

Great.. That solution worked perfectly. Thank you for creating this awesome script. Just out of curiosity how long does google take to index the translated pages on average. I've created the site-map and submitted to Google webmaster tools. Just waiting now..

Thanks Again :D
[email protected]
 
Posts: 5
Joined: Fri Nov 19, 2010 2:43 am

Re: Disable translation in subdirectories

Postby [email protected] » Sun Nov 21, 2010 12:14 pm

Hello,

I spoke too soon :lol: Google has already begun indexing my translated site.

Thank You
[email protected]
 
Posts: 5
Joined: Fri Nov 19, 2010 2:43 am

Re: Disable translation in subdirectories

Postby Edvard » Sun Nov 21, 2010 2:04 pm

Good to hear that :)
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: 4349
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Disable translation in subdirectories

Postby [email protected] » Mon Nov 22, 2010 5:50 am

Hello Sir,

I have one more question about a link on my site which I don't want to be translated but I don't want to post my URL here. Could you email me please so I can send the question directly to you?

Thank You
[email protected]
 
Posts: 5
Joined: Fri Nov 19, 2010 2:43 am

Re: Disable translation in subdirectories

Postby [email protected] » Tue Nov 23, 2010 10:47 pm

Hello,

Did you receive my email message with the htaccess rewrite changes I need made?

Thank You.
[email protected]
 
Posts: 5
Joined: Fri Nov 19, 2010 2:43 am


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron