Version Description
- Fix for saving issue on GoDaddy hosting
- Fix for double gziping in sub-directory URL structure when using Sucuri service
Download this release
Release Info
Developer | edo888 |
Plugin | Translate WordPress with GTranslate |
Version | 2.8.15 |
Comparing to | |
See all releases |
Code changes from version 2.8.14 to 2.8.15
- gtranslate.php +2 -2
- readme.txt +6 -2
- url_addon/gtranslate.php +1 -0
gtranslate.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: GTranslate
|
4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
5 |
Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
|
6 |
-
Version: 2.8.
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
9 |
Text Domain: gtranslate
|
@@ -636,7 +636,7 @@ function hideGSatelites($) {
|
|
636 |
else
|
637 |
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';location.href=location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '\\\\\\\\.'), '')+gt_request_uri;}"+new_line;
|
638 |
} else if(translation_method == 'onfly') {
|
639 |
-
widget_code += "function GTranslateGetCurrentLang() {var keyValue = document
|
640 |
widget_code += "function GTranslateFireEvent(element,event){try{if(document.createEventObject){var evt=document.createEventObject();element.fireEvent('on'+event,evt)}else{var evt=document.createEvent('HTMLEvents');evt.initEvent(event,true,true);element.dispatchEvent(evt)}}catch(e){}}"+new_line;
|
641 |
if(analytics)
|
642 |
widget_code += "function doGTranslate(lang_pair){if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(GTranslateGetCurrentLang() == null && lang == lang_pair.split('|')[0])return;if(typeof ga!='undefined'){ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}else{if(typeof _gaq!='undefined')_gaq.push(['_trackEvent', 'GTranslate', lang, location.hostname+location.pathname+location.search]);}var teCombo;var sel=document.getElementsByTagName('select');for(var i=0;i<sel.length;i++)if(sel[i].className=='goog-te-combo')teCombo=sel[i];if(document.getElementById('google_translate_element2')==null||document.getElementById('google_translate_element2').innerHTML.length==0||teCombo.length==0||teCombo.innerHTML.length==0){setTimeout(function(){doGTranslate(lang_pair)},500)}else{teCombo.value=lang;GTranslateFireEvent(teCombo,'change');GTranslateFireEvent(teCombo,'change')}}"+new_line;
|
3 |
Plugin Name: GTranslate
|
4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
5 |
Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
|
6 |
+
Version: 2.8.15
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
9 |
Text Domain: gtranslate
|
636 |
else
|
637 |
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';location.href=location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '\\\\\\\\.'), '')+gt_request_uri;}"+new_line;
|
638 |
} else if(translation_method == 'onfly') {
|
639 |
+
widget_code += "function GTranslateGetCurrentLang() {var keyValue = document['cookie'].match('(^|;) ?googtrans=([^;]*)(;|$)');return keyValue ? keyValue[2].split('/')[2] : null;}"+new_line;
|
640 |
widget_code += "function GTranslateFireEvent(element,event){try{if(document.createEventObject){var evt=document.createEventObject();element.fireEvent('on'+event,evt)}else{var evt=document.createEvent('HTMLEvents');evt.initEvent(event,true,true);element.dispatchEvent(evt)}}catch(e){}}"+new_line;
|
641 |
if(analytics)
|
642 |
widget_code += "function doGTranslate(lang_pair){if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(GTranslateGetCurrentLang() == null && lang == lang_pair.split('|')[0])return;if(typeof ga!='undefined'){ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}else{if(typeof _gaq!='undefined')_gaq.push(['_trackEvent', 'GTranslate', lang, location.hostname+location.pathname+location.search]);}var teCombo;var sel=document.getElementsByTagName('select');for(var i=0;i<sel.length;i++)if(sel[i].className=='goog-te-combo')teCombo=sel[i];if(document.getElementById('google_translate_element2')==null||document.getElementById('google_translate_element2').innerHTML.length==0||teCombo.length==0||teCombo.innerHTML.length==0){setTimeout(function(){doGTranslate(lang_pair)},500)}else{teCombo.value=lang;GTranslateFireEvent(teCombo,'change');GTranslateFireEvent(teCombo,'change')}}"+new_line;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Author: Edvard Ananyan
|
|
4 |
Tags: bilingual, multilingual, translate, translation, language, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
@@ -36,7 +36,7 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
|
|
36 |
* WooCommerce shop translation
|
37 |
* Multilanguage
|
38 |
* Multilingual language names in native alphabet
|
39 |
-
* Alternative flags for Quebec, Canada, USA, Brazil, Mexico
|
40 |
|
41 |
**Paid Features**
|
42 |
|
@@ -205,6 +205,10 @@ You need to go to the language you want to edit, for instance, French: http://do
|
|
205 |
|
206 |
== Changelog ==
|
207 |
|
|
|
|
|
|
|
|
|
208 |
= 2.8.14 =
|
209 |
* Added Argentina and Colombia alternative flags
|
210 |
* Fixed bug in Nice looking dropdown look related to clicking the last dropdown element
|
4 |
Tags: bilingual, multilingual, translate, translation, language, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.8.15
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
36 |
* WooCommerce shop translation
|
37 |
* Multilanguage
|
38 |
* Multilingual language names in native alphabet
|
39 |
+
* Alternative flags for Quebec, Canada, USA, Brazil, Mexico, Argentina, Colombia
|
40 |
|
41 |
**Paid Features**
|
42 |
|
205 |
|
206 |
== Changelog ==
|
207 |
|
208 |
+
= 2.8.15 =
|
209 |
+
* Fix for saving issue on GoDaddy hosting
|
210 |
+
* Fix for double gziping in sub-directory URL structure when using Sucuri service
|
211 |
+
|
212 |
= 2.8.14 =
|
213 |
* Added Argentina and Colombia alternative flags
|
214 |
* Fixed bug in Nice looking dropdown look related to clicking the last dropdown element
|
url_addon/gtranslate.php
CHANGED
@@ -68,6 +68,7 @@ if(isset($request_headers['X-GT-Lang'])) {
|
|
68 |
$host = $glang . '.' . preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']);
|
69 |
$request_headers['Host'] = $host;
|
70 |
$request_headers['Accept-Encoding'] = '';
|
|
|
71 |
if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
|
72 |
$request_headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
|
73 |
//print_r($request_headers);
|
68 |
$host = $glang . '.' . preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']);
|
69 |
$request_headers['Host'] = $host;
|
70 |
$request_headers['Accept-Encoding'] = '';
|
71 |
+
$request_headers['accept-encoding'] = '';
|
72 |
if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
|
73 |
$request_headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
|
74 |
//print_r($request_headers);
|