Translate WordPress with GTranslate - Version 2.8.37

Version Description

  • Fix for identical hreflang tags when using www prefix for domain
Download this release

Release Info

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

Code changes from version 2.8.36 to 2.8.37

Files changed (2) hide show
  1. gtranslate.php +3 -3
  2. readme.txt +4 -1
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.36
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
@@ -1963,9 +1963,9 @@ if($data['add_hreflang_tags'] and ($data['pro_version'] or $data['enterprise_ver
1963
  $domain = str_replace('www.', '', $_SERVER['HTTP_HOST']);
1964
 
1965
  if($data['enterprise_version'])
1966
- $href = str_ireplace('://' . $domain, '://' . $lang . '.' . $domain, $current_url);
1967
  elseif($data['pro_version'])
1968
- $href = str_ireplace('://' . $domain, '://' . $domain . '/' . $lang, $current_url);
1969
 
1970
  if(!empty($href) and $lang != $data['default_language'])
1971
  echo '<link rel="alternate" hreflang="'.$lang.'" href="'.$href.'" />'."\n";
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.37
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
1963
  $domain = str_replace('www.', '', $_SERVER['HTTP_HOST']);
1964
 
1965
  if($data['enterprise_version'])
1966
+ $href = str_ireplace('://' . $_SERVER['HTTP_HOST'], '://' . $lang . '.' . $domain, $current_url);
1967
  elseif($data['pro_version'])
1968
+ $href = str_ireplace('://' . $_SERVER['HTTP_HOST'], '://' . $_SERVER['HTTP_HOST'] . '/' . $lang, $current_url);
1969
 
1970
  if(!empty($href) and $lang != $data['default_language'])
1971
  echo '<link rel="alternate" hreflang="'.$lang.'" href="'.$href.'" />'."\n";
readme.txt CHANGED
@@ -4,7 +4,7 @@ Author: Translate AI Multilingual Solutions
4
  Tags: translate wordpress, multilingual, translate, translation, language, bilingual, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8.1
6
  Tested up to: 4.9
7
- Stable tag: 2.8.36
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
@@ -220,6 +220,9 @@ You need to go to the language you want to edit, for instance, French: http://do
220
 
221
  == Changelog ==
222
 
 
 
 
223
  = 2.8.36 =
224
  * Option to add hreflang tags for translated pages
225
  * Fix for Contact Form 7
4
  Tags: translate wordpress, multilingual, translate, translation, language, bilingual, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8.1
6
  Tested up to: 4.9
7
+ Stable tag: 2.8.37
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
220
 
221
  == Changelog ==
222
 
223
+ = 2.8.37 =
224
+ * Fix for identical hreflang tags when using www prefix for domain
225
+
226
  = 2.8.36 =
227
  * Option to add hreflang tags for translated pages
228
  * Fix for Contact Form 7