deactivated gtranslate on a specific URL
Feb 7, 2014 11:53 pm by showlib2
Feb 7, 2014 11:53 pm by showlib2
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
Re: deactivated gtranslate on a specific URL
Feb 8, 2014 9:23 pm by Yana
Feb 8, 2014 9:23 pm by Yana
Hi,
You can edit the source code and add class="notranslate" attribute . It will work with any tag.
Re: deactivated gtranslate on a specific URL
Feb 8, 2014 10:15 pm by showlib2
Feb 8, 2014 10:15 pm by showlib2
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
Re: deactivated gtranslate on a specific URL
Feb 8, 2014 10:52 pm by showlib2
Feb 8, 2014 10:52 pm by showlib2
Or this way ?
https://xxxx.xxxx.com/fr/commerce_syste ... otranslate
Thanks for your help
Re: deactivated gtranslate on a specific URL
Feb 9, 2014 8:09 pm by Yana
Feb 9, 2014 8:09 pm by Yana
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]
Re: deactivated gtranslate on a specific URL
Feb 9, 2014 10:45 pm by showlib2
Feb 9, 2014 10:45 pm by showlib2
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
Re: deactivated gtranslate on a specific URL
Feb 10, 2014 7:37 am by Yana
Feb 10, 2014 7:37 am by Yana
Hi,
In this case the only solution is using class="notranslate" attribute.
SIMILAR TOPICS
Gtranslate Multisite | Feb 12, 2019 7:27 am | Replies: 1 | Post by: infact_dat |
Gtranslate: Error with number | Feb 20, 2019 1:20 am | Replies: 1 | Post by: infact_dat |
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not defined | Feb 22, 2019 12:34 pm | Replies: 1 | Post by: oase |
Add-on gtranslate no longer works | Feb 2, 2019 6:01 am | Replies: 1 | Post by: DarylDixon |
Translate website to any specific language, on page load | Jan 19, 2019 6:49 am | Replies: 1 | Post by: Leaon7756 |