Translate WordPress with GTranslate - Version 2.0.12

Version Description

  • Readme updated, demo videos added
  • Fixed issue in Nice dropdown look
Download this release

Release Info

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

Code changes from version 2.0.11 to 2.0.12

Files changed (2) hide show
  1. gtranslate.php +17 -3
  2. readme.txt +12 -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://gtranslate.io/forum/">GTranslate Forum</a>.
6
- Version: 2.0.11
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
 
@@ -91,6 +91,11 @@ class GTranslate extends WP_Widget {
91
  echo '<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.';
92
  else
93
  echo $data['widget_code'];
 
 
 
 
 
94
  echo $args['after_widget'];
95
  }
96
 
@@ -104,6 +109,11 @@ class GTranslate extends WP_Widget {
104
  echo '<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.';
105
  else
106
  echo $data['widget_code'];
 
 
 
 
 
107
  echo $args['after_widget'];
108
  }
109
 
@@ -113,8 +123,12 @@ class GTranslate extends WP_Widget {
113
 
114
  if(empty($data['widget_code']))
115
  return '<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.';
116
- else
117
- return $data['widget_code'];
 
 
 
 
118
  }
119
 
120
  public static function register() {
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://gtranslate.io/forum/">GTranslate Forum</a>.
6
+ Version: 2.0.12
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
 
91
  echo '<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.';
92
  else
93
  echo $data['widget_code'];
94
+
95
+ if(isset($_SERVER['HTTP_X_GT_LANG'])) {
96
+ echo '<script>jQuery(document).ready(function() {jQuery(\'.switcher div.selected a\').html(jQuery(".switcher div.option a[onclick*=\'|'.$_SERVER['HTTP_X_GT_LANG'].'\']").html())});</script>';
97
+ }
98
+
99
  echo $args['after_widget'];
100
  }
101
 
109
  echo '<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.';
110
  else
111
  echo $data['widget_code'];
112
+
113
+ if(isset($_SERVER['HTTP_X_GT_LANG'])) {
114
+ echo '<script>jQuery(document).ready(function() {jQuery(\'.switcher div.selected a\').html(jQuery(".switcher div.option a[onclick*=\'|'.$_SERVER['HTTP_X_GT_LANG'].'\']").html())});</script>';
115
+ }
116
+
117
  echo $args['after_widget'];
118
  }
119
 
123
 
124
  if(empty($data['widget_code']))
125
  return '<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.';
126
+ else {
127
+ if(isset($_SERVER['HTTP_X_GT_LANG'])) {
128
+ return $data['widget_code'] . '<script>jQuery(document).ready(function() {jQuery(\'.switcher div.selected a\').html(jQuery(".switcher div.option a[onclick*=\'|'.$_SERVER['HTTP_X_GT_LANG'].'\']").html())});</script>';
129
+ } else
130
+ return $data['widget_code'];
131
+ }
132
  }
133
 
134
  public static function register() {
readme.txt CHANGED
@@ -4,12 +4,12 @@ Author: Edvard Ananyan
4
  Tags: widget, plugin, sidebar, google, translate, translation, localization, google translate, multilingual, multilanguage
5
  Requires at least: 2.8
6
  Tested up to: 4.5
7
- Stable tag: 2.0.11
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
- GTranslate uses Google Translate power to make your wordpress site multilingual and available to more than 99% of internet users.
13
 
14
  == Description ==
15
 
@@ -36,9 +36,15 @@ Please `use` [GTranslate Forum](https://gtranslate.io/forum/) for your questions
36
 
37
  [Download GTranslate](https://gtranslate.io/#pricing)
38
 
 
 
 
39
  **Watch GTranslate Tour**
40
  [vimeo http://vimeo.com/30132555]
41
 
 
 
 
42
  == Installation ==
43
 
44
  1. Upload `gtranslate` folder to the `/wp-content/plugins/` directory
@@ -386,6 +392,10 @@ You need to go to the language you want to edit, for instance, French: http://do
386
 
387
  == Changelog ==
388
 
 
 
 
 
389
  = 2.0.11 =
390
  * Fixed issue with default language in Nice dropdown look
391
 
4
  Tags: widget, plugin, sidebar, google, translate, translation, localization, google translate, multilingual, multilanguage
5
  Requires at least: 2.8
6
  Tested up to: 4.5
7
+ Stable tag: 2.0.12
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
+ GTranslate - Google Translate for WordPress will make your website multilingual and available to more than 99% of internet users.
13
 
14
  == Description ==
15
 
36
 
37
  [Download GTranslate](https://gtranslate.io/#pricing)
38
 
39
+ **GTranslate Wordpress Demo**
40
+ https://www.youtube.com/watch?v=9mtC3LFBErY
41
+
42
  **Watch GTranslate Tour**
43
  [vimeo http://vimeo.com/30132555]
44
 
45
+ **Edit Translations Demo (paid)**
46
+ https://www.youtube.com/watch?v=YwSy3VtQx3I
47
+
48
  == Installation ==
49
 
50
  1. Upload `gtranslate` folder to the `/wp-content/plugins/` directory
392
 
393
  == Changelog ==
394
 
395
+ = 2.0.12 =
396
+ * Readme updated, demo videos added
397
+ * Fixed issue in Nice dropdown look
398
+
399
  = 2.0.11 =
400
  * Fixed issue with default language in Nice dropdown look
401