Version Description
Download this release
Release Info
Developer | rm2773 |
Plugin | Google Language Translator |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1
- google-language-translator.php +8 -8
- readme.txt +71 -65
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: 2.
|
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.studio88design.com/
|
@@ -12,11 +12,6 @@ function toggle_dropdown_script($hook_suffix) {
|
|
12 |
global $my_settings_page;
|
13 |
if ($my_settings_page == $hook_suffix) {
|
14 |
wp_enqueue_script( 'my-script', plugins_url('/admin.js',__FILE__), array('jquery'));
|
15 |
-
|
16 |
-
//if (get_option('googlelanguagetranslator_language_option')=='all') {
|
17 |
-
//wp_register_style( 'settings.css', plugins_url('/settings.css', __FILE__), array(), '1.0', 'all' );
|
18 |
-
//wp_enqueue_style( 'settings.css' );
|
19 |
-
//}
|
20 |
}
|
21 |
}
|
22 |
|
@@ -226,6 +221,7 @@ function googlelanguagetranslator_menu(){
|
|
226 |
<option value="fr" <?php if(get_option('googlelanguagetranslator_language')=='fr'){echo "selected";}?>>French</option>
|
227 |
<option value="it" <?php if(get_option('googlelanguagetranslator_language')=='it'){echo "selected";}?>>Italian</option>
|
228 |
<option value="da" <?php if(get_option('googlelanguagetranslator_language')=='da'){echo "selected";}?>>Danish</option>
|
|
|
229 |
<option value="ja" <?php if(get_option('googlelanguagetranslator_language')=='ja'){echo "selected";}?>>Japanese</option>
|
230 |
<option value="zh-CN" <?php if(get_option('googlelanguagetranslator_language')=='zh-CN'){echo "selected";}?>>Chinese</option>
|
231 |
<option value="ru" <?php if(get_option('googlelanguagetranslator_language')=='ru') {echo "selected";}?>>Russian</option>
|
@@ -519,8 +515,9 @@ function googlelanguagetranslator_vertical(){
|
|
519 |
|
520 |
</div>
|
521 |
<script type="text/javascript">
|
|
|
522 |
function GoogleLanguageTranslatorInit() {
|
523 |
-
new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.'
|
524 |
</script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
|
525 |
<div id="google_language_translator"></div>';
|
526 |
// $str.='<div id="google_translate_element"></div><script>
|
@@ -598,6 +595,7 @@ body {top:0px !important;}
|
|
598 |
function googlelanguagetranslator_showbranding_yes() {
|
599 |
if(get_option('googlelanguagetranslator_active')==1) { ?>
|
600 |
<style type="text/css">
|
|
|
601 |
.goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
|
602 |
.goog-tooltip {display: none !important;}
|
603 |
.goog-tooltip:hover {display: none !important;}
|
@@ -628,12 +626,14 @@ function googlelanguagetranslator_translatebox() {
|
|
628 |
function googlelanguagetranslator_showbranding_no() {
|
629 |
if(get_option('googlelanguagetranslator_active')==1) { ?>
|
630 |
<style type="text/css">
|
631 |
-
#google_language_translator a {display: none !important;}
|
632 |
.goog-te-gadget {color:transparent !important;}
|
|
|
633 |
.goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
|
634 |
.goog-tooltip {display: none !important;}
|
635 |
.goog-tooltip:hover {display: none !important;}
|
636 |
.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
|
|
|
637 |
</style>
|
638 |
<?php
|
639 |
}
|
2 |
/*
|
3 |
Plugin Name: Google Language Translator
|
4 |
Plugin URI: http://www.studio88design.com/plugins/google-language-translator
|
5 |
+
Version: 2.1
|
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.studio88design.com/
|
12 |
global $my_settings_page;
|
13 |
if ($my_settings_page == $hook_suffix) {
|
14 |
wp_enqueue_script( 'my-script', plugins_url('/admin.js',__FILE__), array('jquery'));
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
}
|
17 |
|
221 |
<option value="fr" <?php if(get_option('googlelanguagetranslator_language')=='fr'){echo "selected";}?>>French</option>
|
222 |
<option value="it" <?php if(get_option('googlelanguagetranslator_language')=='it'){echo "selected";}?>>Italian</option>
|
223 |
<option value="da" <?php if(get_option('googlelanguagetranslator_language')=='da'){echo "selected";}?>>Danish</option>
|
224 |
+
<option value="nl" <?php if(get_option('googlelanguagetranslator_language')=='nl'){echo "selected";}?>>Dutch</option>
|
225 |
<option value="ja" <?php if(get_option('googlelanguagetranslator_language')=='ja'){echo "selected";}?>>Japanese</option>
|
226 |
<option value="zh-CN" <?php if(get_option('googlelanguagetranslator_language')=='zh-CN'){echo "selected";}?>>Chinese</option>
|
227 |
<option value="ru" <?php if(get_option('googlelanguagetranslator_language')=='ru') {echo "selected";}?>>Russian</option>
|
515 |
|
516 |
</div>
|
517 |
<script type="text/javascript">
|
518 |
+
|
519 |
function GoogleLanguageTranslatorInit() {
|
520 |
+
new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.' }, \'google_language_translator\');}
|
521 |
</script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
|
522 |
<div id="google_language_translator"></div>';
|
523 |
// $str.='<div id="google_translate_element"></div><script>
|
595 |
function googlelanguagetranslator_showbranding_yes() {
|
596 |
if(get_option('googlelanguagetranslator_active')==1) { ?>
|
597 |
<style type="text/css">
|
598 |
+
#google_language_translator { width:130px !important; }
|
599 |
.goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
|
600 |
.goog-tooltip {display: none !important;}
|
601 |
.goog-tooltip:hover {display: none !important;}
|
626 |
function googlelanguagetranslator_showbranding_no() {
|
627 |
if(get_option('googlelanguagetranslator_active')==1) { ?>
|
628 |
<style type="text/css">
|
629 |
+
#google_language_translator a {display: none !important; }
|
630 |
.goog-te-gadget {color:transparent !important;}
|
631 |
+
.goog-te-gadget { font-size:0px !important; }
|
632 |
.goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
|
633 |
.goog-tooltip {display: none !important;}
|
634 |
.goog-tooltip:hover {display: none !important;}
|
635 |
.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
|
636 |
+
|
637 |
</style>
|
638 |
<?php
|
639 |
}
|
readme.txt
CHANGED
@@ -1,65 +1,71 @@
|
|
1 |
-
=== Google Language Translator ===
|
2 |
-
Contributors: Rob Myrick
|
3 |
-
Donate link: https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=c6aycTLE8Qho4lN9-QgzmJQKxNrRLomhJQ8gEAM2t5EZc5enxqC4Dpii-1C&dispatch=5885d80a13c0db1f8e263663d3faee8d0b7e678a25d883d0fa72c947f193f8fd
|
4 |
-
Plugin link: http://www.studio88design.com/plugins/google-language-translator
|
5 |
-
Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
|
6 |
-
Requires at least: 2.9
|
7 |
-
Tested up to: 3.52
|
8 |
-
stable tag: 2.
|
9 |
-
|
10 |
-
Welcome to Google Language Tranlator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
15 |
-
|
16 |
-
== Installation ==
|
17 |
-
|
18 |
-
1. Download the zip folder named google-language-translator.zip
|
19 |
-
2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
|
20 |
-
3. Activate the plugin through the plugin window in the admin panel.
|
21 |
-
4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
|
22 |
-
5. Copy the shortcode and paste it into a page, post or widget.
|
23 |
-
6. Do not use the shortcode twice on a single page - it will not work.
|
24 |
-
|
25 |
-
== Frequently Asked Questions ==
|
26 |
-
|
27 |
-
== Changelog ==
|
28 |
-
|
29 |
-
1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
|
30 |
-
|
31 |
-
1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
|
32 |
-
|
33 |
-
1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
|
34 |
-
|
35 |
-
1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
|
36 |
-
|
37 |
-
1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
|
38 |
-
|
39 |
-
1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
|
40 |
-
|
41 |
-
1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
|
42 |
-
|
43 |
-
1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
|
44 |
-
|
45 |
-
1.9
|
46 |
-
|
47 |
-
- Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
|
48 |
-
|
49 |
-
- Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
|
50 |
-
|
51 |
-
- Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
|
52 |
-
|
53 |
-
- Added jQuery functionality to the settings panel to improve the user experience.
|
54 |
-
|
55 |
-
- Added an option for users to display/hide the flag images.
|
56 |
-
|
57 |
-
- Added an option for users to display/hide the translate box when flags are displayed.
|
58 |
-
|
59 |
-
- Removed the settings.css file - I found a better way of displaying the options without CSS.
|
60 |
-
|
61 |
-
2.0 Corrected some immediate errors in the 1.9 update.
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Google Language Translator ===
|
2 |
+
Contributors: Rob Myrick
|
3 |
+
Donate link: https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=c6aycTLE8Qho4lN9-QgzmJQKxNrRLomhJQ8gEAM2t5EZc5enxqC4Dpii-1C&dispatch=5885d80a13c0db1f8e263663d3faee8d0b7e678a25d883d0fa72c947f193f8fd
|
4 |
+
Plugin link: http://www.studio88design.com/plugins/google-language-translator
|
5 |
+
Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
|
6 |
+
Requires at least: 2.9
|
7 |
+
Tested up to: 3.52
|
8 |
+
stable tag: 2.1
|
9 |
+
|
10 |
+
Welcome to Google Language Tranlator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
15 |
+
|
16 |
+
== Installation ==
|
17 |
+
|
18 |
+
1. Download the zip folder named google-language-translator.zip
|
19 |
+
2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
|
20 |
+
3. Activate the plugin through the plugin window in the admin panel.
|
21 |
+
4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
|
22 |
+
5. Copy the shortcode and paste it into a page, post or widget.
|
23 |
+
6. Do not use the shortcode twice on a single page - it will not work.
|
24 |
+
|
25 |
+
== Frequently Asked Questions ==
|
26 |
+
|
27 |
+
== Changelog ==
|
28 |
+
|
29 |
+
1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
|
30 |
+
|
31 |
+
1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
|
32 |
+
|
33 |
+
1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
|
34 |
+
|
35 |
+
1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
|
36 |
+
|
37 |
+
1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
|
38 |
+
|
39 |
+
1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
|
40 |
+
|
41 |
+
1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
|
42 |
+
|
43 |
+
1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
|
44 |
+
|
45 |
+
1.9
|
46 |
+
|
47 |
+
- Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
|
48 |
+
|
49 |
+
- Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
|
50 |
+
|
51 |
+
- Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
|
52 |
+
|
53 |
+
- Added jQuery functionality to the settings panel to improve the user experience.
|
54 |
+
|
55 |
+
- Added an option for users to display/hide the flag images.
|
56 |
+
|
57 |
+
- Added an option for users to display/hide the translate box when flags are displayed.
|
58 |
+
|
59 |
+
- Removed the settings.css file - I found a better way of displaying the options without CSS.
|
60 |
+
|
61 |
+
2.0 Corrected some immediate errors in the 1.9 update.
|
62 |
+
|
63 |
+
2.1
|
64 |
+
|
65 |
+
- Added language "Dutch" to the Original Language drop-down option on the settings page.
|
66 |
+
|
67 |
+
- Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
|
68 |
+
|
69 |
+
== Screenshots ==
|
70 |
+
|
71 |
+
1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.
|