Version Description
Download this release
Release Info
Developer | rm2773 |
Plugin | Google Language Translator |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.5
- google-language-translator.php +21 -3
- readme.txt +4 -2
- screenshot-1.png +0 -0
google-language-translator.php
CHANGED
@@ -7,7 +7,7 @@ Plugin Name: Google Language Translator
|
|
7 |
|
8 |
Plugin URI: http://www.studio88design.com/plugins/google-language-translator
|
9 |
|
10 |
-
Version: 1.
|
11 |
Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Setting options include: layout style, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
12 |
|
13 |
Author: Rob Myrick
|
@@ -76,6 +76,7 @@ function googlelanguagetranslator_menu_options(){
|
|
76 |
add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'googlelanguagetranslator-menu-options', 'googlelanguagetranslator_menu');
|
77 |
|
78 |
if(isset($_POST['googlelanguagetranslator_update_options'])){
|
|
|
79 |
update_option('googlelanguagetranslator_display',$_POST['googlelanguagetranslator_display']);
|
80 |
update_option('googlelanguagetranslator_toolbar',$_POST['googlelanguagetranslator_toolbar']);
|
81 |
update_option('googlelanguagetranslator_showbranding',$_POST['googlelanguagetranslator_showbranding']);
|
@@ -102,6 +103,23 @@ function googlelanguagetranslator_menu(){
|
|
102 |
<td><input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" <?php if(get_option('googlelanguagetranslator_active')==1){echo "checked";}?> />
|
103 |
Click Here to Activate Google Language Translator</td>
|
104 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
<tr>
|
107 |
<td width="25%">Display options:</td>
|
@@ -210,7 +228,7 @@ function googlelanguagetranslator_vertical(){
|
|
210 |
$str.='<div id="google_translate_element"></div><script>
|
211 |
function googleTranslateElementInit() {
|
212 |
new google.translate.TranslateElement({
|
213 |
-
pageLanguage: \'
|
214 |
}, \'google_translate_element\');
|
215 |
}
|
216 |
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
|
@@ -223,7 +241,7 @@ function googlelanguagetranslator_horizontal(){
|
|
223 |
$str.='<div id="google_translate_element"></div><script>
|
224 |
function googleTranslateElementInit() {
|
225 |
new google.translate.TranslateElement({
|
226 |
-
pageLanguage: \'
|
227 |
}, \'google_translate_element\');
|
228 |
}
|
229 |
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
|
7 |
|
8 |
Plugin URI: http://www.studio88design.com/plugins/google-language-translator
|
9 |
|
10 |
+
Version: 1.5
|
11 |
Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Setting options include: layout style, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
12 |
|
13 |
Author: Rob Myrick
|
76 |
add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'googlelanguagetranslator-menu-options', 'googlelanguagetranslator_menu');
|
77 |
|
78 |
if(isset($_POST['googlelanguagetranslator_update_options'])){
|
79 |
+
update_option('googlelanguagetranslator_language',$_POST['googlelanguagetranslator_language']);
|
80 |
update_option('googlelanguagetranslator_display',$_POST['googlelanguagetranslator_display']);
|
81 |
update_option('googlelanguagetranslator_toolbar',$_POST['googlelanguagetranslator_toolbar']);
|
82 |
update_option('googlelanguagetranslator_showbranding',$_POST['googlelanguagetranslator_showbranding']);
|
103 |
<td><input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" <?php if(get_option('googlelanguagetranslator_active')==1){echo "checked";}?> />
|
104 |
Click Here to Activate Google Language Translator</td>
|
105 |
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td>Choose the original language of your website</td>
|
109 |
+
<td>
|
110 |
+
<select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language" style="width:100px">
|
111 |
+
<option value="en" <?php if(get_option('googlelanguagetranslator_language')=='en'){echo "selected";}?>>English</option>
|
112 |
+
<option value="es" <?php if(get_option('googlelanguagetranslator_language')=='es'){echo "selected";}?>>Spanish</option>
|
113 |
+
<option value="fr" <?php if(get_option('googlelanguagetranslator_language')=='fr'){echo "selected";}?>>French</option>
|
114 |
+
<option value="it" <?php if(get_option('googlelanguagetranslator_language')=='it'){echo "selected";}?>>Italian</option>
|
115 |
+
<option value="da" <?php if(get_option('googlelanguagetranslator_language')=='da'){echo "selected";}?>>Danish</option>
|
116 |
+
<option value="ja" <?php if(get_option('googlelanguagetranslator_language')=='ja'){echo "selected";}?>>Japanese</option>
|
117 |
+
<option value="zh-CN" <?php if(get_option('googlelanguagetranslator_language')=='zh-CN'){echo "selected";}?>>Chinese</option>
|
118 |
+
<option value="ru" <?php if(get_option('googlelanguagetranslator_language')=='ru') {echo "selected";}?>>Russian</option>
|
119 |
+
</select>
|
120 |
+
</td>
|
121 |
+
</tr>
|
122 |
+
|
123 |
|
124 |
<tr>
|
125 |
<td width="25%">Display options:</td>
|
228 |
$str.='<div id="google_translate_element"></div><script>
|
229 |
function googleTranslateElementInit() {
|
230 |
new google.translate.TranslateElement({
|
231 |
+
pageLanguage: \''.get_option('googlelanguagetranslator_language').'\'
|
232 |
}, \'google_translate_element\');
|
233 |
}
|
234 |
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
|
241 |
$str.='<div id="google_translate_element"></div><script>
|
242 |
function googleTranslateElementInit() {
|
243 |
new google.translate.TranslateElement({
|
244 |
+
pageLanguage: \''.get_option('googlelanguagtranslator_language').'\', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
|
245 |
}, \'google_translate_element\');
|
246 |
}
|
247 |
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
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, language translate, google language translator, translation, translate, multi language
|
6 |
Requires at least: 2.9
|
7 |
Tested up to: 3.51
|
8 |
-
stable tag: 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 |
|
@@ -34,6 +34,8 @@ Settings include: inline or vertical layout, hide/show Google toolbar, and hide/
|
|
34 |
|
35 |
1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
|
36 |
|
|
|
|
|
37 |
== Screenshots ==
|
38 |
|
39 |
1. Settings include: inline or vertical layout, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
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.51
|
8 |
+
stable tag: 1.5
|
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 |
|
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 |
== Screenshots ==
|
40 |
|
41 |
1. Settings include: inline or vertical layout, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
screenshot-1.png
DELETED
Binary file
|