Google Language Translator - Version 5.0.32

Version Description

Download this release

Release Info

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

Code changes from version 5.0.31 to 5.0.32

Files changed (2) hide show
  1. google-language-translator.php +3 -5
  2. readme.txt +6 -2
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.31
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/
@@ -347,7 +347,7 @@ class google_language_translator {
347
  $is_active = get_option ( 'googlelanguagetranslator_active' );
348
  $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
349
  $str = ''; ?>
350
- <script>jQuery(document).ready(function($) { $('#flags a, a.single-language, .tool-items a').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>
351
 
352
  <?php
353
 
@@ -436,13 +436,11 @@ class google_language_translator {
436
  if ($is_multilanguage == 1) {
437
  $multilanguagePage = ', multilanguagePage:true';
438
  $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $multilanguagePage . $this->analytics()."}, 'google_language_translator');}</script>";
439
- $str.="<script type='text/javascript' src='//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit'></script>";
440
  echo $str;
441
 
442
  } elseif ($is_multilanguage == 0) {
443
  $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $this->analytics()."}, 'google_language_translator');}</script>";
444
- $str.="<script type='text/javascript' src='//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit'></script>";
445
- echo $str;
446
  }
447
  }
448
 
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 5.0.32
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/
347
  $is_active = get_option ( 'googlelanguagetranslator_active' );
348
  $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
349
  $str = ''; ?>
350
+ <script>jQuery(document).ready(function($) { $('#flags a, a.single-language, .tool-items a').each(function() { $(this).attr('data-lang', $(this).attr('title')); }); $("a.flag").live("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><script type='text/javascript' src='//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit'></script>
351
 
352
  <?php
353
 
436
  if ($is_multilanguage == 1) {
437
  $multilanguagePage = ', multilanguagePage:true';
438
  $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $multilanguagePage . $this->analytics()."}, 'google_language_translator');}</script>";
 
439
  echo $str;
440
 
441
  } elseif ($is_multilanguage == 0) {
442
  $str.="<div id='glt-footer'></div><script type='text/javascript'>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $this->analytics()."}, 'google_language_translator');}</script>";
443
+ echo $str;
 
444
  }
445
  }
446
 
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id
4
  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.8
8
- Stable tag: 5.0.31
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,10 @@ A: Yes! Add the "notranslate" class to the HTML element containing your text. Fo
46
 
47
  == Changelog ==
48
 
 
 
 
 
49
  5.0.31
50
  - Fixed an issue with menu shortcode not displaying the correct flag choice (i.e. for English/Spanish/Portuguese flags).
51
 
4
  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.8.1
8
+ Stable tag: 5.0.32
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.32
50
+ - Fixed the issue with menu translation not working on some mobile devices.
51
+ - Moved element.js script to the footer.
52
+
53
  5.0.31
54
  - Fixed an issue with menu shortcode not displaying the correct flag choice (i.e. for English/Spanish/Portuguese flags).
55