deactivated gtranslate on a specific URL

Popular automatic website translation tool

deactivated gtranslate on a specific URL

Postby showlib2 » Sat Feb 08, 2014 3:53 am

Hi Gtranslate team,

I need some help…

I need to deactivate gtranslate only a specific URL :
https://xxxx.xxxx.com/fr/commerce_syste ... _systempay

This URL is a technical one, unchangeable, use for my bank to confirm or not the payment.

Do you have a method ?

for information :
RewriteEngine on
#gtranslate
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_URI} !^(fr/commerce_systempay|en/commerce_systempay)/
RewriteCond %{HTTP:X-Requested-With} !=XMLHttpRequest
RewriteCond %{HTTP:X-REQUESTED-WITH} !^(XMLHttpRequest)$
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]

$_SERVER['SERVER_PROTOCOL'] = 'HTTPS/1.1';
define('MAIN_LANG', 'fr'); // Main language code: en, ar, bg, hr, cn, ct, cs, da, et, tl, fi, fr, gl, el, iw, hi, es, nl, id, ja, ca, ko, lt, lv, mt, de, no, pt, ru, ro, sr, sk, sl, sv, th, tr, uk, hu, vi, it, pl, sq

define('API_KEY', 'INSERT-YOUR-KEY'); // You can get your Google Translate API key from https://code.google.com/apis/console/?api=translate
define('AUTO_DETECT_LANG', false); // set to true if you have mixed language content, works with Google only
define('CACHE_TIME', 365*24*60*60); // 1 year by default, no need to decrease
define('LICENSE', 'license.dat');
define('FOLLOW_LOCATION', false); // if your site have redirects for some URLs and for that reason you see blank pages, you need to enable this feature
define('SSL_VERIFY_PEER', false); // disable if you get CA certificate error and cannot reconfigure your server to solve the issue
define('USE_BING_TRANSLATOR', false); // Enable it to use Bing Translotor instead of Google Translate
define('BING_API_KEY', ''); // If the option above is enabled you need to get your Bing API key from http://www.bing.com/developers/createapp.aspx (PHP SOAP client is required)
define('DEBUG', true); // turn on for debug mode

Thank you all
showlib2
 
Posts: 6
Joined: Sat Feb 08, 2014 3:43 am

Re: deactivated gtranslate on a specific URL

Postby Yana » Sun Feb 09, 2014 1:23 am

Hi,
You can edit the source code and add class="notranslate" attribute . It will work with any tag.
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: 4133
Joined: Thu Jan 12, 2012 6:21 pm

Re: deactivated gtranslate on a specific URL

Postby showlib2 » Sun Feb 09, 2014 2:15 am

Ho Yana,

Thanks for your reply but I can't do this in the bank html code.

I need either a rewrite rule in htaccess either a dedicated configuration in config.php!!

Can you help me ?

Thanks
showlib2
 
Posts: 6
Joined: Sat Feb 08, 2014 3:43 am

Re: deactivated gtranslate on a specific URL

Postby showlib2 » Sun Feb 09, 2014 2:52 am

showlib2
 
Posts: 6
Joined: Sat Feb 08, 2014 3:43 am

Re: deactivated gtranslate on a specific URL

Postby Yana » Mon Feb 10, 2014 12:09 am

Hi,

You can try to add the following rule after RewriteEngine On. Hope this will help you
RewriteRule ^([a-z]{2})/yoururl/(.*) /yoururl/$2 [R=301,L]
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: 4133
Joined: Thu Jan 12, 2012 6:21 pm

Re: deactivated gtranslate on a specific URL

Postby showlib2 » Mon Feb 10, 2014 2:45 am

Hi Yana,

no change… Doesn't work…
It fact it seems that your rules delete the /fr/.. But I don't want to delete /fr/

I just want that this URL doesn't activate Gtranslate, without modify it… As French is my default language, Gtranslate already delete the /fr/ and create some troubles in Drupal commerce request from my bank.

Another idea ?

Thank you
showlib2
 
Posts: 6
Joined: Sat Feb 08, 2014 3:43 am

Re: deactivated gtranslate on a specific URL

Postby Yana » Mon Feb 10, 2014 11:37 am

Hi,

In this case the only solution is using class="notranslate" attribute.
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: 4133
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux