Translate WordPress with GTranslate - Version 2.8.17

Version Description

  • Fixed saving translation issue which appeared in 2.8.16 version
  • Minor readme fixes
Download this release

Release Info

Developer edo888
Plugin Icon 128x128 Translate WordPress with GTranslate
Version 2.8.17
Comparing to
See all releases

Code changes from version 2.8.16 to 2.8.17

Files changed (3) hide show
  1. gtranslate.php +1 -1
  2. readme.txt +6 -2
  3. url_addon/gtranslate.php +6 -2
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.16
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
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.17
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
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.16
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
@@ -185,7 +185,7 @@ Yes, we have a 15 days free trial for our new customers.
185
  = Can I use it on SSL / HTTPS website? =
186
  Absolutely! You can use it for our free and paid versions.
187
 
188
- Recently we have added support for Let's Encrypt certificates which are provided for free if you use sub-directory URL structure.
189
 
190
  = Can I exclude some parts from being translated? =
191
  Yes, you need to wrap the text you don't want to be translated with &lt;span class="notranslate"&gt;&lt;/span&gt;. You can add class="nturl" to the "a" tag if you don't want the destination URL to contain the language code.
@@ -211,6 +211,10 @@ You need to go to the language you want to edit, for instance, French: http://do
211
 
212
  == Changelog ==
213
 
 
 
 
 
214
  = 2.8.16 =
215
  * Added option to save encoded HTML to avoid some firewall blocking
216
  * Updated readme to look better with the new wp.org plugin updates
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.17
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
185
  = Can I use it on SSL / HTTPS website? =
186
  Absolutely! You can use it for our free and paid versions.
187
 
188
+ Recently we have added support for Let's Encrypt certificates which are provided for free if you use sub-domain URL structure.
189
 
190
  = Can I exclude some parts from being translated? =
191
  Yes, you need to wrap the text you don't want to be translated with &lt;span class="notranslate"&gt;&lt;/span&gt;. You can add class="nturl" to the "a" tag if you don't want the destination URL to contain the language code.
211
 
212
  == Changelog ==
213
 
214
+ = 2.8.17 =
215
+ * Fixed saving translation issue which appeared in 2.8.16 version
216
+ * Minor readme fixes
217
+
218
  = 2.8.16 =
219
  * Added option to save encoded HTML to avoid some firewall blocking
220
  * Updated readme to look better with the new wp.org plugin updates
url_addon/gtranslate.php CHANGED
@@ -67,11 +67,15 @@ if(isset($request_headers['X-GT-Lang'])) {
67
 
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
- $request_headers['authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
75
  }
76
  //print_r($request_headers);
77
  //exit;
67
 
68
  $host = $glang . '.' . preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']);
69
  $request_headers['Host'] = $host;
70
+ if(isset($request_headers['HOST'])) unset($request_headers['HOST']);
71
+ if(isset($request_headers['host'])) unset($request_headers['host']);
72
+
73
  $request_headers['Accept-Encoding'] = '';
74
+ if(isset($request_headers['accept-encoding'])) unset($request_headers['accept-encoding']);
75
+
76
  if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
77
  $request_headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
78
+ if(isset($request_headers['authorization'])) unset($request_headers['authorization']);
79
  }
80
  //print_r($request_headers);
81
  //exit;