Google Language Translator - Version 5.0.24

Version Description

Download this release

Release Info

Developer rm2773
Plugin Icon wp plugin Google Language Translator
Version 5.0.24
Comparing to
See all releases

Code changes from version 5.0.22 to 5.0.24

css/style.css CHANGED
@@ -230,7 +230,7 @@ code {
230
 
231
  /* Individual flag backgrounds (22px) */
232
 
233
- #flags.size22 a[title="Afrikaans"],
234
  .tool-container .tool-items a[title="Afrikaans"] {
235
  background:url('../images/flags22.png') -1px -3px no-repeat;
236
  }
230
 
231
  /* Individual flag backgrounds (22px) */
232
 
233
+ #flags.size22 a[data-lang="Afrikaans"],
234
  .tool-container .tool-items a[title="Afrikaans"] {
235
  background:url('../images/flags22.png') -1px -3px no-repeat;
236
  }
css/style.php CHANGED
@@ -1,99 +1,106 @@
1
- <?php
2
-
3
- $glt_css = get_option("googlelanguagetranslator_css");
4
-
5
- echo '<style type="text/css">';
6
- echo $glt_css;
7
-
8
- if (get_option('googlelanguagetranslator_flags') == 'show_flags') {
9
-
10
- if(get_option('googlelanguagetranslator_display')=='Vertical') {
11
- if (get_option('googlelanguagetranslator_language_option')=='specific') {
12
- echo '#flags {display:none !important; }';
13
- }
14
-
15
- echo 'p.hello { font-size:12px; color:darkgray; }';
16
- echo '#google_language_translator, #flags { text-align:left; }';
17
- } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') {
18
-
19
- if (get_option('googlelanguagetranslator_language_option')=='specific') {
20
- echo '#flags {display:none !important; }';
21
- }
22
-
23
- if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') {
24
- echo '#google_language_translator { text-align:left !important; }';
25
- echo 'select.goog-te-combo { float:right; }';
26
- echo '.goog-te-gadget { padding-top:13px; }';
27
- echo '.goog-te-gadget .goog-te-combo { margin-top:-7px !important; }';
28
- }
29
-
30
- echo '.goog-te-gadget { margin-top:2px !important; }';
31
- echo 'p.hello { font-size:12px; color:#666; }';
32
- }
33
-
34
- if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
35
- echo '#google_language_translator, #language { clear:both; width:160px; text-align:right; }';
36
- echo '#language { float:right; }';
37
- echo '#flags { text-align:right; width:165px; float:right; clear:right; }';
38
- echo '#flags ul { float:right !important; }';
39
- echo 'p.hello { text-align:right; float:right; clear:both; }';
40
- echo '.glt-clear { height:0px; clear:both; margin:0px; padding:0px; }';
41
- }
42
-
43
- if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') {
44
- echo '#google_language_translator { clear:both; }';
45
- echo '#flags { width:165px; }';
46
- echo '#flags a { display:inline-block; margin-right:2px; }';
47
- } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
48
- echo '#flags { width:165px; }';
49
- echo '#flags a { display:inline-block; margin-left:2px; }';
50
- }
51
- }
52
-
53
- if (get_option('googlelanguagetranslator_manage_translations') == 0) {
54
- if(get_option('googlelanguagetranslator_active')==1) {
55
- echo '.goog-tooltip {display: none !important;}';
56
- echo '.goog-tooltip:hover {display: none !important;}';
57
- echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
58
- }
59
- }
60
-
61
- if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
62
- if(get_option('googlelanguagetranslator_active')==1) {
63
- echo '#google_language_translator { width:auto !important; }';
64
- }
65
-
66
- } elseif(get_option('googlelanguagetranslator_showbranding')=='No' && get_option('googlelanguagetranslator_display')!='SIMPLE') {
67
- if(get_option('googlelanguagetranslator_active')==1) {
68
- echo '#google_language_translator a {display: none !important; }';
69
- echo '.goog-te-gadget {color:transparent !important;}';
70
- echo '.goog-te-gadget { font-size:0px !important; }';
71
- echo '.goog-branding { display:none; }';
72
- }
73
- }
74
-
75
- if (get_option('googlelanguagetranslator_translatebox') == 'no') {
76
- if(get_option('googlelanguagetranslator_active')==1) {
77
- echo '#google_language_translator { display:none; }';
78
- }
79
- }
80
-
81
- if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
82
- if(get_option('googlelanguagetranslator_active') ==1) {
83
- echo '#flags { display:none; }';
84
- }
85
- }
86
-
87
- if(get_option('googlelanguagetranslator_toolbar')=='Yes') {
88
- if(get_option('googlelanguagetranslator_active')==1) {
89
- echo '#google_language_translator {color: transparent;}';
90
- echo 'body { top:0px !important; }';
91
- }
92
- } elseif(get_option('googlelanguagetranslator_toolbar')=='No') {
93
- if(get_option('googlelanguagetranslator_active')==1) {
94
- echo '.goog-te-banner-frame{visibility:hidden !important;}';
95
- echo 'body { top:0px !important;}';
96
- }
97
- }
98
- echo '</style>';
 
 
 
 
 
 
 
99
  ?>
1
+ <?php
2
+
3
+ $glt_css = get_option("googlelanguagetranslator_css");
4
+
5
+ echo '<style type="text/css">';
6
+ echo $glt_css;
7
+
8
+ if (get_option('googlelanguagetranslator_flags') == 'show_flags') {
9
+
10
+ if(get_option('googlelanguagetranslator_display')=='Vertical') {
11
+ if (get_option('googlelanguagetranslator_language_option')=='specific') {
12
+ echo '#flags {display:none !important; }';
13
+ }
14
+
15
+ echo 'p.hello { font-size:12px; color:darkgray; }';
16
+ echo '#google_language_translator, #flags { text-align:left; }';
17
+ } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') {
18
+
19
+ if (get_option('googlelanguagetranslator_language_option')=='specific') {
20
+ echo '#flags {display:none !important; }';
21
+ }
22
+
23
+ if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') {
24
+ echo '#google_language_translator { text-align:left !important; }';
25
+ echo 'select.goog-te-combo { float:right; }';
26
+ echo '.goog-te-gadget { padding-top:13px; }';
27
+ echo '.goog-te-gadget .goog-te-combo { margin-top:-7px !important; }';
28
+ }
29
+
30
+ echo '.goog-te-gadget { margin-top:2px !important; }';
31
+ echo 'p.hello { font-size:12px; color:#666; }';
32
+ } else if (get_option('googlelanguagetranslator_display')=='SIMPLE') {
33
+ if (get_option('googlelanguagetranslator_language_option')=='specific') {
34
+ echo '#flags {display:none !important; }';
35
+ }
36
+ if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') {
37
+ echo '.goog-te-gadget { float:right; padding-right:10px; clear:right; }';
38
+ }
39
+ }
40
+
41
+ if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
42
+ echo '#google_language_translator, #language { clear:both; width:160px; text-align:right; }';
43
+ echo '#language { float:right; }';
44
+ echo '#flags { text-align:right; width:165px; float:right; clear:right; }';
45
+ echo '#flags ul { float:right !important; }';
46
+ echo 'p.hello { text-align:right; float:right; clear:both; }';
47
+ echo '.glt-clear { height:0px; clear:both; margin:0px; padding:0px; }';
48
+ }
49
+
50
+ if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') {
51
+ echo '#google_language_translator { clear:both; }';
52
+ echo '#flags { width:165px; }';
53
+ echo '#flags a { display:inline-block; margin-right:2px; }';
54
+ } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
55
+ echo '#flags { width:165px; }';
56
+ echo '#flags a { display:inline-block; margin-left:2px; }';
57
+ }
58
+ }
59
+
60
+ if (get_option('googlelanguagetranslator_manage_translations') == 0) {
61
+ if(get_option('googlelanguagetranslator_active')==1) {
62
+ echo '.goog-tooltip {display: none !important;}';
63
+ echo '.goog-tooltip:hover {display: none !important;}';
64
+ echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
65
+ }
66
+ }
67
+
68
+ if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
69
+ if(get_option('googlelanguagetranslator_active')==1) {
70
+ echo '#google_language_translator { width:auto !important; }';
71
+ }
72
+
73
+ } elseif(get_option('googlelanguagetranslator_showbranding')=='No' && get_option('googlelanguagetranslator_display')!='SIMPLE') {
74
+ if(get_option('googlelanguagetranslator_active')==1) {
75
+ echo '#google_language_translator a {display: none !important; }';
76
+ echo '.goog-te-gadget {color:transparent !important;}';
77
+ echo '.goog-te-gadget { font-size:0px !important; }';
78
+ echo '.goog-branding { display:none; }';
79
+ }
80
+ }
81
+
82
+ if (get_option('googlelanguagetranslator_translatebox') == 'no') {
83
+ if(get_option('googlelanguagetranslator_active')==1) {
84
+ echo '#google_language_translator { display:none; }';
85
+ }
86
+ }
87
+
88
+ if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
89
+ if(get_option('googlelanguagetranslator_active') ==1) {
90
+ echo '#flags { display:none; }';
91
+ }
92
+ }
93
+
94
+ if(get_option('googlelanguagetranslator_toolbar')=='Yes') {
95
+ if(get_option('googlelanguagetranslator_active')==1) {
96
+ echo '#google_language_translator {color: transparent;}';
97
+ echo 'body { top:0px !important; }';
98
+ }
99
+ } elseif(get_option('googlelanguagetranslator_toolbar')=='No') {
100
+ if(get_option('googlelanguagetranslator_active')==1) {
101
+ echo '.goog-te-banner-frame{visibility:hidden !important;}';
102
+ echo 'body { top:0px !important;}';
103
+ }
104
+ }
105
+ echo '</style>';
106
  ?>
google-language-translator.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 5.0.22
6
  Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
  Author: Rob Myrick
8
  Author URI: http://www.wp-studio.net/
@@ -266,14 +266,8 @@ class google_language_translator {
266
  }
267
 
268
  $comma_separated = implode(",",array_values($items));
269
-
270
- if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
271
- $lang = ", includedLanguages:'".$comma_separated."'";
272
- return $lang;
273
- } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
274
- $lang = ", includedLanguages:'".$comma_separated."'";
275
- return $lang;
276
- }
277
  }
278
  }
279
 
@@ -314,11 +308,12 @@ class google_language_translator {
314
  $language_name_flag = 'canada';
315
  }
316
 
317
- return '<a class="nturl notranslate '.$language_code.' single-language flag" title="'.$language.'">'.$label.'</a>';
318
  }
319
 
320
  public function footer_script() {
321
  global $shortcode_started;
 
322
  $default_language = get_option('googlelanguagetranslator_language');
323
  $language_choices = $this->googlelanguagetranslator_included_languages();
324
  $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
@@ -335,7 +330,7 @@ class google_language_translator {
335
  $is_active = get_option ( 'googlelanguagetranslator_active' );
336
  $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
337
  $str = ''; ?>
338
- <script>jQuery(document).ready(function(a){a("a.flag").on("click",function(){function l(){doGoogleLanguageTranslator(default_lang+"|"+default_lang); }function n(){doGoogleLanguageTranslator(default_lang+"|"+lang_prefix); }lang=a(this).attr('title'), default_lang="<?php echo get_option('googlelanguagetranslator_language'); ?>",lang_prefix=a(this).attr("class").split(" ")[2],a(".tool-container").hide(),lang_prefix==default_lang?l():n()}),0==a("body > #google_language_translator").length&&a("#glt-footer").html("<div id='google_language_translator'></div>")});</script>
339
 
340
  <?php
341
 
@@ -417,7 +412,7 @@ class google_language_translator {
417
  $layout = get_option('googlelanguagetranslator_display');
418
  $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
419
  $horizontal_layout = ', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL';
420
- $simple_layout = ', layout: google.translate.TranslateElement.InlineLayout.SIMPLE';
421
  $auto_display = ', autoDisplay: false';
422
  $default_language = get_option('googlelanguagetranslator_language');
423
 
@@ -438,6 +433,7 @@ class google_language_translator {
438
 
439
  global $shortcode_started;
440
 
 
441
  $shortcode_started = 'true';
442
  $get_flag_choices = get_option ('flag_display_settings');
443
  $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
@@ -804,9 +800,9 @@ class google_language_translator {
804
  $options = get_option (''.$option_name.''); ?>
805
 
806
  <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:190px">
807
- <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
808
- <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
809
- </select>
810
  <?php }
811
 
812
  public function googlelanguagetranslator_display_cb() {
@@ -825,7 +821,19 @@ class google_language_translator {
825
  <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
826
  <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
827
  <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
828
- <option value="SIMPLE" <?php if (get_option('googlelanguagetranslator_display')=='SIMPLE'){echo "selected";}?>>Popup Style</option>
 
 
 
 
 
 
 
 
 
 
 
 
829
  </select>
830
  <?php }
831
 
@@ -1132,12 +1140,12 @@ $('.choose_flags').find('input:checkbox').prop('checked', false); }); });</scrip
1132
  </tr>
1133
 
1134
  <tr class="notranslate">
1135
- <td>Show translate box?</td>
1136
  <td><?php $this->googlelanguagetranslator_translatebox_cb(); ?></td>
1137
  </tr>
1138
 
1139
  <tr class="notranslate">
1140
- <td>Layout option: <span style="color:red; font-weight:bold">NEW!</span> (Popup layout just added!)</td>
1141
  <td><?php $this->googlelanguagetranslator_display_cb(); ?></td>
1142
  </tr>
1143
 
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 5.0.24
6
  Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
  Author: Rob Myrick
8
  Author URI: http://www.wp-studio.net/
266
  }
267
 
268
  $comma_separated = implode(",",array_values($items));
269
+ $lang = ", includedLanguages:'".$comma_separated."'";
270
+ return $lang;
 
 
 
 
 
 
271
  }
272
  }
273
 
308
  $language_name_flag = 'canada';
309
  }
310
 
311
+ return '<a class="notranslate flag '.$language_code.' single-language" title="'.$language.'">'.$label.'</a>';
312
  }
313
 
314
  public function footer_script() {
315
  global $shortcode_started;
316
+ $i = 0;
317
  $default_language = get_option('googlelanguagetranslator_language');
318
  $language_choices = $this->googlelanguagetranslator_included_languages();
319
  $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
330
  $is_active = get_option ( 'googlelanguagetranslator_active' );
331
  $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
332
  $str = ''; ?>
333
+ <script>jQuery(document).ready(function($) { $('#flags a, a.single-language').each(function() { $(this).attr('data-lang', $(this).attr('title')); }); $("a.flag").on("click",function(){function l(){doGoogleLanguageTranslator(default_lang+"|"+default_lang); }function n(){doGoogleLanguageTranslator(default_lang+"|"+lang_prefix); } lang_text=$(this).attr('data-lang'),default_lang="<?php echo get_option('googlelanguagetranslator_language'); ?>",lang_prefix=$(this).attr("class").split(" ")[2],$(".tool-container").hide(),lang_prefix==default_lang?l():n()}),0==$("body > #google_language_translator").length&&$("#glt-footer").html("<div id='google_language_translator'></div>")});</script>
334
 
335
  <?php
336
 
412
  $layout = get_option('googlelanguagetranslator_display');
413
  $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
414
  $horizontal_layout = ', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL';
415
+ $simple_layout = ', layout: google.translate.TranslateElement.InlineLayout.SIMPLE';
416
  $auto_display = ', autoDisplay: false';
417
  $default_language = get_option('googlelanguagetranslator_language');
418
 
433
 
434
  global $shortcode_started;
435
 
436
+ $i = 0;
437
  $shortcode_started = 'true';
438
  $get_flag_choices = get_option ('flag_display_settings');
439
  $new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
800
  $options = get_option (''.$option_name.''); ?>
801
 
802
  <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:190px">
803
+ <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Show language switcher</option>
804
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>Hide language switcher</option>
805
+ </select>
806
  <?php }
807
 
808
  public function googlelanguagetranslator_display_cb() {
821
  <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
822
  <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
823
  <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
824
+ <?php
825
+ $browser_lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';
826
+ if (!empty($get_http_accept_language)):
827
+ $get_http_accept_language = explode(",",$browser_lang);
828
+ else:
829
+ $get_http_accept_language = explode(",",$browser_lang);
830
+ endif;
831
+ $bestlang = $get_http_accept_language[0];
832
+ $bestlang_prefix = substr($get_http_accept_language[0],0,2);
833
+
834
+ if ($bestlang_prefix == 'en'): ?>
835
+ <option value="SIMPLE" <?php if (get_option('googlelanguagetranslator_display')=='SIMPLE'){echo "selected";}?>>SIMPLE</option>
836
+ <?php endif; ?>
837
  </select>
838
  <?php }
839
 
1140
  </tr>
1141
 
1142
  <tr class="notranslate">
1143
+ <td>Show or hide the langauge switcher?</td>
1144
  <td><?php $this->googlelanguagetranslator_translatebox_cb(); ?></td>
1145
  </tr>
1146
 
1147
  <tr class="notranslate">
1148
+ <td>Layout option:</td>
1149
  <td><?php $this->googlelanguagetranslator_display_cb(); ?></td>
1150
  </tr>
1151
 
js/flags.js CHANGED
@@ -1,28 +1,58 @@
1
- function triggerHtmlEvent(element, eventName) {
2
- var event;
3
- if(document.createEvent) {
4
- event = document.createEvent('HTMLEvents');
5
- event.initEvent(eventName, true, true);
6
- element.dispatchEvent(event);
7
- } else {
8
- event = document.createEventObject();
9
- event.eventType = eventName;
10
- element.fireEvent('on' + event.eventType, event);
11
- }
 
 
 
 
 
 
 
12
  }
13
 
14
  function doGoogleLanguageTranslator(lang_pair) {
15
- jQuery('#google_language_translator .goog-te-combo option').each(function(index, value) {
16
- if(jQuery(this).text().indexOf(lang) > -1) {
17
- if (lang_pair.value) lang_pair = lang_pair.value;
18
- if (lang_pair == '') return;
19
- var language_code = lang_pair.split('|')[1];
20
- var select = document.getElementsByClassName('goog-te-combo');
21
- event = select[0];
22
- event.value = language_code;
23
- triggerHtmlEvent(event, 'change');
24
- triggerHtmlEvent(event, 'change');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
- });
27
  }
28
-
1
+ /*-------------------------------------------------------------------------------*
2
+ * Script for onClick trigger functionality used by flag images
3
+ * Script modified from original GTranslate plugin created by Edvard Ananyan at http://edo.webmaster.am
4
+ * GTranslate Free Version is licensed under GNU/GPL license
5
+ *-------------------------------------------------------------------------------*/
6
+
7
+ /* <![CDATA[ */
8
+ function GLTFireEvent(lang_pair, lang_dest) {
9
+ try {
10
+ if (document.createEvent) {
11
+ var event = document.createEvent("HTMLEvents");
12
+ event.initEvent(lang_dest, true, true);
13
+ lang_pair.dispatchEvent(event)
14
+ } else {
15
+ var event = document.createEventObject();
16
+ lang_pair.fireEvent('on' + lang_dest, event)
17
+ }
18
+ } catch (e) {}
19
  }
20
 
21
  function doGoogleLanguageTranslator(lang_pair) {
22
+ if (lang_pair.value) lang_pair = lang_pair.value;
23
+ if (lang_pair == '') return;
24
+ var lang_dest = lang_pair.split('|')[1];
25
+ var event;
26
+ var classic = jQuery('.goog-te-combo');
27
+ var simple = jQuery('.goog-te-menu-frame:first');
28
+ var simpleValue = simple.contents().find('.goog-te-menu2-item span.text:contains('+lang_text+')');
29
+ if (classic.length == 0) {
30
+ for (var i = 0; i < simple.length; i++) {
31
+ event = simple[i];
32
+ //alert('Simple is active.');
33
+ }
34
+ } else {
35
+ for (var i = 0; i < classic.length; i++) {
36
+ event = classic[i];
37
+ //alert('Classic is active.');
38
+ }
39
+ }
40
+ if (document.getElementById('google_language_translator') != null) {
41
+ if (classic.length != 0) {
42
+ if (lang_prefix != default_lang) {
43
+ event.value = lang_dest;
44
+ GLTFireEvent(event, 'change');
45
+ } else {
46
+ jQuery('.goog-te-banner-frame:first').contents().find('.goog-close-link').get(0).click();
47
+ }
48
+ } else {
49
+ event.value = lang_dest;
50
+ if (lang_prefix != default_lang) {
51
+ simpleValue.click();
52
+ } else {
53
+ jQuery('.goog-te-banner-frame:first').contents().find('.goog-close-link').get(0).click();
54
+ }
55
+ }
56
  }
 
57
  }
58
+ /* ]]> */
js/load-sortable-flags.js CHANGED
@@ -1,16 +1,17 @@
1
- jQuery(document).ready(function($) {
2
- $("#sortable,#sortable-toolbar").sortable({
3
- opacity: 0.7,
4
- distance: 10,
5
- helper: "clone",
6
- forcePlaceholderSize:true,
7
- update: function(event,ui) {
8
- var newOrder = $(this).sortable('toArray').toString();
9
- $.post("options.php",{order: newOrder});
10
- $('#order').val(newOrder);
11
- }
12
- });
13
-
14
- $("#sortable,#sortable-toolbar").disableSelection();
15
- });
16
-
 
1
+ jQuery(document).ready(function($) {
2
+ $("#sortable,#sortable-toolbar").sortable({
3
+ opacity: 0.7,
4
+ distance: 10,
5
+ helper: "clone",
6
+ forcePlaceholderSize:true,
7
+ update: function(event,ui) {
8
+ var newOrder = $(this).sortable('toArray').toString();
9
+ $.post("options.php",{order: newOrder});
10
+ $('#order').val(newOrder);
11
+ },
12
+ });
13
+
14
+ $("#sortable,#sortable-toolbar").disableSelection();
15
+ });
16
+
17
+
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin link: http://wp-studio.net/how-it-works
5
  Tags: language translator, google translator, language translate, translate wordpress, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
  Tested up to: 4.6
8
- Stable tag: 5.0.22
9
 
10
  Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
 
@@ -46,6 +46,14 @@ A: Yes! Add the "notranslate" class to the HTML element containing your text. Fo
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
 
 
 
49
  5.0.22
50
  - Changed a line of text on the settings page.
51
  - Removed a line of redundant javascript to reduce unnecessary page load.
5
  Tags: language translator, google translator, language translate, translate wordpress, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
  Tested up to: 4.6
8
+ Stable tag: 5.0.24
9
 
10
  Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
 
46
 
47
  == Changelog ==
48
 
49
+ 5.0.24
50
+ - Improved functionality for flags. Users are now returned to original language when the flag is displayed. The Google Toolbar will be hidden once returning back to the original language. The Google Toolbar will appear again when another translation is made.
51
+ - Fixed the issue with flags not functioning with SIMPLE layout.
52
+ - Removed SIMPLE layout option (which was not working properly) for browsers not using English browsers. The coding challenge for implementing this option is difficult and must be postponed until we find a practical solution.
53
+
54
+ 5.0.23
55
+ - Reverted back to an older version of flags.js. We still have some bugs to work out before releasing the updated version. We apologize for the inconvenience.
56
+
57
  5.0.22
58
  - Changed a line of text on the settings page.
59
  - Removed a line of redundant javascript to reduce unnecessary page load.