Translate WordPress with GTranslate - Version 2.8.48

Version Description

  • Fix for Javanese language hreflang code: jv instead of jw
  • Typo in variable name fixed
Download this release

Release Info

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

Code changes from version 2.8.47 to 2.8.48

Files changed (3) hide show
  1. gtranslate.php +8 -4
  2. readme.txt +8 -4
  3. url_addon/gtranslate.php +1 -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.47
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
@@ -438,7 +438,7 @@ function RefreshDoWidgetCode() {
438
  widget_preview += '<br />';
439
  else
440
  widget_preview += ' ';
441
- widget_preview += '<select onchange="doGTranslate(this);" class="notranslate" id="gtranslate_selector">';
442
 
443
  widget_preview += '<option value="">Select Language</option>';
444
  jQuery.each(language_codes2, function(i, val) {
@@ -1944,8 +1944,10 @@ if($data['add_hreflang_tags'] and ($data['pro_version'] or $data['enterprise_ver
1944
 
1945
  if($current_url !== false) {
1946
  // adding default language
1947
- if($data['default_language'] == 'iw')
1948
  echo '<link rel="alternate" hreflang="he" href="'.$current_url.'" />'."\n";
 
 
1949
  else
1950
  echo '<link rel="alternate" hreflang="'.$data['default_language'].'" href="'.$current_url.'" />'."\n";
1951
 
@@ -1960,8 +1962,10 @@ if($data['add_hreflang_tags'] and ($data['pro_version'] or $data['enterprise_ver
1960
  $href = str_ireplace('://' . $_SERVER['HTTP_HOST'], '://' . $_SERVER['HTTP_HOST'] . '/' . $lang, $current_url);
1961
 
1962
  if(!empty($href) and $lang != $data['default_language']) {
1963
- if($lang == 'iw')
1964
  echo '<link rel="alternate" hreflang="he" href="'.$href.'" />'."\n";
 
 
1965
  else
1966
  echo '<link rel="alternate" hreflang="'.$lang.'" href="'.$href.'" />'."\n";
1967
  }
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.48
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
438
  widget_preview += '<br />';
439
  else
440
  widget_preview += ' ';
441
+ widget_preview += '<select onchange="doGTranslate(this);" class="notranslate" id="gtranslate_selector" aria-label="Website Language Selector">';
442
 
443
  widget_preview += '<option value="">Select Language</option>';
444
  jQuery.each(language_codes2, function(i, val) {
1944
 
1945
  if($current_url !== false) {
1946
  // adding default language
1947
+ if($data['default_language'] === 'iw')
1948
  echo '<link rel="alternate" hreflang="he" href="'.$current_url.'" />'."\n";
1949
+ elseif($data['default_language'] === 'jw')
1950
+ echo '<link rel="alternate" hreflang="jv" href="'.$current_url.'" />'."\n";
1951
  else
1952
  echo '<link rel="alternate" hreflang="'.$data['default_language'].'" href="'.$current_url.'" />'."\n";
1953
 
1962
  $href = str_ireplace('://' . $_SERVER['HTTP_HOST'], '://' . $_SERVER['HTTP_HOST'] . '/' . $lang, $current_url);
1963
 
1964
  if(!empty($href) and $lang != $data['default_language']) {
1965
+ if($lang === 'iw')
1966
  echo '<link rel="alternate" hreflang="he" href="'.$href.'" />'."\n";
1967
+ elseif($lang === 'jw')
1968
+ echo '<link rel="alternate" hreflang="jv" href="'.$href.'" />'."\n";
1969
  else
1970
  echo '<link rel="alternate" hreflang="'.$lang.'" href="'.$href.'" />'."\n";
1971
  }
readme.txt CHANGED
@@ -4,10 +4,11 @@ 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: 5.2
7
- Stable tag: 2.8.47
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
 
11
 
12
  Translate WordPress with Google Translate multilanguage plugin to make your website multilingual. Complete multilingual solution for WordPress.
13
 
@@ -58,7 +59,7 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
58
  * URL Translation aka slug translation is possible (example.com/about-us &rarr; example.es/sobre-nosotros)
59
  * Add hreflang tags for translated alternatives
60
  * You can manually correct translations
61
- * In context translation interface (make corrections without loosing the context)
62
  * Meta data translation (meta keywords, meta description)
63
  * Translating schema.org microdata for better search engine appearance
64
  * Seamless updates (cloud service updated on our side - SaaS, you do not need to worry about backups on your side)
@@ -141,7 +142,7 @@ You can read this blog post for more info: https://gtranslate.io/blog/translatio
141
  Yes, we use Google Translate widget for website which provides free machine translations which makes it possible to make your wordpress website multilingual instantly upon installation.
142
 
143
  = Can I modify the translations? =
144
- That feature is available in our paid version. You will be able to make edits directly on the page without loosing the context.
145
 
146
  = Which languages are supported? =
147
  Here is the list: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sudanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu
@@ -210,7 +211,6 @@ You can check that this website is indexed in Google by searching for site:gtran
210
  You need to go to the language you want to edit, for instance, French: http://domain.com/fr/ and add ?language_edit=1 to the end of the URL: http://domain.com/fr/?language_edit=1 and you will see the Edit and Add to Cart buttons near each text.
211
 
212
  == Screenshots ==
213
-
214
  1. Dropdown with flags
215
  2. Nice dropdown with flags (closed)
216
  3. Nice dropdown with flags (open)
@@ -221,6 +221,10 @@ You need to go to the language you want to edit, for instance, French: http://do
221
  8. User Dashboard
222
 
223
  == Changelog ==
 
 
 
 
224
  = 2.8.47 =
225
  * Fix for hebrew hreflang code when hebrew is the original language
226
  * Visitor real IP detection fixed for woocommerce plugin
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: 5.2
7
+ Stable tag: 2.8.48
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
11
+ Author URI: https://gtranslate.io/?xyz=998
12
 
13
  Translate WordPress with Google Translate multilanguage plugin to make your website multilingual. Complete multilingual solution for WordPress.
14
 
59
  * URL Translation aka slug translation is possible (example.com/about-us &rarr; example.es/sobre-nosotros)
60
  * Add hreflang tags for translated alternatives
61
  * You can manually correct translations
62
+ * In context translation interface (make corrections without losing the context)
63
  * Meta data translation (meta keywords, meta description)
64
  * Translating schema.org microdata for better search engine appearance
65
  * Seamless updates (cloud service updated on our side - SaaS, you do not need to worry about backups on your side)
142
  Yes, we use Google Translate widget for website which provides free machine translations which makes it possible to make your wordpress website multilingual instantly upon installation.
143
 
144
  = Can I modify the translations? =
145
+ That feature is available in our paid version. You will be able to make edits directly on the page without losing the context.
146
 
147
  = Which languages are supported? =
148
  Here is the list: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sudanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu
211
  You need to go to the language you want to edit, for instance, French: http://domain.com/fr/ and add ?language_edit=1 to the end of the URL: http://domain.com/fr/?language_edit=1 and you will see the Edit and Add to Cart buttons near each text.
212
 
213
  == Screenshots ==
 
214
  1. Dropdown with flags
215
  2. Nice dropdown with flags (closed)
216
  3. Nice dropdown with flags (open)
221
  8. User Dashboard
222
 
223
  == Changelog ==
224
+ = 2.8.48 =
225
+ * Fix for Javanese language hreflang code: jv instead of jw
226
+ * Typo in variable name fixed
227
+
228
  = 2.8.47 =
229
  * Fix for hebrew hreflang code when hebrew is the original language
230
  * Visitor real IP detection fixed for woocommerce plugin
url_addon/gtranslate.php CHANGED
@@ -120,7 +120,7 @@ if(isset($_SERVER['HTTP_CF_CONNECTING_IP']) and !empty($_SERVER['HTTP_CF_CONNECT
120
  $viewer_ip_address = $_SERVER['HTTP_CF_CONNECTING_IP'];
121
  if(isset($_SERVER['HTTP_X_SUCURI_CLIENTIP']) and !empty($_SERVER['HTTP_X_SUCURI_CLIENTIP']))
122
  $viewer_ip_address = $_SERVER['HTTP_X_SUCURI_CLIENTIP'];
123
- if(!isset($viewer_ip_addres))
124
  $viewer_ip_address = $_SERVER['REMOTE_ADDR'];
125
 
126
  $headers[] = 'X-GT-Viewer-IP: ' . $viewer_ip_address;
120
  $viewer_ip_address = $_SERVER['HTTP_CF_CONNECTING_IP'];
121
  if(isset($_SERVER['HTTP_X_SUCURI_CLIENTIP']) and !empty($_SERVER['HTTP_X_SUCURI_CLIENTIP']))
122
  $viewer_ip_address = $_SERVER['HTTP_X_SUCURI_CLIENTIP'];
123
+ if(!isset($viewer_ip_address))
124
  $viewer_ip_address = $_SERVER['REMOTE_ADDR'];
125
 
126
  $headers[] = 'X-GT-Viewer-IP: ' . $viewer_ip_address;