Google Language Translator - Version 3.0.4

Version Description

Download this release

Release Info

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

Code changes from version 3.0.3 to 3.0.4

Files changed (6) hide show
  1. css/style2.php +0 -1
  2. glt_css.php +101 -99
  3. glt_settings_display.php +175 -0
  4. glt_settings_init.php +1171 -0
  5. google-language-translator.php +79 -1424
  6. readme.txt +160 -154
css/style2.php DELETED
@@ -1 +0,0 @@
1
- <?php echo 'hello'; ?>
 
glt_css.php CHANGED
@@ -1,99 +1,101 @@
1
- <style type="text/css">
2
- <?php
3
- $options = get_option ('googlelanguagetranslator_flag_size');
4
- $glt_css = get_option("googlelanguagetranslator_css");
5
- if (get_option('googlelanguagetranslator_flags') == 'show_flags') {
6
-
7
- if(get_option('googlelanguagetranslator_display')=='Vertical') {
8
- if (get_option('googlelanguagetranslator_language_option')=='specific') {
9
- echo '#flags {display:none !important; }';
10
- }
11
-
12
- echo 'p.hello { font-size:12px; color:darkgray; }';
13
- echo '#google_language_translator, #flags { text-align:left; }';
14
- } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') {
15
-
16
- if (get_option('googlelanguagetranslator_language_option')=='specific') {
17
- echo '#flags {display:none !important; }';
18
- }
19
-
20
- if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') {
21
- echo '#google_language_translator { text-align:left !important; }';
22
- echo 'select.goog-te-combo { float:right; }';
23
- echo '.goog-te-gadget { padding-top:13px; }';
24
- echo '.goog-te-gadget .goog-te-combo { margin-top:-7px !important; }';
25
- }
26
-
27
- echo '.goog-te-gadget { margin-top:2px !important; }';
28
- echo 'p.hello { font-size:12px; color:#666; }';
29
- }
30
-
31
- if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
32
- echo '#google_language_translator, #language { clear:both; width:auto !important; text-align:right; }';
33
- echo '#language { float:right; }';
34
- echo '#flags { text-align:right; width:165px; float:right; clear:right; }';
35
- echo 'p.hello { text-align:right; float:right; clear:both; }';
36
- echo '.glt-clear { height:0px; clear:both; margin:0px; padding:0px; }';
37
- }
38
-
39
- if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') {
40
- echo '#google_language_translator { clear:both; }';
41
- echo '#flags { width:165px; }';
42
- echo '#flags a { display:inline-block; margin-right:2px; }';
43
- } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
44
- echo '#flags { width:165px; }';
45
- echo '#flags a { display:inline-block; margin-left:2px; }';
46
- }
47
- }
48
-
49
- if (get_option('googlelanguagetranslator_manage_translations') == 0) {
50
- if(get_option('googlelanguagetranslator_active')==1) {
51
- echo '.goog-tooltip {display: none !important;}';
52
- echo '.goog-tooltip:hover {display: none !important;}';
53
- echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
54
- }
55
- }
56
-
57
- if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
58
- if(get_option('googlelanguagetranslator_active')==1) {
59
- echo '#google_language_translator { width:auto !important; }';
60
- }
61
-
62
- } elseif(get_option('googlelanguagetranslator_showbranding')=='No') {
63
- if(get_option('googlelanguagetranslator_active')==1) {
64
- echo '#google_language_translator a {display: none !important; }';
65
- echo '.goog-te-gadget {color:transparent !important;}';
66
- echo '.goog-te-gadget { font-size:0px !important; }';
67
- echo '.goog-tooltip {display: none !important;}';
68
- echo '.goog-tooltip:hover {display: none !important;}';
69
- echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
70
- echo '.goog-branding { display:none; }';
71
- }
72
- }
73
-
74
- if (get_option('googlelanguagetranslator_translatebox') == 'no') {
75
- if(get_option('googlelanguagetranslator_active')==1) {
76
- echo '#google_language_translator { display:none; }';
77
- }
78
- }
79
-
80
- if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
81
- if(get_option('googlelanguagetranslator_active') ==1) {
82
- echo '#flags { display:none; }';
83
- }
84
- }
85
-
86
- if(get_option('googlelanguagetranslator_toolbar')=='Yes') {
87
- if(get_option('googlelanguagetranslator_active')==1) {
88
- echo '#google_language_translator {color: transparent;}';
89
- echo 'body { top:0px !important; }';
90
- }
91
- } elseif(get_option('googlelanguagetranslator_toolbar')=='No') {
92
- if(get_option('googlelanguagetranslator_active')==1) {
93
- echo '.goog-te-banner-frame{visibility:hidden !important;}';
94
- echo 'body { top:0px !important;}';
95
- }
96
- }
97
-
98
- ?>
99
- </style>
 
 
1
+ <style type="text/css">
2
+ <?php
3
+
4
+ $glt_css = get_option("googlelanguagetranslator_css");
5
+ echo $glt_css;
6
+
7
+ if (get_option('googlelanguagetranslator_flags') == 'show_flags') {
8
+
9
+ if(get_option('googlelanguagetranslator_display')=='Vertical') {
10
+ if (get_option('googlelanguagetranslator_language_option')=='specific') {
11
+ echo '#flags {display:none !important; }';
12
+ }
13
+
14
+ echo 'p.hello { font-size:12px; color:darkgray; }';
15
+ echo '#google_language_translator, #flags { text-align:left; }';
16
+ } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') {
17
+
18
+ if (get_option('googlelanguagetranslator_language_option')=='specific') {
19
+ echo '#flags {display:none !important; }';
20
+ }
21
+
22
+ if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') {
23
+ echo '#google_language_translator { text-align:left !important; }';
24
+ echo 'select.goog-te-combo { float:right; }';
25
+ echo '.goog-te-gadget { padding-top:13px; }';
26
+ echo '.goog-te-gadget .goog-te-combo { margin-top:-7px !important; }';
27
+ }
28
+
29
+ echo '.goog-te-gadget { margin-top:2px !important; }';
30
+ echo 'p.hello { font-size:12px; color:#666; }';
31
+ }
32
+
33
+ if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
34
+ echo '#google_language_translator, #language { clear:both; width:auto !important; text-align:right; }';
35
+ echo '#language { float:right; }';
36
+ echo '#flags { text-align:right; width:165px; float:right; clear:right; }';
37
+ echo 'p.hello { text-align:right; float:right; clear:both; }';
38
+ echo '.glt-clear { height:0px; clear:both; margin:0px; padding:0px; }';
39
+ }
40
+
41
+ if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') {
42
+ echo '#google_language_translator { clear:both; }';
43
+ echo '#flags { width:165px; }';
44
+ echo '#flags a { display:inline-block; margin-right:2px; }';
45
+ } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
46
+ echo '#flags { width:165px; }';
47
+ echo '#flags a { display:inline-block; margin-left:2px; }';
48
+ }
49
+ }
50
+
51
+ if (get_option('googlelanguagetranslator_manage_translations') == 0) {
52
+ if(get_option('googlelanguagetranslator_active')==1) {
53
+ echo '.goog-tooltip {display: none !important;}';
54
+ echo '.goog-tooltip:hover {display: none !important;}';
55
+ echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
56
+ }
57
+ }
58
+
59
+ if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
60
+ if(get_option('googlelanguagetranslator_active')==1) {
61
+ echo '#google_language_translator { width:auto !important; }';
62
+ }
63
+
64
+ } elseif(get_option('googlelanguagetranslator_showbranding')=='No') {
65
+ if(get_option('googlelanguagetranslator_active')==1) {
66
+ echo '#google_language_translator a {display: none !important; }';
67
+ echo '.goog-te-gadget {color:transparent !important;}';
68
+ echo '.goog-te-gadget { font-size:0px !important; }';
69
+ echo '.goog-tooltip {display: none !important;}';
70
+ echo '.goog-tooltip:hover {display: none !important;}';
71
+ echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
72
+ echo '.goog-branding { display:none; }';
73
+ }
74
+ }
75
+
76
+ if (get_option('googlelanguagetranslator_translatebox') == 'no') {
77
+ if(get_option('googlelanguagetranslator_active')==1) {
78
+ echo '#google_language_translator { display:none; }';
79
+ }
80
+ }
81
+
82
+ if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
83
+ if(get_option('googlelanguagetranslator_active') ==1) {
84
+ echo '#flags { display:none; }';
85
+ }
86
+ }
87
+
88
+ if(get_option('googlelanguagetranslator_toolbar')=='Yes') {
89
+ if(get_option('googlelanguagetranslator_active')==1) {
90
+ echo '#google_language_translator {color: transparent;}';
91
+ echo 'body { top:0px !important; }';
92
+ }
93
+ } elseif(get_option('googlelanguagetranslator_toolbar')=='No') {
94
+ if(get_option('googlelanguagetranslator_active')==1) {
95
+ echo '.goog-te-banner-frame{visibility:hidden !important;}';
96
+ echo 'body { top:0px !important;}';
97
+ }
98
+ }
99
+
100
+ ?>
101
+ </style>
glt_settings_display.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php function page_layout_cb() { ?>
2
+ <div class="wrap">
3
+ <div id="icon-options-general" class="icon32"></div>
4
+ <h2><span class="notranslate">Google Language Translator</span></h2>
5
+ <form action="<?php echo admin_url('options.php'); ?>" method="post">
6
+ <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
7
+ <div class="postbox" style="width: 100%">
8
+ <h3 class="notranslate">Settings</h3>
9
+
10
+ <?php settings_fields('google_language_translator'); ?>
11
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
12
+ <tr>
13
+ <td style="width:60%" class="notranslate">Plugin Status:</td>
14
+ <td class="notranslate"><?php googlelanguagetranslator_active_cb(); ?></td>
15
+ </tr>
16
+
17
+ <tr class="notranslate">
18
+ <td>Choose the original language of your website</td>
19
+ <td><?php googlelanguagetranslator_language_cb(); ?></td>
20
+ </tr>
21
+
22
+ <tr class="notranslate">
23
+ <td>What translation languages will you display to website visitors?<br/>(Note: To show flags you must choose "All Languages")</td>
24
+ <td><?php googlelanguagetranslator_language_option_cb(); ?></td>
25
+ </tr>
26
+
27
+ <tr class="notranslate">
28
+ <td colspan="2"><?php language_display_settings_cb(); ?></td>
29
+ </tr>
30
+
31
+ <tr class="notranslate">
32
+ <td class="choose_flags_intro">Show flag images?<br/>(Display up to 72 flags above the translator)</td>
33
+ <td class="choose_flags_intro"><?php googlelanguagetranslator_flags_cb(); ?></td>
34
+ </tr>
35
+
36
+ <tr class="notranslate">
37
+ <td class="choose_flags">Choose the flags you want to display:</td>
38
+ <td></td>
39
+ </tr>
40
+
41
+ <tr class="notranslate">
42
+ <td colspan="2" class="choose_flags"><?php flag_display_settings_cb(); ?></td>
43
+ </tr>
44
+
45
+ <tr class="notranslate">
46
+ <td>Show translate box?</td>
47
+ <td><?php googlelanguagetranslator_translatebox_cb(); ?></td>
48
+ </tr>
49
+
50
+ <tr class="notranslate">
51
+ <td>Layout options:</td>
52
+ <td><?php googlelanguagetranslator_display_cb(); ?></td>
53
+ </tr>
54
+
55
+ <tr class="notranslate">
56
+ <td>Show Google Toolbar?</td>
57
+ <td><?php googlelanguagetranslator_toolbar_cb(); ?></td>
58
+ </tr>
59
+
60
+ <tr class="notranslate">
61
+ <td>Show Google Branding?<br/>
62
+ <span>(<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a> about Google's Attribution Requirements.)</span>
63
+ </td>
64
+ <td><?php googlelanguagetranslator_showbranding_cb(); ?></td>
65
+ </tr>
66
+
67
+ <tr class="alignment notranslate">
68
+ <td class="flagdisplay">Align the translator left or right?</td>
69
+ <td class="flagdisplay"><?php googlelanguagetranslator_flags_alignment_cb(); ?></td>
70
+ </tr>
71
+
72
+ <tr class="manage_translations notranslate">
73
+ <td>Turn on translation management?<br/>(Managed directly through your Google account. Requires <a href="http://translate.google.com/manager/website/settings" target="_blank">Google Translate</a> meta tag installed in header.)</td>
74
+ <td><?php googlelanguagetranslator_manage_translations_cb(); ?></td>
75
+ </tr>
76
+
77
+ <tr class="multilanguage notranslate">
78
+ <td>Multilanguage Page Option?: (<em>not recommended)</em><br/>(If checked, a "forced" translation of your webpage will be served when returned to the default language, instead of delivering original content.)</td>
79
+ <td><?php googlelanguagetranslator_multilanguage_cb(); ?></td>
80
+ </tr>
81
+
82
+ <tr class="notranslate">
83
+ <td>Google Analytics:</td>
84
+ <td><?php googlelanguagetranslator_analytics_cb(); ?></td>
85
+ </tr>
86
+
87
+ <tr class="analytics notranslate">
88
+ <td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
89
+ <td><?php googlelanguagetranslator_analytics_id_cb(); ?></td>
90
+ </tr>
91
+
92
+ <tr class="notranslate">
93
+ <td>Copy/Paste this shortcode if adding to pages/posts:</td>
94
+ <td>[google-translator]</td>
95
+ </tr>
96
+ </table>
97
+
98
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
99
+ <tr class="notranslate">
100
+ <td>Copy/Paste this code if adding to header/footer:</td>
101
+ <td>&lt?php echo do_shortcode('[google-translator]'); ?&gt</td>
102
+ </tr>
103
+
104
+ <tr class="notranslate">
105
+ <td><?php submit_button(); ?></td>
106
+ <td></td>
107
+ </tr>
108
+ </table>
109
+
110
+ </div> <!-- .postbox -->
111
+ </div> <!-- .metbox-holder -->
112
+
113
+ <div class="metabox-holder" style="float:right; clear:right; width:33%">
114
+ <div class="postbox">
115
+ <h3 class="notranslate">Preview</h3>
116
+ <table style="width:100%">
117
+ <tr>
118
+ <td style="height:80px; box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span> &nbsp; <span>Hello</span></p></td>
119
+ </tr>
120
+ </table>
121
+ </div> <!-- .postbox -->
122
+ </div> <!-- .metabox-holder -->
123
+
124
+
125
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
126
+ <div class="postbox">
127
+ <h3>Add CSS Styles</h3>
128
+ <div class="inside">
129
+ <p>You can apply any necessary CSS styles below:</p>
130
+ <?php googlelanguagetranslator_css_cb(); ?>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </form>
135
+
136
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
137
+ <div class="postbox">
138
+ <h3>GLT Premium is Here! $12</h3>
139
+ <div class="inside"><a href="http://www.wp-studio.net/" target="_blank"><img style="background:#444; border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px" src="<?php echo plugins_url('google-language-translator/images/logo.png'); ?>"></a><br />
140
+ <ul id="features">
141
+ <li>Get more design and functionality options</li>
142
+ <li>Loads directly with page content, not afterward</li>
143
+ <li>jQuery-powered "Elegant" theme to engage your visitors</li>
144
+ <li>Manage your website's translations</li>
145
+ <li>Show or hide any features you want</li>
146
+ <li>Full access to our support forum</li>
147
+ <li>Full access to future updates, for life of the plugin</li>
148
+ </ul>
149
+ </div>
150
+ </div>
151
+ </div>
152
+
153
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
154
+ <div class="postbox">
155
+ <h3>Please Consider A Donation</h3>
156
+ <div class="inside">If you like this plugin and find it useful, help keep this plugin actively developed by clicking the donate button <br /><br />
157
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
158
+ <input type="hidden" name="cmd" value="_donations">
159
+ <input type="hidden" name="business" value="robertmyrick@hotmail.com">
160
+ <input type="hidden" name="lc" value="US">
161
+ <input type="hidden" name="item_name" value="Support Studio 88 Design and help us bring you more Wordpress goodies! Any donation is kindly appreciated. Thank you!">
162
+ <input type="hidden" name="no_note" value="0">
163
+ <input type="hidden" name="currency_code" value="USD">
164
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
165
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
166
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
167
+ </form>
168
+
169
+ <br />
170
+ <br />
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </div> <!-- .wrap -->
175
+ <?php } ?>
glt_settings_init.php ADDED
@@ -0,0 +1,1171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* ------------------------------------------------------------------------ *
4
+ * Setting Registration
5
+ * ------------------------------------------------------------------------ */
6
+
7
+ function initialize_settings() {
8
+
9
+ // First, we register a section. This is necessary since all future options must belong to one.
10
+ add_settings_section(
11
+ 'glt_settings', // ID used to identify this section and with which to register options
12
+ 'Settings', // Title to be displayed on the administration page
13
+ '', // Callback used to render the description of the section
14
+ 'google_language_translator' // Page on which to add this section of options
15
+ );
16
+
17
+
18
+
19
+
20
+
21
+ //Fieldset 1
22
+ add_settings_field( 'googlelanguagetranslator_active','Plugin status:','googlelanguagetranslator_active_cb','google_language_translator','glt_settings');
23
+ add_settings_field( 'googlelanguagetranslator_language','Choose the original language of your website','','googlelanguagetranslator_language_cb','glt_settings');
24
+ add_settings_field( 'googlelanguagetranslator_language_option','What translation languages will you display to website visitors?','googlelanguagetranslator_language_option_cb','google_language_translator','glt_settings');
25
+ add_settings_field( 'language_display_settings','Your language choices','language_display_settings_cb','google_language_translator','glt_settings');
26
+ add_settings_field( 'googlelanguagetranslator_flags','Show Flag Images?','googlelanguagetranslator_flags_cb','google_language_translator','glt_settings');
27
+ add_settings_field( 'flag_display_settings','Flag Options','flag_display_settings_cb','google_language_translator','glt_settings');
28
+ add_settings_field( 'googlelanguagetranslator_translatebox','Show Translate Box?','googlelanguagetranslator_translatebox_cb','google_language_translator','glt_settings');
29
+ add_settings_field( 'googlelanguagetranslator_display', 'Layout Options','googlelanguagetranslator_display_cb','google_language_translator','glt_settings');
30
+ add_settings_field( 'googlelanguagetranslator_toolbar', 'Show Toolbar','googlelanguagetranslator_toolbar_cb','google_language_translator','glt_settings');
31
+ add_settings_field( 'googlelanguagetranslator_showbranding', 'Show Google Branding','googlelanguagetranslator_showbranding_cb','google_language_translator','glt_settings');
32
+ add_settings_field( 'googlelanguagetranslator_flags_alignment', 'Align Flags Right or Left', 'googlelanguagetranslator_flags_alignment_cb','google_language_translator','glt_settings');
33
+ add_settings_field( 'googlelanguagetranslator_analytics','Activate Google Analytics tracking?','googlelanguagetranslator_analytics_cb','google_language_translator','glt_settings');
34
+ add_settings_field( 'googlelanguagetranslator_analytics_id','Enter your Google Analytics ID','googlelanguagetranslator_analytics_id_cb','google_language_translator','glt_settings');
35
+ add_settings_field( 'googlelanguagetranslator_css','Custom CSS Overrides','googlelanguagetranslator_css_cb','google_language_translator','glt_settings');
36
+ add_settings_field( 'googlelanguagetranslator_manage_translations','Turn on translation management?','googlelanguagetranslator_manage_translations_cb','google_language_translator','glt_settings');
37
+ add_settings_field( 'googlelanguagetranslator_multilanguage','Multilanguage webpages?','googlelanguagetranslator_multilanguage_cb','google_language_translator','glt_settings');
38
+
39
+
40
+
41
+ //Register Fieldset 1
42
+ register_setting( 'google_language_translator','googlelanguagetranslator_active');
43
+ register_setting( 'google_language_translator','googlelanguagetranslator_language');
44
+ register_setting( 'google_language_translator','googlelanguagetranslator_language_option');
45
+ register_setting( 'google_language_translator','language_display_settings');
46
+ register_setting( 'google_language_translator','googlelanguagetranslator_flags');
47
+ register_setting( 'google_language_translator','flag_display_settings');
48
+ register_setting( 'google_language_translator','googlelanguagetranslator_translatebox');
49
+ register_setting( 'google_language_translator','googlelanguagetranslator_display');
50
+ register_setting( 'google_language_translator','googlelanguagetranslator_toolbar');
51
+ register_setting( 'google_language_translator','googlelanguagetranslator_showbranding');
52
+ register_setting( 'google_language_translator','googlelanguagetranslator_flags_alignment');
53
+ register_setting( 'google_language_translator','googlelanguagetranslator_disable_mootools');
54
+ register_setting( 'google_language_translator','googlelanguagetranslator_disable_modal');
55
+ register_setting( 'google_language_translator','googlelanguagetranslator_analytics');
56
+ register_setting( 'google_language_translator','googlelanguagetranslator_analytics_id');
57
+ register_setting( 'google_language_translator','googlelanguagetranslator_css');
58
+ register_setting( 'google_language_translator','googlelanguagetranslator_manage_translations');
59
+ register_setting( 'google_language_translator','googlelanguagetranslator_multilanguage');
60
+
61
+ function googlelanguagetranslator_active_cb() {
62
+
63
+ $option_name = 'googlelanguagetranslator_active' ;
64
+ $new_value = 1;
65
+
66
+ if ( get_option( $option_name ) === false ) {
67
+
68
+ // The option does not exist, so we update it.
69
+ update_option( $option_name, $new_value );
70
+ }
71
+
72
+ $options = get_option (''.$option_name.'');
73
+
74
+ $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Language Translator?';
75
+ echo $html;
76
+ }
77
+
78
+ function googlelanguagetranslator_language_cb() {
79
+
80
+ $option_name = 'googlelanguagetranslator_language';
81
+ $new_value = 'en';
82
+
83
+ if ( get_option( $option_name ) === false ) {
84
+
85
+ // The option does not exist, so we update it.
86
+ update_option( $option_name, $new_value );
87
+ }
88
+
89
+ $options = get_option (''.$option_name.''); ?>
90
+ <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
91
+ <option value="af" <?php if($options=='af'){echo "selected";}?>>Afrikaans</option>
92
+ <option value="sq" <?php if($options=='sq'){echo "selected";}?>>Albanian</option>
93
+ <option value="ar" <?php if($options=='ar'){echo "selected";}?>>Arabic</option>
94
+ <option value="hy" <?php if($options=='hy'){echo "selected";}?>>Armenian</option>
95
+ <option value="az" <?php if($options=='az'){echo "selected";}?>>Azerbaijani</option>
96
+ <option value="eu" <?php if($options=='eu'){echo "selected";}?>>Basque</option>
97
+ <option value="be" <?php if($options=='be'){echo "selected";}?>>Belarusian</option>
98
+ <option value="bn" <?php if($options=='bn'){echo "selected";}?>>Bengali</option>
99
+ <option value="bs" <?php if($options=='bs'){echo "selected";}?>>Bosnian</option>
100
+ <option value="bg" <?php if($options=='bg'){echo "selected";}?>>Bulgarian</option>
101
+ <option value="ca" <?php if($options=='ca'){echo "selected";}?>>Catalan</option>
102
+ <option value="ceb" <?php if($options=='ceb'){echo "selected";}?>>Cebuano</option>
103
+ <option value="zh-CN" <?php if($options=='zh-CN'){echo "selected";}?>>Chinese</option>
104
+ <option value="zh-TW" <?php if($options=='zh-TW'){echo "selected";}?>>Chinese (Han)</option>
105
+ <option value="hr" <?php if($options=='hr'){echo "selected";}?>>Croatian</option>
106
+ <option value="cs" <?php if($options=='cs'){echo "selected";}?>>Czech</option>
107
+ <option value="da" <?php if($options=='da'){echo "selected";}?>>Danish</option>
108
+ <option value="nl" <?php if($options=='nl'){echo "selected";}?>>Dutch</option>
109
+ <option value="en" <?php if($options=='en'){echo "selected";}?>>English</option>
110
+ <option value="eo" <?php if($options=='eo'){echo "selected";}?>>Esperanto</option>
111
+ <option value="et" <?php if($options=='et'){echo "selected";}?>>Estonian</option>
112
+ <option value="tl" <?php if($options=='tl'){echo "selected";}?>>Filipino</option>
113
+ <option value="fi" <?php if($options=='fi'){echo "selected";}?>>Finnish</option>
114
+ <option value="fr" <?php if($options=='fr'){echo "selected";}?>>French</option>
115
+ <option value="gl" <?php if($options=='gl'){echo "selected";}?>>Galician</option>
116
+ <option value="ka" <?php if($options=='ka'){echo "selected";}?>>Georgian</option>
117
+ <option value="de" <?php if($options=='de'){echo "selected";}?>>German</option>
118
+ <option value="el" <?php if($options=='el'){echo "selected";}?>>Greek</option>
119
+ <option value="gu" <?php if($options=='gu'){echo "selected";}?>>Gujarati</option>
120
+ <option value="ht" <?php if($options=='ht'){echo "selected";}?>>Haitian</option>
121
+ <option value="iw" <?php if($options=='iw'){echo "selected";}?>>Hebrew</option>
122
+ <option value="hi" <?php if($options=='hi'){echo "selected";}?>>Hindi</option>
123
+ <option value="hmn" <?php if($options=='hmn'){echo "selected";}?>>Hmong</option>
124
+ <option value="hu" <?php if($options=='hu'){echo "selected";}?>>Hungarian</option>
125
+ <option value="is" <?php if($options=='is'){echo "selected";}?>>Icelandic</option>
126
+ <option value="id" <?php if($options=='id'){echo "selected";}?>>Indonesian</option>
127
+ <option value="ga" <?php if($options=='ga'){echo "selected";}?>>Irish</option>
128
+ <option value="it" <?php if($options=='it'){echo "selected";}?>>Italian</option>
129
+ <option value="ja" <?php if($options=='ja'){echo "selected";}?>>Japanese</option>
130
+ <option value="jw" <?php if($options=='jw'){echo "selected";}?>>Javanese</option>
131
+ <option value="kn" <?php if($options=='kn'){echo "selected";}?>>Kannada</option>
132
+ <option value="km" <?php if($options=='km'){echo "selected";}?>>Khmer</option>
133
+ <option value="ko" <?php if($options=='ko'){echo "selected";}?>>Korean</option>
134
+ <option value="lo" <?php if($options=='lo'){echo "selected";}?>>Lao</option>
135
+ <option value="la" <?php if($options=='la'){echo "selected";}?>>Latin</option>
136
+ <option value="lv" <?php if($options=='lv'){echo "selected";}?>>Latvian</option>
137
+ <option value="lt" <?php if($options=='lt'){echo "selected";}?>>Lithuanian</option>
138
+ <option value="mk" <?php if($options=='mk'){echo "selected";}?>>Macedonian</option>
139
+ <option value="ms" <?php if($options=='ms'){echo "selected";}?>>Malay</option>
140
+ <option value="mt" <?php if($options=='mt'){echo "selected";}?>>Maltese</option>
141
+ <option value="mr" <?php if($options=='mr'){echo "selected";}?>>Marathi</option>
142
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>Norwegian</option>
143
+ <option value="fa" <?php if($options=='fa'){echo "selected";}?>>Persian</option>
144
+ <option value="pl" <?php if($options=='pl'){echo "selected";}?>>Polish</option>
145
+ <option value="pt" <?php if($options=='pt'){echo "selected";}?>>Portuguese</option>
146
+ <option value="ro" <?php if($options=='ro'){echo "selected";}?>>Romanian</option>
147
+ <option value="ru" <?php if($options=='ru'){echo "selected";}?>>Russian</option>
148
+ <option value="sr" <?php if($options=='sr'){echo "selected";}?>>Serbian</option>
149
+ <option value="sk" <?php if($options=='sk'){echo "selected";}?>>Slovak</option>
150
+ <option value="sl" <?php if($options=='sl'){echo "selected";}?>>Slovenian</option>
151
+ <option value="es" <?php if($options=='es'){echo "selected";}?>>Spanish</option>
152
+ <option value="sw" <?php if($options=='sw'){echo "selected";}?>>Swahili</option>
153
+ <option value="sv" <?php if($options=='sv'){echo "selected";}?>>Swedish</option>
154
+ <option value="ta" <?php if($options=='ta'){echo "selected";}?>>Tamil</option>
155
+ <option value="te" <?php if($options=='te'){echo "selected";}?>>Telugu</option>
156
+ <option value="th" <?php if($options=='th'){echo "selected";}?>>Thai</option>
157
+ <option value="tr" <?php if($options=='tr'){echo "selected";}?>>Turkish</option>
158
+ <option value="uk" <?php if($options=='uk'){echo "selected";}?>>Ukranian</option>
159
+ <option value="ur" <?php if($options=='ur'){echo "selected";}?>>Urdu</option>
160
+ <option value="vi" <?php if($options=='vi'){echo "selected";}?>>Vietnamese</option>
161
+ <option value="cy" <?php if($options=='cy'){echo "selected";}?>>Welsh</option>
162
+ <option value="yi" <?php if($options=='yi'){echo "selected";}?>>Yiddish</option>
163
+ </select>
164
+ <?php
165
+
166
+ }
167
+
168
+ function googlelanguagetranslator_language_option_cb() {
169
+
170
+ $option_name = 'googlelanguagetranslator_language_option' ;
171
+ $new_value = 'all';
172
+
173
+ if ( get_option( $option_name ) === false ) {
174
+
175
+ // The option does not exist, so we update it.
176
+ update_option( $option_name, $new_value );
177
+ }
178
+
179
+ $options = get_option (''.$option_name.''); ?>
180
+
181
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
182
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
183
+ <?php }
184
+
185
+
186
+
187
+ function language_display_settings_cb() {
188
+ $defaults = array (
189
+ 'en' => 1
190
+ );
191
+
192
+ $option_name = 'language_display_settings' ;
193
+ $new_value = $defaults;
194
+
195
+ if ( get_option( $option_name ) === false ) {
196
+
197
+ // The option does not exist, so we update it.
198
+ update_option( $option_name, $new_value );
199
+ }
200
+
201
+ $get_language_choices = get_option (''.$option_name.'');
202
+
203
+ if (!isset ( $get_language_choices ['af'] ) ) {
204
+ $get_language_choices['af'] = 0;
205
+ }
206
+
207
+ if (!isset ( $get_language_choices ['sq'] ) ) {
208
+ $get_language_choices['sq'] = 0;
209
+ }
210
+
211
+ if (!isset ( $get_language_choices ['ar'] ) ) {
212
+ $get_language_choices['ar'] = 0;
213
+ }
214
+
215
+ if (!isset ( $get_language_choices ['hy'] ) ) {
216
+ $get_language_choices['hy'] = 0;
217
+ }
218
+
219
+ if (!isset ( $get_language_choices ['az'] ) ) {
220
+ $get_language_choices['az'] = 0;
221
+ }
222
+
223
+ if (!isset ( $get_language_choices ['eu'] ) ) {
224
+ $get_language_choices['eu'] = 0;
225
+ }
226
+
227
+ if (!isset ( $get_language_choices ['be'] ) ) {
228
+ $get_language_choices['be'] = 0;
229
+ }
230
+
231
+ if (!isset ( $get_language_choices ['bn'] ) ) {
232
+ $get_language_choices['bn'] = 0;
233
+ }
234
+
235
+ if (!isset ( $get_language_choices ['bs'] ) ) {
236
+ $get_language_choices['bs'] = 0;
237
+ }
238
+
239
+ if (!isset ( $get_language_choices ['bg'] ) ) {
240
+ $get_language_choices['bg'] = 0;
241
+ }
242
+
243
+ if (!isset ( $get_language_choices ['ca'] ) ) {
244
+ $get_language_choices['ca'] = 0;
245
+ }
246
+
247
+ if (!isset ( $get_language_choices ['ceb'] ) ) {
248
+ $get_language_choices['ceb'] = 0;
249
+ }
250
+
251
+ if (!isset ( $get_language_choices ['zh-CN'] ) ) {
252
+ $get_language_choices['zh-CN'] = 0;
253
+ }
254
+
255
+ if (!isset ( $get_language_choices ['zh-TW'] ) ) {
256
+ $get_language_choices['zh-TW'] = 0;
257
+ }
258
+
259
+ if (!isset ( $get_language_choices ['hr'] ) ) {
260
+ $get_language_choices['hr'] = 0;
261
+ }
262
+
263
+ if (!isset ( $get_language_choices ['cs'] ) ) {
264
+ $get_language_choices['cs'] = 0;
265
+ }
266
+
267
+ if (!isset ( $get_language_choices ['da'] ) ) {
268
+ $get_language_choices['da'] = 0;
269
+ }
270
+
271
+ if (!isset ( $get_language_choices ['nl'] ) ) {
272
+ $get_language_choices['nl'] = 0;
273
+ }
274
+
275
+ if (!isset ( $get_language_choices ['en'] ) ) {
276
+ $get_language_choices['en'] = 1;
277
+ }
278
+
279
+ if (!isset ( $get_language_choices ['eo'] ) ) {
280
+ $get_language_choices['eo'] = 0;
281
+ }
282
+
283
+ if (!isset ( $get_language_choices ['et'] ) ) {
284
+ $get_language_choices['et'] = 0;
285
+ }
286
+
287
+ if (!isset ( $get_language_choices ['tl'] ) ) {
288
+ $get_language_choices['tl'] = 0;
289
+ }
290
+
291
+ if (!isset ( $get_language_choices ['fi'] ) ) {
292
+ $get_language_choices['fi'] = 0;
293
+ }
294
+
295
+ if (!isset ( $get_language_choices ['fr'] ) ) {
296
+ $get_language_choices['fr'] = 0;
297
+ }
298
+
299
+ if (!isset ( $get_language_choices ['gl'] ) ) {
300
+ $get_language_choices['gl'] = 0;
301
+ }
302
+
303
+ if (!isset ( $get_language_choices ['ka'] ) ) {
304
+ $get_language_choices['ka'] = 0;
305
+ }
306
+
307
+ if (!isset ( $get_language_choices ['de'] ) ) {
308
+ $get_language_choices['de'] = 0;
309
+ }
310
+
311
+ if (!isset ( $get_language_choices ['el'] ) ) {
312
+ $get_language_choices['el'] = 0;
313
+ }
314
+
315
+ if (!isset ( $get_language_choices ['gu'] ) ) {
316
+ $get_language_choices['gu'] = 0;
317
+ }
318
+
319
+ if (!isset ( $get_language_choices ['ht'] ) ) {
320
+ $get_language_choices['ht'] = 0;
321
+ }
322
+
323
+ if (!isset ( $get_language_choices ['iw'] ) ) {
324
+ $get_language_choices['iw'] = 0;
325
+ }
326
+
327
+ if (!isset ( $get_language_choices ['hi'] ) ) {
328
+ $get_language_choices['hi'] = 0;
329
+ }
330
+
331
+ if (!isset ( $get_language_choices ['hmn'] ) ) {
332
+ $get_language_choices['hmn'] = 0;
333
+ }
334
+
335
+ if (!isset ( $get_language_choices ['hu'] ) ) {
336
+ $get_language_choices['hu'] = 0;
337
+ }
338
+
339
+ if (!isset ( $get_language_choices ['is'] ) ) {
340
+ $get_language_choices['is'] = 0;
341
+ }
342
+
343
+ if (!isset ( $get_language_choices ['id'] ) ) {
344
+ $get_language_choices['id'] = 0;
345
+ }
346
+
347
+ if (!isset ( $get_language_choices ['ga'] ) ) {
348
+ $get_language_choices['ga'] = 0;
349
+ }
350
+
351
+ if (!isset ( $get_language_choices ['it'] ) ) {
352
+ $get_language_choices['it'] = 0;
353
+ }
354
+
355
+ if (!isset ( $get_language_choices ['ja'] ) ) {
356
+ $get_language_choices['ja'] = 0;
357
+ }
358
+
359
+ if (!isset ( $get_language_choices ['jw'] ) ) {
360
+ $get_language_choices['jw'] = 0;
361
+ }
362
+
363
+ if (!isset ( $get_language_choices ['kn'] ) ) {
364
+ $get_language_choices['kn'] = 0;
365
+ }
366
+
367
+ if (!isset ( $get_language_choices ['km'] ) ) {
368
+ $get_language_choices['km'] = 0;
369
+ }
370
+
371
+ if (!isset ( $get_language_choices ['ko'] ) ) {
372
+ $get_language_choices['ko'] = 0;
373
+ }
374
+
375
+ if (!isset ( $get_language_choices ['lo'] ) ) {
376
+ $get_language_choices['lo'] = 0;
377
+ }
378
+
379
+ if (!isset ( $get_language_choices ['la'] ) ) {
380
+ $get_language_choices['la'] = 0;
381
+ }
382
+
383
+ if (!isset ( $get_language_choices ['lv'] ) ) {
384
+ $get_language_choices['lv'] = 0;
385
+ }
386
+
387
+ if (!isset ( $get_language_choices ['lt'] ) ) {
388
+ $get_language_choices['lt'] = 0;
389
+ }
390
+
391
+ if (!isset ( $get_language_choices ['mk'] ) ) {
392
+ $get_language_choices['mk'] = 0;
393
+ }
394
+
395
+ if (!isset ( $get_language_choices ['ms'] ) ) {
396
+ $get_language_choices['ms'] = 0;
397
+ }
398
+
399
+ if (!isset ( $get_language_choices ['mt'] ) ) {
400
+ $get_language_choices['mt'] = 0;
401
+ }
402
+
403
+ if (!isset ( $get_language_choices ['mr'] ) ) {
404
+ $get_language_choices['mr'] = 0;
405
+ }
406
+
407
+ if (!isset ( $get_language_choices ['no'] ) ) {
408
+ $get_language_choices['no'] = 0;
409
+ }
410
+
411
+ if (!isset ( $get_language_choices ['fa'] ) ) {
412
+ $get_language_choices['fa'] = 0;
413
+ }
414
+
415
+ if (!isset ( $get_language_choices ['pl'] ) ) {
416
+ $get_language_choices['pl'] = 0;
417
+ }
418
+
419
+ if (!isset ( $get_language_choices ['pt'] ) ) {
420
+ $get_language_choices['pt'] = 0;
421
+ }
422
+
423
+ if (!isset ( $get_language_choices ['ro'] ) ) {
424
+ $get_language_choices['ro'] = 0;
425
+ }
426
+
427
+ if (!isset ( $get_language_choices ['ru'] ) ) {
428
+ $get_language_choices['ru'] = 0;
429
+ }
430
+
431
+ if (!isset ( $get_language_choices ['sr'] ) ) {
432
+ $get_language_choices['sr'] = 0;
433
+ }
434
+
435
+ if (!isset ( $get_language_choices ['sk'] ) ) {
436
+ $get_language_choices['sk'] = 0;
437
+ }
438
+
439
+ if (!isset ( $get_language_choices ['sl'] ) ) {
440
+ $get_language_choices['sl'] = 0;
441
+ }
442
+
443
+ if (!isset ( $get_language_choices ['es'] ) ) {
444
+ $get_language_choices['es'] = 0;
445
+ }
446
+
447
+ if (!isset ( $get_language_choices ['sw'] ) ) {
448
+ $get_language_choices['sw'] = 0;
449
+ }
450
+
451
+ if (!isset ( $get_language_choices ['sv'] ) ) {
452
+ $get_language_choices['sv'] = 0;
453
+ }
454
+
455
+ if (!isset ( $get_language_choices ['ta'] ) ) {
456
+ $get_language_choices['ta'] = 0;
457
+ }
458
+
459
+ if (!isset ( $get_language_choices ['te'] ) ) {
460
+ $get_language_choices['te'] = 0;
461
+ }
462
+
463
+ if (!isset ( $get_language_choices ['th'] ) ) {
464
+ $get_language_choices['th'] = 0;
465
+ }
466
+
467
+ if (!isset ( $get_language_choices ['tr'] ) ) {
468
+ $get_language_choices['tr'] = 0;
469
+ }
470
+
471
+ if (!isset ( $get_language_choices ['uk'] ) ) {
472
+ $get_language_choices['uk'] = 0;
473
+ }
474
+
475
+ if (!isset ( $get_language_choices ['ur'] ) ) {
476
+ $get_language_choices['ur'] = 0;
477
+ }
478
+
479
+ if (!isset ( $get_language_choices ['vi'] ) ) {
480
+ $get_language_choices['vi'] = 0;
481
+ }
482
+
483
+ if (!isset ( $get_language_choices ['cy'] ) ) {
484
+ $get_language_choices['cy'] = 0;
485
+ }
486
+
487
+ if (!isset ( $get_language_choices ['yi'] ) ) {
488
+ $get_language_choices['yi'] = 0;
489
+ } ?>
490
+
491
+ <div class="languages" style="width:25%; float:left">
492
+ <div><input type="checkbox" name="language_display_settings[af]" value="1" <?php if ( 1 == $get_language_choices['af'] ) echo 'checked="checked"'; ?>/> Afrikaans</div>
493
+ <div><input type="checkbox" name="language_display_settings[sq]" value="1" <?php if ( 1 == $get_language_choices['sq'] ) echo 'checked="checked"'; ?>/> Albanian</div>
494
+ <div><input type="checkbox" name="language_display_settings[ar]" value="1" <?php if ( 1 == $get_language_choices['ar'] ) echo 'checked="checked"'; ?>/> Arabic</div>
495
+ <div><input type="checkbox" name="language_display_settings[hy]" value="1" <?php if ( 1 == $get_language_choices['hy'] ) echo 'checked="checked"'; ?>/> Armenian</div>
496
+ <div><input type="checkbox" name="language_display_settings[az]" value="1" <?php if ( 1 == $get_language_choices['az'] ) echo 'checked="checked"'; ?>/> Azerbaijani</div>
497
+ <div><input type="checkbox" name="language_display_settings[eu]" value="1" <?php if ( 1 == $get_language_choices['eu'] ) echo 'checked="checked"'; ?>/> Basque</div>
498
+ <div><input type="checkbox" name="language_display_settings[be]" value="1" <?php if ( 1 == $get_language_choices['be'] ) echo 'checked="checked"'; ?>/> Belarusian</div>
499
+ <div><input type="checkbox" name="language_display_settings[bn]" value="1" <?php if ( 1 == $get_language_choices['bn'] ) echo 'checked="checked"'; ?>/> Bengali</div>
500
+ <div><input type="checkbox" name="language_display_settings[bs]" value="1" <?php if ( 1 == $get_language_choices['bs'] ) echo 'checked="checked"'; ?>/> Bosnian</div>
501
+ <div><input type="checkbox" name="language_display_settings[bg]" value="1" <?php if ( 1 == $get_language_choices['bg'] ) echo 'checked="checked"'; ?>/> Bulgarian</div>
502
+ <div><input type="checkbox" name="language_display_settings[ca]" value="1" <?php if ( 1 == $get_language_choices['ca'] ) echo 'checked="checked"'; ?>/> Catalan</div>
503
+ <div><input type="checkbox" name="language_display_settings[ceb]" value="1" <?php if ( 1 == $get_language_choices['ceb'] ) echo 'checked="checked"'; ?>/> Cebuano</div>
504
+ <div><input type="checkbox" name="language_display_settings[zh-CN]" value="1" <?php if ( 1 == $get_language_choices['zh-CN'] ) echo 'checked="checked"'; ?>/> Chinese</div>
505
+ <div><input type="checkbox" name="language_display_settings[zh-TW]" value="1" <?php if ( 1 == $get_language_choices['zh-TW'] ) echo 'checked="checked"'; ?>/> Chinese (Han)</div>
506
+ <div><input type="checkbox" name="language_display_settings[hr]" value="1" <?php if ( 1 == $get_language_choices['hr'] ) echo 'checked="checked"'; ?>/> Croatian</div>
507
+ <div><input type="checkbox" name="language_display_settings[cs]" value="1" <?php if ( 1 == $get_language_choices['cs'] ) echo 'checked="checked"'; ?>/> Czech</div>
508
+ <div><input type="checkbox" name="language_display_settings[da]" value="1" <?php if ( 1 == $get_language_choices['da'] ) echo 'checked="checked"'; ?>/> Danish</div>
509
+ <div><input type="checkbox" name="language_display_settings[nl]" value="1" <?php if ( 1 == $get_language_choices['nl'] ) echo 'checked="checked"'; ?>/> Dutch</div>
510
+ <div><input type="checkbox" name="language_display_settings[en]" value="1" <?php if ( 1 == $get_language_choices['en'] ) echo 'checked="checked"'; ?>/> English</div>
511
+ </div>
512
+
513
+ <div class="languages" style="width:25%; float:left">
514
+ <div><input type="checkbox" name="language_display_settings[eo]" value="1" <?php if ( 1 == $get_language_choices['eo'] ) echo 'checked="checked"'; ?>/> Esperanto</div>
515
+ <div><input type="checkbox" name="language_display_settings[et]" value="1" <?php if ( 1 == $get_language_choices['et'] ) echo 'checked="checked"'; ?>/> Estonian</div>
516
+ <div><input type="checkbox" name="language_display_settings[tl]" value="1" <?php if ( 1 == $get_language_choices['tl'] ) echo 'checked="checked"'; ?>/> Filipino</div>
517
+ <div><input type="checkbox" name="language_display_settings[fi]" value="1" <?php if ( 1 == $get_language_choices['fi'] ) echo 'checked="checked"'; ?>/> Finnish</div>
518
+ <div><input type="checkbox" name="language_display_settings[fr]" value="1" <?php if ( 1 == $get_language_choices['fr'] ) echo 'checked="checked"'; ?>/> French</div>
519
+ <div><input type="checkbox" name="language_display_settings[gl]" value="1" <?php if ( 1 == $get_language_choices['gl'] ) echo 'checked="checked"'; ?>/> Galician</div>
520
+ <div><input type="checkbox" name="language_display_settings[ka]" value="1" <?php if ( 1 == $get_language_choices['ka'] ) echo 'checked="checked"'; ?>/> Georgian</div>
521
+ <div><input type="checkbox" name="language_display_settings[de]" value="1" <?php if ( 1 == $get_language_choices['de'] ) echo 'checked="checked"'; ?>/> German</div>
522
+ <div><input type="checkbox" name="language_display_settings[el]" value="1" <?php if ( 1 == $get_language_choices['el'] ) echo 'checked="checked"'; ?>/> Greek</div>
523
+ <div><input type="checkbox" name="language_display_settings[gu]" value="1" <?php if ( 1 == $get_language_choices['gu'] ) echo 'checked="checked"'; ?>/> Gujarati</div>
524
+ <div><input type="checkbox" name="language_display_settings[ht]" value="1" <?php if ( 1 == $get_language_choices['ht'] ) echo 'checked="checked"'; ?>/> Haitian</div>
525
+ <div><input type="checkbox" name="language_display_settings[iw]" value="1" <?php if ( 1 == $get_language_choices['iw'] ) echo 'checked="checked"'; ?>/> Hebrew</div>
526
+ <div><input type="checkbox" name="language_display_settings[hi]" value="1" <?php if ( 1 == $get_language_choices['hi'] ) echo 'checked="checked"'; ?>/> Hindi</div>
527
+ <div><input type="checkbox" name="language_display_settings[hmn]" value="1" <?php if ( 1 == $get_language_choices['hmn'] ) echo 'checked="checked"'; ?>/> Hmong</div>
528
+ <div><input type="checkbox" name="language_display_settings[hu]" value="1" <?php if ( 1 == $get_language_choices['hu'] ) echo 'checked="checked"'; ?>/> Hungarian</div>
529
+ <div><input type="checkbox" name="language_display_settings[is]" value="1" <?php if ( 1 == $get_language_choices['is'] ) echo 'checked="checked"'; ?>/> Icelandic</div>
530
+ <div><input type="checkbox" name="language_display_settings[id]" value="1" <?php if ( 1 == $get_language_choices['id'] ) echo 'checked="checked"'; ?>/> Indonesian</div>
531
+ <div><input type="checkbox" name="language_display_settings[ga]" value="1" <?php if ( 1 == $get_language_choices['ga'] ) echo 'checked="checked"'; ?>/> Irish</div>
532
+ <div><input type="checkbox" name="language_display_settings[it]" value="1" <?php if ( 1 == $get_language_choices['it'] ) echo 'checked="checked"'; ?>/> Italian</div>
533
+ </div>
534
+
535
+ <div class="languages" style="width:25%; float:left">
536
+ <div><input type="checkbox" name="language_display_settings[ja]" value="1" <?php if ( 1 == $get_language_choices['ja'] ) echo 'checked="checked"'; ?>/> Japanese</div>
537
+ <div><input type="checkbox" name="language_display_settings[jw]" value="1" <?php if ( 1 == $get_language_choices['jw'] ) echo 'checked="checked"'; ?>/> Javanese</div>
538
+ <div><input type="checkbox" name="language_display_settings[kn]" value="1" <?php if ( 1 == $get_language_choices['kn'] ) echo 'checked="checked"'; ?>/> Kannada</div>
539
+ <div><input type="checkbox" name="language_display_settings[km]" value="1" <?php if ( 1 == $get_language_choices['km'] ) echo 'checked="checked"'; ?>/> Khmer</div>
540
+ <div><input type="checkbox" name="language_display_settings[ko]" value="1" <?php if ( 1 == $get_language_choices['ko'] ) echo 'checked="checked"'; ?>/> Korean</div>
541
+ <div><input type="checkbox" name="language_display_settings[lo]" value="1" <?php if ( 1 == $get_language_choices['lo'] ) echo 'checked="checked"'; ?>/> Lao</div>
542
+ <div><input type="checkbox" name="language_display_settings[la]" value="1" <?php if ( 1 == $get_language_choices['la'] ) echo 'checked="checked"'; ?>/> Latin</div>
543
+ <div><input type="checkbox" name="language_display_settings[lv]" value="1" <?php if ( 1 == $get_language_choices['lv'] ) echo 'checked="checked"'; ?>/> Latvian</div>
544
+ <div><input type="checkbox" name="language_display_settings[lt]" value="1" <?php if ( 1 == $get_language_choices['lt'] ) echo 'checked="checked"'; ?>/> Lithuanian</div>
545
+ <div><input type="checkbox" name="language_display_settings[mk]" value="1" <?php if ( 1 == $get_language_choices['mk'] ) echo 'checked="checked"'; ?>/> Macedonian</div>
546
+ <div><input type="checkbox" name="language_display_settings[ms]" value="1" <?php if ( 1 == $get_language_choices['ms'] ) echo 'checked="checked"'; ?>/> Malay</div>
547
+ <div><input type="checkbox" name="language_display_settings[mt]" value="1" <?php if ( 1 == $get_language_choices['mt'] ) echo 'checked="checked"'; ?>/> Maltese</div>
548
+ <div><input type="checkbox" name="language_display_settings[mr]" value="1" <?php if ( 1 == $get_language_choices['mr'] ) echo 'checked="checked"'; ?>/> Marathi</div>
549
+ <div><input type="checkbox" name="language_display_settings[no]" value="1" <?php if ( 1 == $get_language_choices['no'] ) echo 'checked="checked"'; ?>/> Norwegian</div>
550
+ <div><input type="checkbox" name="language_display_settings[fa]" value="1" <?php if ( 1 == $get_language_choices['fa'] ) echo 'checked="checked"'; ?>/> Persian</div>
551
+ <div><input type="checkbox" name="language_display_settings[pl]" value="1" <?php if ( 1 == $get_language_choices['pl'] ) echo 'checked="checked"'; ?>/> Polish</div>
552
+ <div><input type="checkbox" name="language_display_settings[pt]" value="1" <?php if ( 1 == $get_language_choices['pt'] ) echo 'checked="checked"'; ?>/> Portuguese</div>
553
+ <div><input type="checkbox" name="language_display_settings[ro]" value="1" <?php if ( 1 == $get_language_choices['ro'] ) echo 'checked="checked"'; ?>/> Romanian</div>
554
+ <div><input type="checkbox" name="language_display_settings[ru]" value="1" <?php if ( 1 == $get_language_choices['ru'] ) echo 'checked="checked"'; ?>/> Russian</div>
555
+ </div>
556
+
557
+ <div class="languages" style="width:25%; float:left">
558
+ <div><input type="checkbox" name="language_display_settings[sr]" value="1" <?php if ( 1 == $get_language_choices['sr'] ) echo 'checked="checked"'; ?>/> Serbian</div>
559
+ <div><input type="checkbox" name="language_display_settings[sk]" value="1" <?php if ( 1 == $get_language_choices['sk'] ) echo 'checked="checked"'; ?>/> Slovak</div>
560
+ <div><input type="checkbox" name="language_display_settings[sl]" value="1" <?php if ( 1 == $get_language_choices['sl'] ) echo 'checked="checked"'; ?>/> Slovenian</div>
561
+ <div><input type="checkbox" name="language_display_settings[es]" value="1" <?php if ( 1 == $get_language_choices['es'] ) echo 'checked="checked"'; ?>/> Spanish</div>
562
+ <div><input type="checkbox" name="language_display_settings[sw]" value="1" <?php if ( 1 == $get_language_choices['sw'] ) echo 'checked="checked"'; ?>/> Swahili</div>
563
+ <div><input type="checkbox" name="language_display_settings[sv]" value="1" <?php if ( 1 == $get_language_choices['sv'] ) echo 'checked="checked"'; ?>/> Swedish</div>
564
+ <div><input type="checkbox" name="language_display_settings[ta]" value="1" <?php if ( 1 == $get_language_choices['ta'] ) echo 'checked="checked"'; ?>/> Tamil</div>
565
+ <div><input type="checkbox" name="language_display_settings[te]" value="1" <?php if ( 1 == $get_language_choices['te'] ) echo 'checked="checked"'; ?>/> Telugu</div>
566
+ <div><input type="checkbox" name="language_display_settings[th]" value="1" <?php if ( 1 == $get_language_choices['th'] ) echo 'checked="checked"'; ?>/> Thai</div>
567
+ <div><input type="checkbox" name="language_display_settings[tr]" value="1" <?php if ( 1 == $get_language_choices['tr'] ) echo 'checked="checked"'; ?>/> Turkish</div>
568
+ <div><input type="checkbox" name="language_display_settings[uk]" value="1" <?php if ( 1 == $get_language_choices['uk'] ) echo 'checked="checked"'; ?>/> Ukranian</div>
569
+ <div><input type="checkbox" name="language_display_settings[ur]" value="1" <?php if ( 1 == $get_language_choices['ur'] ) echo 'checked="checked"'; ?>/> Urdu</div>
570
+ <div><input type="checkbox" name="language_display_settings[vi]" value="1" <?php if ( 1 == $get_language_choices['vi'] ) echo 'checked="checked"'; ?>/> Vietnamese</div>
571
+ <div><input type="checkbox" name="language_display_settings[cy]" value="1" <?php if ( 1 == $get_language_choices['cy'] ) echo 'checked="checked"'; ?>/> Welsh</div>
572
+ <div><input type="checkbox" name="language_display_settings[yi]" value="1" <?php if ( 1 == $get_language_choices['yi'] ) echo 'checked="checked"'; ?>/> Yiddish</div>
573
+ </div>
574
+
575
+ <div style="clear:both"></div>
576
+ <?php }
577
+
578
+ function googlelanguagetranslator_flags_cb() {
579
+
580
+ $option_name = 'googlelanguagetranslator_flags' ;
581
+ $new_value = 'show_flags';
582
+
583
+ if ( get_option( $option_name ) === false ) {
584
+
585
+ // The option does not exist, so we update it.
586
+ update_option( $option_name, $new_value );
587
+ }
588
+
589
+ $options = get_option (''.$option_name.''); ?>
590
+
591
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
592
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
593
+ <?php }
594
+
595
+
596
+ function flag_display_settings_cb() {
597
+ $defaults = array(
598
+ 'flag-en' => 1
599
+ );
600
+
601
+ $option_name = 'flag_display_settings' ;
602
+ $new_value = $defaults;
603
+
604
+ if ( get_option( $option_name ) === false ) {
605
+
606
+ // The option does not exist, so we update it.
607
+ update_option( $option_name, $new_value );
608
+ }
609
+
610
+ $get_flag_choices = get_option (''.$option_name.'');
611
+
612
+ if (!isset ( $get_flag_choices ['flag-af'] ) ) {
613
+ $get_flag_choices['flag-af'] = 0;
614
+ }
615
+
616
+ if (!isset ( $get_flag_choices ['flag-sq'] ) ) {
617
+ $get_flag_choices['flag-sq'] = 0;
618
+ }
619
+
620
+ if (!isset ( $get_flag_choices ['flag-ar'] ) ) {
621
+ $get_flag_choices['flag-ar'] = 0;
622
+ }
623
+
624
+ if (!isset ( $get_flag_choices ['flag-hy'] ) ) {
625
+ $get_flag_choices['flag-hy'] = 0;
626
+ }
627
+
628
+ if (!isset ( $get_flag_choices ['flag-az'] ) ) {
629
+ $get_flag_choices['flag-az'] = 0;
630
+ }
631
+
632
+ if (!isset ( $get_flag_choices ['flag-eu'] ) ) {
633
+ $get_flag_choices['flag-eu'] = 0;
634
+ }
635
+
636
+ if (!isset ( $get_flag_choices ['flag-be'] ) ) {
637
+ $get_flag_choices['flag-be'] = 0;
638
+ }
639
+
640
+ if (!isset ( $get_flag_choices ['flag-bn'] ) ) {
641
+ $get_flag_choices['flag-bn'] = 0;
642
+ }
643
+
644
+ if (!isset ( $get_flag_choices ['flag-bs'] ) ) {
645
+ $get_flag_choices['flag-bs'] = 0;
646
+ }
647
+
648
+ if (!isset ( $get_flag_choices ['flag-bg'] ) ) {
649
+ $get_flag_choices['flag-bg'] = 0;
650
+ }
651
+
652
+ if (!isset ( $get_flag_choices ['flag-ca'] ) ) {
653
+ $get_flag_choices['flag-ca'] = 0;
654
+ }
655
+
656
+ if (!isset ( $get_flag_choices ['flag-ceb'] ) ) {
657
+ $get_flag_choices['flag-ceb'] = 0;
658
+ }
659
+
660
+ if (!isset ( $get_flag_choices ['flag-zh-CN'] ) ) {
661
+ $get_flag_choices['flag-zh-CN'] = 0;
662
+ }
663
+
664
+ if (!isset ( $get_flag_choices ['flag-zh-TW'] ) ) {
665
+ $get_flag_choices['flag-zh-TW'] = 0;
666
+ }
667
+
668
+ if (!isset ( $get_flag_choices ['flag-hr'] ) ) {
669
+ $get_flag_choices['flag-hr'] = 0;
670
+ }
671
+
672
+ if (!isset ( $get_flag_choices ['flag-cs'] ) ) {
673
+ $get_flag_choices['flag-cs'] = 0;
674
+ }
675
+
676
+ if (!isset ( $get_flag_choices ['flag-da'] ) ) {
677
+ $get_flag_choices['flag-da'] = 0;
678
+ }
679
+
680
+ if (!isset ( $get_flag_choices ['flag-nl'] ) ) {
681
+ $get_flag_choices['flag-nl'] = 0;
682
+ }
683
+
684
+ if (!isset ( $get_flag_choices ['flag-en'] ) ) {
685
+ $get_flag_choices['flag-en'] = 1;
686
+ }
687
+
688
+ if (!isset ( $get_flag_choices ['flag-eo'] ) ) {
689
+ $get_flag_choices['flag-eo'] = 0;
690
+ }
691
+
692
+ if (!isset ( $get_flag_choices ['flag-et'] ) ) {
693
+ $get_flag_choices['flag-et'] = 0;
694
+ }
695
+
696
+ if (!isset ( $get_flag_choices ['flag-tl'] ) ) {
697
+ $get_flag_choices['flag-tl'] = 0;
698
+ }
699
+
700
+ if (!isset ( $get_flag_choices ['flag-fi'] ) ) {
701
+ $get_flag_choices['flag-fi'] = 0;
702
+ }
703
+
704
+ if (!isset ( $get_flag_choices ['flag-fr'] ) ) {
705
+ $get_flag_choices['flag-fr'] = 0;
706
+ }
707
+
708
+ if (!isset ( $get_flag_choices ['flag-gl'] ) ) {
709
+ $get_flag_choices['flag-gl'] = 0;
710
+ }
711
+
712
+ if (!isset ( $get_flag_choices ['flag-ka'] ) ) {
713
+ $get_flag_choices['flag-ka'] = 0;
714
+ }
715
+
716
+ if (!isset ( $get_flag_choices ['flag-de'] ) ) {
717
+ $get_flag_choices['flag-de'] = 0;
718
+ }
719
+
720
+ if (!isset ( $get_flag_choices ['flag-el'] ) ) {
721
+ $get_flag_choices['flag-el'] = 0;
722
+ }
723
+
724
+ if (!isset ( $get_flag_choices ['flag-gu'] ) ) {
725
+ $get_flag_choices['flag-gu'] = 0;
726
+ }
727
+
728
+ if (!isset ( $get_flag_choices ['flag-ht'] ) ) {
729
+ $get_flag_choices['flag-ht'] = 0;
730
+ }
731
+
732
+ if (!isset ( $get_flag_choices ['flag-iw'] ) ) {
733
+ $get_flag_choices['flag-iw'] = 0;
734
+ }
735
+
736
+ if (!isset ( $get_flag_choices ['flag-hi'] ) ) {
737
+ $get_flag_choices['flag-hi'] = 0;
738
+ }
739
+
740
+ if (!isset ( $get_flag_choices ['flag-hmn'] ) ) {
741
+ $get_flag_choices['flag-hmn'] = 0;
742
+ }
743
+
744
+ if (!isset ( $get_flag_choices ['flag-hu'] ) ) {
745
+ $get_flag_choices['flag-hu'] = 0;
746
+ }
747
+
748
+ if (!isset ( $get_flag_choices ['flag-is'] ) ) {
749
+ $get_flag_choices['flag-is'] = 0;
750
+ }
751
+
752
+ if (!isset ( $get_flag_choices ['flag-id'] ) ) {
753
+ $get_flag_choices['flag-id'] = 0;
754
+ }
755
+
756
+ if (!isset ( $get_flag_choices ['flag-ga'] ) ) {
757
+ $get_flag_choices['flag-ga'] = 0;
758
+ }
759
+
760
+ if (!isset ( $get_flag_choices ['flag-it'] ) ) {
761
+ $get_flag_choices['flag-it'] = 0;
762
+ }
763
+
764
+ if (!isset ( $get_flag_choices ['flag-ja'] ) ) {
765
+ $get_flag_choices['flag-ja'] = 0;
766
+ }
767
+
768
+ if (!isset ( $get_flag_choices ['flag-jw'] ) ) {
769
+ $get_flag_choices['flag-jw'] = 0;
770
+ }
771
+
772
+ if (!isset ( $get_flag_choices ['flag-kn'] ) ) {
773
+ $get_flag_choices['flag-kn'] = 0;
774
+ }
775
+
776
+ if (!isset ( $get_flag_choices ['flag-km'] ) ) {
777
+ $get_flag_choices['flag-km'] = 0;
778
+ }
779
+
780
+ if (!isset ( $get_flag_choices ['flag-ko'] ) ) {
781
+ $get_flag_choices['flag-ko'] = 0;
782
+ }
783
+
784
+ if (!isset ( $get_flag_choices ['flag-lo'] ) ) {
785
+ $get_flag_choices['flag-lo'] = 0;
786
+ }
787
+
788
+ if (!isset ( $get_flag_choices ['flag-la'] ) ) {
789
+ $get_flag_choices['flag-la'] = 0;
790
+ }
791
+
792
+ if (!isset ( $get_flag_choices ['flag-lv'] ) ) {
793
+ $get_flag_choices['flag-lv'] = 0;
794
+ }
795
+
796
+ if (!isset ( $get_flag_choices ['flag-lt'] ) ) {
797
+ $get_flag_choices['flag-lt'] = 0;
798
+ }
799
+
800
+ if (!isset ( $get_flag_choices ['flag-mk'] ) ) {
801
+ $get_flag_choices['flag-mk'] = 0;
802
+ }
803
+
804
+ if (!isset ( $get_flag_choices ['flag-ms'] ) ) {
805
+ $get_flag_choices['flag-ms'] = 0;
806
+ }
807
+
808
+ if (!isset ( $get_flag_choices ['flag-mt'] ) ) {
809
+ $get_flag_choices['flag-mt'] = 0;
810
+ }
811
+
812
+ if (!isset ( $get_flag_choices ['flag-mr'] ) ) {
813
+ $get_flag_choices['flag-mr'] = 0;
814
+ }
815
+
816
+ if (!isset ( $get_flag_choices ['flag-no'] ) ) {
817
+ $get_flag_choices['flag-no'] = 0;
818
+ }
819
+
820
+ if (!isset ( $get_flag_choices ['flag-fa'] ) ) {
821
+ $get_flag_choices['flag-fa'] = 0;
822
+ }
823
+
824
+ if (!isset ( $get_flag_choices ['flag-pl'] ) ) {
825
+ $get_flag_choices['flag-pl'] = 0;
826
+ }
827
+
828
+ if (!isset ( $get_flag_choices ['flag-pt'] ) ) {
829
+ $get_flag_choices['flag-pt'] = 0;
830
+ }
831
+
832
+ if (!isset ( $get_flag_choices ['flag-ro'] ) ) {
833
+ $get_flag_choices['flag-ro'] = 0;
834
+ }
835
+
836
+ if (!isset ( $get_flag_choices ['flag-ru'] ) ) {
837
+ $get_flag_choices['flag-ru'] = 0;
838
+ }
839
+
840
+ if (!isset ( $get_flag_choices ['flag-sr'] ) ) {
841
+ $get_flag_choices['flag-sr'] = 0;
842
+ }
843
+
844
+ if (!isset ( $get_flag_choices ['flag-sk'] ) ) {
845
+ $get_flag_choices['flag-sk'] = 0;
846
+ }
847
+
848
+ if (!isset ( $get_flag_choices ['flag-sl'] ) ) {
849
+ $get_flag_choices['flag-sl'] = 0;
850
+ }
851
+
852
+ if (!isset ( $get_flag_choices ['flag-es'] ) ) {
853
+ $get_flag_choices['flag-es'] = 0;
854
+ }
855
+
856
+ if (!isset ( $get_flag_choices ['flag-sw'] ) ) {
857
+ $get_flag_choices['flag-sw'] = 0;
858
+ }
859
+
860
+ if (!isset ( $get_flag_choices ['flag-sv'] ) ) {
861
+ $get_flag_choices['flag-sv'] = 0;
862
+ }
863
+
864
+ if (!isset ( $get_flag_choices ['flag-ta'] ) ) {
865
+ $get_flag_choices['flag-ta'] = 0;
866
+ }
867
+
868
+ if (!isset ( $get_flag_choices ['flag-te'] ) ) {
869
+ $get_flag_choices['flag-te'] = 0;
870
+ }
871
+
872
+ if (!isset ( $get_flag_choices ['flag-th'] ) ) {
873
+ $get_flag_choices['flag-th'] = 0;
874
+ }
875
+
876
+ if (!isset ( $get_flag_choices ['flag-tr'] ) ) {
877
+ $get_flag_choices['flag-tr'] = 0;
878
+ }
879
+
880
+ if (!isset ( $get_flag_choices ['flag-uk'] ) ) {
881
+ $get_flag_choices['flag-uk'] = 0;
882
+ }
883
+
884
+ if (!isset ( $get_flag_choices ['flag-ur'] ) ) {
885
+ $get_flag_choices['flag-ur'] = 0;
886
+ }
887
+
888
+ if (!isset ( $get_flag_choices ['flag-vi'] ) ) {
889
+ $get_flag_choices['flag-vi'] = 0;
890
+ }
891
+
892
+ if (!isset ( $get_flag_choices ['flag-cy'] ) ) {
893
+ $get_flag_choices['flag-cy'] = 0;
894
+ }
895
+
896
+ if (!isset ( $get_flag_choices ['flag-yi'] ) ) {
897
+ $get_flag_choices['flag-yi'] = 0;
898
+ }
899
+
900
+ ?>
901
+ <div class="flagdisplay" style="width:25%; float:left">
902
+ <div><input type="checkbox" name="flag_display_settings[flag-af]" value="1" <?php checked( 1,$get_flag_choices['flag-af']); ?>/> Afrikaans</div>
903
+ <div><input type="checkbox" name="flag_display_settings[flag-sq]" value="1" <?php checked( 1,$get_flag_choices['flag-sq']); ?>/> Albanian</div>
904
+ <div><input type="checkbox" name="flag_display_settings[flag-ar]" value="1" <?php checked( 1,$get_flag_choices['flag-ar']); ?>/> Arabic</div>
905
+ <div><input type="checkbox" name="flag_display_settings[flag-hy]" value="1" <?php checked( 1,$get_flag_choices['flag-hy']); ?>/> Armenian</div>
906
+ <div><input type="checkbox" name="flag_display_settings[flag-az]" value="1" <?php checked( 1,$get_flag_choices['flag-az']); ?>/> Azerbaijani</div>
907
+ <div><input type="checkbox" name="flag_display_settings[flag-eu]" value="1" <?php checked( 1,$get_flag_choices['flag-eu']); ?>/> Basque</div>
908
+ <div><input type="checkbox" name="flag_display_settings[flag-be]" value="1" <?php checked( 1,$get_flag_choices['flag-be']); ?>/> Belarusian</div>
909
+ <div><input type="checkbox" name="flag_display_settings[flag-bn]" value="1" <?php checked( 1,$get_flag_choices['flag-bn']); ?>/> Bengali</div>
910
+ <div><input type="checkbox" name="flag_display_settings[flag-bs]" value="1" <?php checked( 1,$get_flag_choices['flag-bs']); ?>/> Bosnian</div>
911
+ <div><input type="checkbox" name="flag_display_settings[flag-bg]" value="1" <?php checked( 1,$get_flag_choices['flag-bg']); ?>/> Bulgarian</div>
912
+ <div><input type="checkbox" name="flag_display_settings[flag-ca]" value="1" <?php checked( 1,$get_flag_choices['flag-ca']); ?>/> Catalan</div>
913
+ <div><input type="checkbox" name="flag_display_settings[flag-ceb]" value="1" <?php checked( 1,$get_flag_choices['flag-ceb']); ?>/> Cebuano</div>
914
+ <div><input type="checkbox" name="flag_display_settings[flag-zh-CN]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-CN']); ?>/> Chinese</div>
915
+ <div><input type="checkbox" name="flag_display_settings[flag-zh-TW]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-TW']); ?>/> Chinese (Han)</div>
916
+ <div><input type="checkbox" name="flag_display_settings[flag-hr]" value="1" <?php checked( 1,$get_flag_choices['flag-hr']); ?>/> Croatian</div>
917
+ <div><input type="checkbox" name="flag_display_settings[flag-cs]" value="1" <?php checked( 1,$get_flag_choices['flag-cs']); ?>/> Czech</div>
918
+ <div><input type="checkbox" name="flag_display_settings[flag-da]" value="1" <?php checked( 1,$get_flag_choices['flag-da']); ?>/> Danish</div>
919
+ <div><input type="checkbox" name="flag_display_settings[flag-nl]" value="1" <?php checked( 1,$get_flag_choices['flag-nl']); ?>/> Dutch</div>
920
+ <div><input type="checkbox" name="flag_display_settings[flag-en]" value="1" <?php checked(1,$get_flag_choices['flag-en']); ?>/> English</div>
921
+ </div>
922
+
923
+ <div class="flagdisplay" style="width:25%; float:left">
924
+ <div><input type="checkbox" name="flag_display_settings[flag-eo]" value="1" <?php checked( 1,$get_flag_choices['flag-eo']); ?>/> Esperanto</div>
925
+ <div><input type="checkbox" name="flag_display_settings[flag-et]" value="1" <?php checked( 1,$get_flag_choices['flag-et']); ?>/> Estonian</div>
926
+ <div><input type="checkbox" name="flag_display_settings[flag-tl]" value="1" <?php checked( 1,$get_flag_choices['flag-tl']); ?>/> Filipino</div>
927
+ <div><input type="checkbox" name="flag_display_settings[flag-fi]" value="1" <?php checked( 1,$get_flag_choices['flag-fi']); ?>/> Finnish</div>
928
+ <div><input type="checkbox" name="flag_display_settings[flag-fr]" value="1" <?php checked( 1,$get_flag_choices['flag-fr']); ?>/> French</div>
929
+ <div><input type="checkbox" name="flag_display_settings[flag-gl]" value="1" <?php checked( 1,$get_flag_choices['flag-gl']); ?>/> Galician</div>
930
+ <div><input type="checkbox" name="flag_display_settings[flag-ka]" value="1" <?php checked( 1,$get_flag_choices['flag-ka']); ?>/> Georgian</div>
931
+ <div><input type="checkbox" name="flag_display_settings[flag-de]" value="1" <?php checked( 1,$get_flag_choices['flag-de']); ?>/> German</div>
932
+ <div><input type="checkbox" name="flag_display_settings[flag-el]" value="1" <?php checked( 1,$get_flag_choices['flag-el']); ?>/> Greek</div>
933
+ <div><input type="checkbox" name="flag_display_settings[flag-gu]" value="1" <?php checked( 1,$get_flag_choices['flag-gu']); ?>/> Gujarati</div>
934
+ <div><input type="checkbox" name="flag_display_settings[flag-ht]" value="1" <?php checked( 1,$get_flag_choices['flag-ht']); ?>/> Haitian</div>
935
+ <div><input type="checkbox" name="flag_display_settings[flag-iw]" value="1" <?php checked( 1,$get_flag_choices['flag-iw']); ?>/> Hebrew</div>
936
+ <div><input type="checkbox" name="flag_display_settings[flag-hi]" value="1" <?php checked( 1,$get_flag_choices['flag-hi']); ?>/> Hindi</div>
937
+ <div><input type="checkbox" name="flag_display_settings[flag-hmn]" value="1" <?php checked( 1,$get_flag_choices['flag-hmn']); ?>/> Hmong</div>
938
+ <div><input type="checkbox" name="flag_display_settings[flag-hu]" value="1" <?php checked( 1,$get_flag_choices['flag-hu']); ?>/> Hungarian</div>
939
+ <div><input type="checkbox" name="flag_display_settings[flag-is]" value="1" <?php checked( 1,$get_flag_choices['flag-is']); ?>/> Icelandic</div>
940
+ <div><input type="checkbox" name="flag_display_settings[flag-id]" value="1" <?php checked( 1,$get_flag_choices['flag-id']); ?>/> Indonesian</div>
941
+ <div><input type="checkbox" name="flag_display_settings[flag-ga]" value="1" <?php checked( 1,$get_flag_choices['flag-ga']); ?>/> Irish</div>
942
+ <div><input type="checkbox" name="flag_display_settings[flag-it]" value="1" <?php checked( 1,$get_flag_choices['flag-it']); ?>/> Italian</div>
943
+ </div>
944
+
945
+ <div class="flagdisplay" style="width:25%; float:left">
946
+ <div><input type="checkbox" name="flag_display_settings[flag-ja]" value="1" <?php checked( 1,$get_flag_choices['flag-ja']); ?>/> Japanese</div>
947
+ <div><input type="checkbox" name="flag_display_settings[flag-jw]" value="1" <?php checked( 1,$get_flag_choices['flag-jw']); ?>/> Javanese</div>
948
+ <div><input type="checkbox" name="flag_display_settings[flag-kn]" value="1" <?php checked( 1,$get_flag_choices['flag-kn']); ?>/> Kannada</div>
949
+ <div><input type="checkbox" name="flag_display_settings[flag-km]" value="1" <?php checked( 1,$get_flag_choices['flag-km']); ?>/> Khmer</div>
950
+ <div><input type="checkbox" name="flag_display_settings[flag-ko]" value="1" <?php checked( 1,$get_flag_choices['flag-ko']); ?>/> Korean</div>
951
+ <div><input type="checkbox" name="flag_display_settings[flag-lo]" value="1" <?php checked( 1,$get_flag_choices['flag-lo']); ?>/> Lao</div>
952
+ <div><input type="checkbox" name="flag_display_settings[flag-la]" value="1" <?php checked( 1,$get_flag_choices['flag-la']); ?>/> Latin</div>
953
+ <div><input type="checkbox" name="flag_display_settings[flag-lv]" value="1" <?php checked( 1,$get_flag_choices['flag-lv']); ?>/> Latvian</div>
954
+ <div><input type="checkbox" name="flag_display_settings[flag-lt]" value="1" <?php checked( 1,$get_flag_choices['flag-lt']); ?>/> Lithuanian</div>
955
+ <div><input type="checkbox" name="flag_display_settings[flag-mk]" value="1" <?php checked( 1,$get_flag_choices['flag-mk']); ?>/> Macedonian</div>
956
+ <div><input type="checkbox" name="flag_display_settings[flag-ms]" value="1" <?php checked( 1,$get_flag_choices['flag-ms']); ?>/> Malay</div>
957
+ <div><input type="checkbox" name="flag_display_settings[flag-mt]" value="1" <?php checked( 1,$get_flag_choices['flag-mt']); ?>/> Maltese</div>
958
+ <div><input type="checkbox" name="flag_display_settings[flag-mr]" value="1" <?php checked( 1,$get_flag_choices['flag-mr']); ?>/> Marathi</div>
959
+ <div><input type="checkbox" name="flag_display_settings[flag-no]" value="1" <?php checked( 1,$get_flag_choices['flag-no']); ?>/> Norwegian</div>
960
+ <div><input type="checkbox" name="flag_display_settings[flag-fa]" value="1" <?php checked( 1,$get_flag_choices['flag-fa']); ?>/> Persian</div>
961
+ <div><input type="checkbox" name="flag_display_settings[flag-pl]" value="1" <?php checked( 1,$get_flag_choices['flag-pl']); ?>/> Polish</div>
962
+ <div><input type="checkbox" name="flag_display_settings[flag-pt]" value="1" <?php checked( 1,$get_flag_choices['flag-pt']); ?>/> Portuguese</div>
963
+ <div><input type="checkbox" name="flag_display_settings[flag-ro]" value="1" <?php checked( 1,$get_flag_choices['flag-ro']); ?>/> Romanian</div>
964
+ <div><input type="checkbox" name="flag_display_settings[flag-ru]" value="1" <?php checked( 1,$get_flag_choices['flag-ru']); ?>/> Russian</div>
965
+ </div>
966
+
967
+ <div class="flagdisplay" style="width:25%; float:left">
968
+ <div><input type="checkbox" name="flag_display_settings[flag-sr]" value="1" <?php checked( 1,$get_flag_choices['flag-sr']); ?>/> Serbian</div>
969
+ <div><input type="checkbox" name="flag_display_settings[flag-sk]" value="1" <?php checked( 1,$get_flag_choices['flag-sk']); ?>/> Slovak</div>
970
+ <div><input type="checkbox" name="flag_display_settings[flag-sl]" value="1" <?php checked( 1,$get_flag_choices['flag-sl']); ?>/> Slovenian</div>
971
+ <div><input type="checkbox" name="flag_display_settings[flag-es]" value="1" <?php checked( 1,$get_flag_choices['flag-es']); ?>/> Spanish</div>
972
+ <div><input type="checkbox" name="flag_display_settings[flag-sw]" value="1" <?php checked( 1,$get_flag_choices['flag-sw']); ?>/> Swahili</div>
973
+ <div><input type="checkbox" name="flag_display_settings[flag-sv]" value="1" <?php checked( 1,$get_flag_choices['flag-sv']); ?>/> Swedish</div>
974
+ <div><input type="checkbox" name="flag_display_settings[flag-ta]" value="1" <?php checked( 1,$get_flag_choices['flag-ta']); ?>/> Tamil</div>
975
+ <div><input type="checkbox" name="flag_display_settings[flag-te]" value="1" <?php checked( 1,$get_flag_choices['flag-te']); ?>/> Telugu</div>
976
+ <div><input type="checkbox" name="flag_display_settings[flag-th]" value="1" <?php checked( 1,$get_flag_choices['flag-th']); ?>/> Thai</div>
977
+ <div><input type="checkbox" name="flag_display_settings[flag-tr]" value="1" <?php checked( 1,$get_flag_choices['flag-tr']); ?>/> Turkish</div>
978
+ <div><input type="checkbox" name="flag_display_settings[flag-uk]" value="1" <?php checked( 1,$get_flag_choices['flag-uk']); ?>/> Ukranian</div>
979
+ <div><input type="checkbox" name="flag_display_settings[flag-ur]" value="1" <?php checked( 1,$get_flag_choices['flag-ur']); ?>/> Urdu</div>
980
+ <div><input type="checkbox" name="flag_display_settings[flag-vi]" value="1" <?php checked( 1,$get_flag_choices['flag-vi']); ?>/> Vietnamese</div>
981
+ <div><input type="checkbox" name="flag_display_settings[flag-cy]" value="1" <?php checked( 1,$get_flag_choices['flag-cy']); ?>/> Welsh</div>
982
+ <div><input type="checkbox" name="flag_display_settings[flag-yi]" value="1" <?php checked( 1,$get_flag_choices['flag-yi']); ?>/> Yiddish</div>
983
+ </div>
984
+ <div style="clear:both"></div>
985
+ <?php }
986
+
987
+ function googlelanguagetranslator_translatebox_cb() {
988
+
989
+ $option_name = 'googlelanguagetranslator_translatebox' ;
990
+ $new_value = 'yes';
991
+
992
+ if ( get_option( $option_name ) === false ) {
993
+
994
+ // The option does not exist, so we update it.
995
+ update_option( $option_name, $new_value );
996
+ }
997
+
998
+ $options = get_option (''.$option_name.''); ?>
999
+
1000
+ <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
1001
+ <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
1002
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
1003
+ </select>
1004
+ <?php }
1005
+
1006
+ function googlelanguagetranslator_display_cb() {
1007
+
1008
+ $option_name = 'googlelanguagetranslator_display' ;
1009
+ $new_value = 'Vertical';
1010
+
1011
+ if ( get_option( $option_name ) === false ) {
1012
+
1013
+ // The option does not exist, so we update it.
1014
+ update_option( $option_name, $new_value );
1015
+ }
1016
+
1017
+ $options = get_option (''.$option_name.''); ?>
1018
+
1019
+ <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
1020
+ <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
1021
+ <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
1022
+
1023
+ </select>
1024
+ <?php }
1025
+
1026
+ function googlelanguagetranslator_toolbar_cb() {
1027
+
1028
+ $option_name = 'googlelanguagetranslator_toolbar' ;
1029
+ $new_value = 'Yes';
1030
+
1031
+ if ( get_option( $option_name ) === false ) {
1032
+
1033
+ // The option does not exist, so we update it.
1034
+ update_option( $option_name, $new_value );
1035
+ }
1036
+
1037
+ $options = get_option (''.$option_name.''); ?>
1038
+
1039
+ <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
1040
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
1041
+ <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
1042
+ </select>
1043
+ <?php }
1044
+
1045
+ function googlelanguagetranslator_showbranding_cb() {
1046
+
1047
+ $option_name = 'googlelanguagetranslator_showbranding' ;
1048
+ $new_value = 'Yes';
1049
+
1050
+ if ( get_option( $option_name ) === false ) {
1051
+
1052
+ // The option does not exist, so we update it.
1053
+ update_option( $option_name, $new_value );
1054
+ }
1055
+
1056
+ $options = get_option (''.$option_name.''); ?>
1057
+
1058
+ <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
1059
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
1060
+ <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
1061
+ </select>
1062
+ <?php }
1063
+
1064
+ function googlelanguagetranslator_flags_alignment_cb() {
1065
+
1066
+ $option_name = 'googlelanguagetranslator_flags_alignment' ;
1067
+ $new_value = 'flags_left';
1068
+
1069
+ if ( get_option( $option_name ) === false ) {
1070
+
1071
+ // The option does not exist, so we update it.
1072
+ update_option( $option_name, 'flags_left' );
1073
+ }
1074
+
1075
+ $options = get_option (''.$option_name.''); ?>
1076
+
1077
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_left" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
1078
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_right" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
1079
+ <?php }
1080
+
1081
+
1082
+ function googlelanguagetranslator_analytics_cb() {
1083
+
1084
+ $option_name = 'googlelanguagetranslator_analytics' ;
1085
+ $new_value = 0;
1086
+
1087
+ if ( get_option( $option_name ) === false ) {
1088
+
1089
+ // The option does not exist, so we update it.
1090
+ update_option( $option_name, $new_value );
1091
+ }
1092
+
1093
+ $options = get_option (''.$option_name.'');
1094
+
1095
+ $html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Analytics tracking?';
1096
+ echo $html;
1097
+ }
1098
+
1099
+ function googlelanguagetranslator_analytics_id_cb() {
1100
+
1101
+ $option_name = 'googlelanguagetranslator_analytics_id' ;
1102
+ $new_value = '';
1103
+
1104
+ if ( get_option( $option_name ) === false ) {
1105
+
1106
+ // The option does not exist, so we update it.
1107
+ update_option( $option_name, $new_value );
1108
+ }
1109
+
1110
+ $options = get_option (''.$option_name.'');
1111
+
1112
+ $html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
1113
+ echo $html;
1114
+ }
1115
+
1116
+ function googlelanguagetranslator_css_cb() {
1117
+
1118
+ $option_name = 'googlelanguagetranslator_css' ;
1119
+ $new_value = '';
1120
+
1121
+ if ( get_option( $option_name ) === false ) {
1122
+
1123
+ // The option does not exist, so we update it.
1124
+ update_option( $option_name, $new_value );
1125
+ }
1126
+
1127
+ $options = get_option (''.$option_name.'');
1128
+
1129
+ $html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
1130
+ echo $html;
1131
+ }
1132
+
1133
+ function googlelanguagetranslator_manage_translations_cb() {
1134
+ $option_name = 'googlelanguagetranslator_manage_translations' ;
1135
+ $new_value = 0;
1136
+
1137
+ if ( get_option( $option_name ) === false ) {
1138
+
1139
+ // The option does not exist, so we update it.
1140
+ update_option( $option_name, $new_value );
1141
+ }
1142
+
1143
+ $options = get_option (''.$option_name.'');
1144
+
1145
+ $html = '<input type="checkbox" name="googlelanguagetranslator_manage_translations" id="googlelanguagetranslator_manage_translations" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on translation management?';
1146
+ echo $html;
1147
+ }
1148
+
1149
+ function googlelanguagetranslator_multilanguage_cb() {
1150
+
1151
+ $option_name = 'googlelanguagetranslator_multilanguage' ;
1152
+ $new_value = 0;
1153
+
1154
+ if ( get_option( $option_name ) === false ) {
1155
+
1156
+ // The option does not exist, so we update it.
1157
+ update_option( $option_name, $new_value );
1158
+ }
1159
+
1160
+ $options = get_option (''.$option_name.'');
1161
+
1162
+ $html = '<input type="checkbox" name="googlelanguagetranslator_multilanguage" id="googlelanguagetranslator_multilanguage" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on multilanguage mode?';
1163
+ echo $html;
1164
+ }
1165
+
1166
+
1167
+
1168
+
1169
+ } //End initialize_settings()
1170
+ add_action('admin_init', 'initialize_settings');
1171
+ ?>
google-language-translator.php CHANGED
@@ -1,1425 +1,80 @@
1
- <?php
2
- /*
3
- Plugin Name: Google Language Translator
4
- Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 3.0.3
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/
9
- */
10
-
11
- register_activation_hook( __FILE__, 'glt_activate' );
12
-
13
- include( plugin_dir_path( __FILE__ ) . 'glt_activate.php');
14
-
15
- include( plugin_dir_path( __FILE__ ) . 'glt_scripts.php');
16
-
17
- include( plugin_dir_path( __FILE__ ) . 'glt_widget.php');
18
-
19
- include( plugin_dir_path( __FILE__ ) . 'glt_horizontal.php');
20
-
21
- include( plugin_dir_path( __FILE__ ) . 'glt_vertical.php');
22
-
23
- function load_css() {
24
- include( plugin_dir_path( __FILE__ ) . 'glt_css.php');
25
- }
26
- add_action('wp_head','load_css');
27
- add_action('admin_head','load_css');
28
-
29
- function google_translator_shortcode() {
30
- if (get_option('googlelanguagetranslator_display')=='Vertical'){
31
- return googlelanguagetranslator_vertical();
32
- }
33
-
34
- elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
35
- return googlelanguagetranslator_horizontal();
36
- }
37
-
38
- }
39
-
40
- add_shortcode( 'google-translator', 'google_translator_shortcode');
41
-
42
- add_filter('widget_text', 'do_shortcode');
43
-
44
- function page_layout_cb() { ?>
45
- <div class="wrap">
46
- <div id="icon-options-general" class="icon32"></div>
47
- <h2><span class="notranslate">Google Language Translator</span></h2>
48
- <form action="<?php echo admin_url('options.php'); ?>" method="post">
49
- <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
50
- <div class="postbox" style="width: 100%">
51
- <h3 class="notranslate">Settings</h3>
52
-
53
- <?php settings_fields('google_language_translator'); ?>
54
- <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
55
- <tr>
56
- <td style="width:60%" class="notranslate">Plugin Status:</td>
57
- <td class="notranslate"><?php googlelanguagetranslator_active_cb(); ?></td>
58
- </tr>
59
-
60
- <tr class="notranslate">
61
- <td>Choose the original language of your website</td>
62
- <td><?php googlelanguagetranslator_language_cb(); ?></td>
63
- </tr>
64
-
65
- <tr class="notranslate">
66
- <td>What translation languages will you display to website visitors?<br/>(Note: To show flags you must choose "All Languages")</td>
67
- <td><?php googlelanguagetranslator_language_option_cb(); ?></td>
68
- </tr>
69
-
70
- <tr class="notranslate">
71
- <td colspan="2"><?php language_display_settings_cb(); ?></td>
72
- </tr>
73
-
74
- <tr class="notranslate">
75
- <td class="choose_flags_intro">Show flag images?<br/>(Display up to 72 flags above the translator)</td>
76
- <td class="choose_flags_intro"><?php googlelanguagetranslator_flags_cb(); ?></td>
77
- </tr>
78
-
79
- <tr class="notranslate">
80
- <td class="choose_flags">Choose the flags you want to display:</td>
81
- <td></td>
82
- </tr>
83
-
84
- <tr class="notranslate">
85
- <td colspan="2" class="choose_flags"><?php flag_display_settings_cb(); ?></td>
86
- </tr>
87
-
88
- <tr class="notranslate">
89
- <td>Show translate box?</td>
90
- <td><?php googlelanguagetranslator_translatebox_cb(); ?></td>
91
- </tr>
92
-
93
- <tr class="notranslate">
94
- <td>Layout options:</td>
95
- <td><?php googlelanguagetranslator_display_cb(); ?></td>
96
- </tr>
97
-
98
- <tr class="notranslate">
99
- <td>Show Google Toolbar?</td>
100
- <td><?php googlelanguagetranslator_toolbar_cb(); ?></td>
101
- </tr>
102
-
103
- <tr class="notranslate">
104
- <td>Show Google Branding?<br/>
105
- <span>(<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a> about Google's Attribution Requirements.)</span>
106
- </td>
107
- <td><?php googlelanguagetranslator_showbranding_cb(); ?></td>
108
- </tr>
109
-
110
- <tr class="alignment notranslate">
111
- <td class="flagdisplay">Align the translator left or right?</td>
112
- <td class="flagdisplay"><?php googlelanguagetranslator_flags_alignment_cb(); ?></td>
113
- </tr>
114
-
115
- <tr class="manage_translations notranslate">
116
- <td>Turn on translation management?<br/>(Managed directly through your Google account. Requires <a href="http://translate.google.com/manager/website/settings" target="_blank">Google Translate</a> meta tag installed in header.)</td>
117
- <td><?php googlelanguagetranslator_manage_translations_cb(); ?></td>
118
- </tr>
119
-
120
- <tr class="multilanguage notranslate">
121
- <td>Multilanguage Page Option?: (<em>not recommended)</em><br/>(If checked, a "forced" translation of your webpage will be served when returned to the default language, instead of delivering original content.)</td>
122
- <td><?php googlelanguagetranslator_multilanguage_cb(); ?></td>
123
- </tr>
124
-
125
- <tr class="notranslate">
126
- <td>Google Analytics:</td>
127
- <td><?php googlelanguagetranslator_analytics_cb(); ?></td>
128
- </tr>
129
-
130
- <tr class="analytics notranslate">
131
- <td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
132
- <td><?php googlelanguagetranslator_analytics_id_cb(); ?></td>
133
- </tr>
134
-
135
- <tr class="notranslate">
136
- <td>Copy/Paste this shortcode if adding to pages/posts:</td>
137
- <td>[google-translator]</td>
138
- </tr>
139
- </table>
140
-
141
- <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
142
- <tr class="notranslate">
143
- <td>Copy/Paste this code if adding to header/footer:</td>
144
- <td>&lt?php echo do_shortcode('[google-translator]'); ?&gt</td>
145
- </tr>
146
-
147
- <tr class="notranslate">
148
- <td><?php submit_button(); ?></td>
149
- <td></td>
150
- </tr>
151
- </table>
152
-
153
- </div> <!-- .postbox -->
154
- </div> <!-- .metbox-holder -->
155
-
156
- <div class="metabox-holder" style="float:right; clear:right; width:33%">
157
- <div class="postbox">
158
- <h3 class="notranslate">Preview</h3>
159
- <table style="width:100%">
160
- <tr>
161
- <td style="height:80px; box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span> &nbsp; <span>Hello</span></p></td>
162
- </tr>
163
- </table>
164
- </div> <!-- .postbox -->
165
- </div> <!-- .metabox-holder -->
166
-
167
-
168
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
169
- <div class="postbox">
170
- <h3>Add CSS Styles</h3>
171
- <div class="inside">
172
- <p>You can apply any necessary CSS styles below:</p>
173
- <?php googlelanguagetranslator_css_cb(); ?>
174
- </div>
175
- </div>
176
- </div>
177
- </form>
178
-
179
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
180
- <div class="postbox">
181
- <h3>GLT Premium is Here! $12</h3>
182
- <div class="inside"><a href="http://www.wp-studio.net/" target="_blank"><img style="background:#444; border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px" src="<?php echo plugins_url('google-language-translator/images/logo.png'); ?>"></a><br />
183
- <ul id="features">
184
- <li>Get more design and functionality options</li>
185
- <li>Loads directly with page content, not afterward</li>
186
- <li>jQuery-powered "Elegant" theme to engage your visitors</li>
187
- <li>Manage your website's translations</li>
188
- <li>Show or hide any features you want</li>
189
- <li>Full access to our support forum</li>
190
- <li>Full access to future updates, for life of the plugin</li>
191
- </ul>
192
- </div>
193
- </div>
194
- </div>
195
-
196
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
197
- <div class="postbox">
198
- <h3>Please Consider A Donation</h3>
199
- <div class="inside">If you like this plugin and find it useful, help keep this plugin actively developed by clicking the donate button <br /><br />
200
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
201
- <input type="hidden" name="cmd" value="_donations">
202
- <input type="hidden" name="business" value="robertmyrick@hotmail.com">
203
- <input type="hidden" name="lc" value="US">
204
- <input type="hidden" name="item_name" value="Support Studio 88 Design and help us bring you more Wordpress goodies! Any donation is kindly appreciated. Thank you!">
205
- <input type="hidden" name="no_note" value="0">
206
- <input type="hidden" name="currency_code" value="USD">
207
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
208
- <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
209
- <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
210
- </form>
211
-
212
- <br />
213
- <br />
214
- </div>
215
- </div>
216
- </div>
217
- </div> <!-- .wrap -->
218
- <?php
219
- }
220
-
221
-
222
- /* ------------------------------------------------------------------------ *
223
- * Setting Registration
224
- * ------------------------------------------------------------------------ */
225
-
226
-
227
- function initialize_settings() {
228
-
229
- // First, we register a section. This is necessary since all future options must belong to one.
230
- add_settings_section(
231
- 'glt_settings', // ID used to identify this section and with which to register options
232
- 'Settings', // Title to be displayed on the administration page
233
- '', // Callback used to render the description of the section
234
- 'google_language_translator' // Page on which to add this section of options
235
- );
236
-
237
-
238
-
239
-
240
-
241
- //Fieldset 1
242
- add_settings_field( 'googlelanguagetranslator_active','Plugin status:','googlelanguagetranslator_active_cb','google_language_translator','glt_settings');
243
- add_settings_field( 'googlelanguagetranslator_language','Choose the original language of your website','','googlelanguagetranslator_language_cb','glt_settings');
244
- add_settings_field( 'googlelanguagetranslator_language_option','What translation languages will you display to website visitors?','googlelanguagetranslator_language_option_cb','google_language_translator','glt_settings');
245
- add_settings_field( 'language_display_settings','Your language choices','language_display_settings_cb','google_language_translator','glt_settings');
246
- add_settings_field( 'googlelanguagetranslator_flags','Show Flag Images?','googlelanguagetranslator_flags_cb','google_language_translator','glt_settings');
247
- add_settings_field( 'flag_display_settings','Flag Options','flag_display_settings_cb','google_language_translator','glt_settings');
248
- add_settings_field( 'googlelanguagetranslator_translatebox','Show Translate Box?','googlelanguagetranslator_translatebox_cb','google_language_translator','glt_settings');
249
- add_settings_field( 'googlelanguagetranslator_display', 'Layout Options','googlelanguagetranslator_display_cb','google_language_translator','glt_settings');
250
- add_settings_field( 'googlelanguagetranslator_toolbar', 'Show Toolbar','googlelanguagetranslator_toolbar_cb','google_language_translator','glt_settings');
251
- add_settings_field( 'googlelanguagetranslator_showbranding', 'Show Google Branding','googlelanguagetranslator_showbranding_cb','google_language_translator','glt_settings');
252
- add_settings_field( 'googlelanguagetranslator_flags_alignment', 'Align Flags Right or Left', 'googlelanguagetranslator_flags_alignment_cb','google_language_translator','glt_settings');
253
- add_settings_field( 'googlelanguagetranslator_analytics','Activate Google Analytics tracking?','googlelanguagetranslator_analytics_cb','google_language_translator','glt_settings');
254
- add_settings_field( 'googlelanguagetranslator_analytics_id','Enter your Google Analytics ID','googlelanguagetranslator_analytics_id_cb','google_language_translator','glt_settings');
255
- add_settings_field( 'googlelanguagetranslator_css','Custom CSS Overrides','googlelanguagetranslator_css_cb','google_language_translator','glt_settings');
256
- add_settings_field( 'googlelanguagetranslator_manage_translations','Turn on translation management?','googlelanguagetranslator_manage_translations_cb','google_language_translator','glt_settings');
257
- add_settings_field( 'googlelanguagetranslator_multilanguage','Multilanguage webpages?','googlelanguagetranslator_multilanguage_cb','google_language_translator','glt_settings');
258
-
259
-
260
-
261
- //Register Fieldset 1
262
- register_setting( 'google_language_translator','googlelanguagetranslator_active');
263
- register_setting( 'google_language_translator','googlelanguagetranslator_language');
264
- register_setting( 'google_language_translator','googlelanguagetranslator_language_option');
265
- register_setting( 'google_language_translator','language_display_settings');
266
- register_setting( 'google_language_translator','googlelanguagetranslator_flags');
267
- register_setting( 'google_language_translator','flag_display_settings');
268
- register_setting( 'google_language_translator','googlelanguagetranslator_translatebox');
269
- register_setting( 'google_language_translator','googlelanguagetranslator_display');
270
- register_setting( 'google_language_translator','googlelanguagetranslator_toolbar');
271
- register_setting( 'google_language_translator','googlelanguagetranslator_showbranding');
272
- register_setting( 'google_language_translator','googlelanguagetranslator_flags_alignment');
273
- register_setting( 'google_language_translator','googlelanguagetranslator_disable_mootools');
274
- register_setting( 'google_language_translator','googlelanguagetranslator_disable_modal');
275
- register_setting( 'google_language_translator','googlelanguagetranslator_analytics');
276
- register_setting( 'google_language_translator','googlelanguagetranslator_analytics_id');
277
- register_setting( 'google_language_translator','googlelanguagetranslator_css');
278
- register_setting( 'google_language_translator','googlelanguagetranslator_manage_translations');
279
- register_setting( 'google_language_translator','googlelanguagetranslator_multilanguage');
280
-
281
- function googlelanguagetranslator_active_cb() {
282
-
283
- $option_name = 'googlelanguagetranslator_active' ;
284
- $new_value = 1;
285
-
286
- if ( get_option( $option_name ) === false ) {
287
-
288
- // The option does not exist, so we update it.
289
- update_option( $option_name, $new_value );
290
- }
291
-
292
- $options = get_option (''.$option_name.'');
293
-
294
- $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Language Translator?';
295
- echo $html;
296
- }
297
-
298
- function googlelanguagetranslator_language_cb() {
299
-
300
- $option_name = 'googlelanguagetranslator_language';
301
- $new_value = 'en';
302
-
303
- if ( get_option( $option_name ) === false ) {
304
-
305
- // The option does not exist, so we update it.
306
- update_option( $option_name, $new_value );
307
- }
308
-
309
- $options = get_option (''.$option_name.''); ?>
310
- <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
311
- <option value="af" <?php if($options=='af'){echo "selected";}?>>Afrikaans</option>
312
- <option value="sq" <?php if($options=='sq'){echo "selected";}?>>Albanian</option>
313
- <option value="ar" <?php if($options=='ar'){echo "selected";}?>>Arabic</option>
314
- <option value="hy" <?php if($options=='hy'){echo "selected";}?>>Armenian</option>
315
- <option value="az" <?php if($options=='az'){echo "selected";}?>>Azerbaijani</option>
316
- <option value="eu" <?php if($options=='eu'){echo "selected";}?>>Basque</option>
317
- <option value="be" <?php if($options=='be'){echo "selected";}?>>Belarusian</option>
318
- <option value="bn" <?php if($options=='bn'){echo "selected";}?>>Bengali</option>
319
- <option value="bs" <?php if($options=='bs'){echo "selected";}?>>Bosnian</option>
320
- <option value="bg" <?php if($options=='bg'){echo "selected";}?>>Bulgarian</option>
321
- <option value="ca" <?php if($options=='ca'){echo "selected";}?>>Catalan</option>
322
- <option value="ceb" <?php if($options=='ceb'){echo "selected";}?>>Cebuano</option>
323
- <option value="zh-CN" <?php if($options=='zh-CN'){echo "selected";}?>>Chinese</option>
324
- <option value="zh-TW" <?php if($options=='zh-TW'){echo "selected";}?>>Chinese (Han)</option>
325
- <option value="hr" <?php if($options=='hr'){echo "selected";}?>>Croatian</option>
326
- <option value="cs" <?php if($options=='cs'){echo "selected";}?>>Czech</option>
327
- <option value="da" <?php if($options=='da'){echo "selected";}?>>Danish</option>
328
- <option value="nl" <?php if($options=='nl'){echo "selected";}?>>Dutch</option>
329
- <option value="en" <?php if($options=='en'){echo "selected";}?>>English</option>
330
- <option value="eo" <?php if($options=='eo'){echo "selected";}?>>Esperanto</option>
331
- <option value="et" <?php if($options=='et'){echo "selected";}?>>Estonian</option>
332
- <option value="tl" <?php if($options=='tl'){echo "selected";}?>>Filipino</option>
333
- <option value="fi" <?php if($options=='fi'){echo "selected";}?>>Finnish</option>
334
- <option value="fr" <?php if($options=='fr'){echo "selected";}?>>French</option>
335
- <option value="gl" <?php if($options=='gl'){echo "selected";}?>>Galician</option>
336
- <option value="ka" <?php if($options=='ka'){echo "selected";}?>>Georgian</option>
337
- <option value="de" <?php if($options=='de'){echo "selected";}?>>German</option>
338
- <option value="el" <?php if($options=='el'){echo "selected";}?>>Greek</option>
339
- <option value="gu" <?php if($options=='gu'){echo "selected";}?>>Gujarati</option>
340
- <option value="ht" <?php if($options=='ht'){echo "selected";}?>>Haitian</option>
341
- <option value="iw" <?php if($options=='iw'){echo "selected";}?>>Hebrew</option>
342
- <option value="hi" <?php if($options=='hi'){echo "selected";}?>>Hindi</option>
343
- <option value="hmn" <?php if($options=='hmn'){echo "selected";}?>>Hmong</option>
344
- <option value="hu" <?php if($options=='hu'){echo "selected";}?>>Hungarian</option>
345
- <option value="is" <?php if($options=='is'){echo "selected";}?>>Icelandic</option>
346
- <option value="id" <?php if($options=='id'){echo "selected";}?>>Indonesian</option>
347
- <option value="ga" <?php if($options=='ga'){echo "selected";}?>>Irish</option>
348
- <option value="it" <?php if($options=='it'){echo "selected";}?>>Italian</option>
349
- <option value="ja" <?php if($options=='ja'){echo "selected";}?>>Japanese</option>
350
- <option value="jw" <?php if($options=='jw'){echo "selected";}?>>Javanese</option>
351
- <option value="kn" <?php if($options=='kn'){echo "selected";}?>>Kannada</option>
352
- <option value="km" <?php if($options=='km'){echo "selected";}?>>Khmer</option>
353
- <option value="ko" <?php if($options=='ko'){echo "selected";}?>>Korean</option>
354
- <option value="lo" <?php if($options=='lo'){echo "selected";}?>>Lao</option>
355
- <option value="la" <?php if($options=='la'){echo "selected";}?>>Latin</option>
356
- <option value="lv" <?php if($options=='lv'){echo "selected";}?>>Latvian</option>
357
- <option value="lt" <?php if($options=='lt'){echo "selected";}?>>Lithuanian</option>
358
- <option value="mk" <?php if($options=='mk'){echo "selected";}?>>Macedonian</option>
359
- <option value="ms" <?php if($options=='ms'){echo "selected";}?>>Malay</option>
360
- <option value="mt" <?php if($options=='mt'){echo "selected";}?>>Maltese</option>
361
- <option value="mr" <?php if($options=='mr'){echo "selected";}?>>Marathi</option>
362
- <option value="no" <?php if($options=='no'){echo "selected";}?>>Norwegian</option>
363
- <option value="fa" <?php if($options=='fa'){echo "selected";}?>>Persian</option>
364
- <option value="pl" <?php if($options=='pl'){echo "selected";}?>>Polish</option>
365
- <option value="pt" <?php if($options=='pt'){echo "selected";}?>>Portuguese</option>
366
- <option value="ro" <?php if($options=='ro'){echo "selected";}?>>Romanian</option>
367
- <option value="ru" <?php if($options=='ru'){echo "selected";}?>>Russian</option>
368
- <option value="sr" <?php if($options=='sr'){echo "selected";}?>>Serbian</option>
369
- <option value="sk" <?php if($options=='sk'){echo "selected";}?>>Slovak</option>
370
- <option value="sl" <?php if($options=='sl'){echo "selected";}?>>Slovenian</option>
371
- <option value="es" <?php if($options=='es'){echo "selected";}?>>Spanish</option>
372
- <option value="sw" <?php if($options=='sw'){echo "selected";}?>>Swahili</option>
373
- <option value="sv" <?php if($options=='sv'){echo "selected";}?>>Swedish</option>
374
- <option value="ta" <?php if($options=='ta'){echo "selected";}?>>Tamil</option>
375
- <option value="te" <?php if($options=='te'){echo "selected";}?>>Telugu</option>
376
- <option value="th" <?php if($options=='th'){echo "selected";}?>>Thai</option>
377
- <option value="tr" <?php if($options=='tr'){echo "selected";}?>>Turkish</option>
378
- <option value="uk" <?php if($options=='uk'){echo "selected";}?>>Ukranian</option>
379
- <option value="ur" <?php if($options=='ur'){echo "selected";}?>>Urdu</option>
380
- <option value="vi" <?php if($options=='vi'){echo "selected";}?>>Vietnamese</option>
381
- <option value="cy" <?php if($options=='cy'){echo "selected";}?>>Welsh</option>
382
- <option value="yi" <?php if($options=='yi'){echo "selected";}?>>Yiddish</option>
383
- </select>
384
- <?php
385
-
386
- }
387
-
388
- function googlelanguagetranslator_language_option_cb() {
389
-
390
- $option_name = 'googlelanguagetranslator_language_option' ;
391
- $new_value = 'all';
392
-
393
- if ( get_option( $option_name ) === false ) {
394
-
395
- // The option does not exist, so we update it.
396
- update_option( $option_name, $new_value );
397
- }
398
-
399
- $options = get_option (''.$option_name.''); ?>
400
-
401
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
402
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
403
- <?php }
404
-
405
-
406
-
407
- function language_display_settings_cb() {
408
- $defaults = array (
409
- 'en' => 1
410
- );
411
-
412
- $option_name = 'language_display_settings' ;
413
- $new_value = $defaults;
414
-
415
- if ( get_option( $option_name ) === false ) {
416
-
417
- // The option does not exist, so we update it.
418
- update_option( $option_name, $new_value );
419
- }
420
-
421
- $get_language_choices = get_option (''.$option_name.'');
422
-
423
- if (!isset ( $get_language_choices ['af'] ) ) {
424
- $get_language_choices['af'] = 0;
425
- }
426
-
427
- if (!isset ( $get_language_choices ['sq'] ) ) {
428
- $get_language_choices['sq'] = 0;
429
- }
430
-
431
- if (!isset ( $get_language_choices ['ar'] ) ) {
432
- $get_language_choices['ar'] = 0;
433
- }
434
-
435
- if (!isset ( $get_language_choices ['hy'] ) ) {
436
- $get_language_choices['hy'] = 0;
437
- }
438
-
439
- if (!isset ( $get_language_choices ['az'] ) ) {
440
- $get_language_choices['az'] = 0;
441
- }
442
-
443
- if (!isset ( $get_language_choices ['eu'] ) ) {
444
- $get_language_choices['eu'] = 0;
445
- }
446
-
447
- if (!isset ( $get_language_choices ['be'] ) ) {
448
- $get_language_choices['be'] = 0;
449
- }
450
-
451
- if (!isset ( $get_language_choices ['bn'] ) ) {
452
- $get_language_choices['bn'] = 0;
453
- }
454
-
455
- if (!isset ( $get_language_choices ['bs'] ) ) {
456
- $get_language_choices['bs'] = 0;
457
- }
458
-
459
- if (!isset ( $get_language_choices ['bg'] ) ) {
460
- $get_language_choices['bg'] = 0;
461
- }
462
-
463
- if (!isset ( $get_language_choices ['ca'] ) ) {
464
- $get_language_choices['ca'] = 0;
465
- }
466
-
467
- if (!isset ( $get_language_choices ['ceb'] ) ) {
468
- $get_language_choices['ceb'] = 0;
469
- }
470
-
471
- if (!isset ( $get_language_choices ['zh-CN'] ) ) {
472
- $get_language_choices['zh-CN'] = 0;
473
- }
474
-
475
- if (!isset ( $get_language_choices ['zh-TW'] ) ) {
476
- $get_language_choices['zh-TW'] = 0;
477
- }
478
-
479
- if (!isset ( $get_language_choices ['hr'] ) ) {
480
- $get_language_choices['hr'] = 0;
481
- }
482
-
483
- if (!isset ( $get_language_choices ['cs'] ) ) {
484
- $get_language_choices['cs'] = 0;
485
- }
486
-
487
- if (!isset ( $get_language_choices ['da'] ) ) {
488
- $get_language_choices['da'] = 0;
489
- }
490
-
491
- if (!isset ( $get_language_choices ['nl'] ) ) {
492
- $get_language_choices['nl'] = 0;
493
- }
494
-
495
- if (!isset ( $get_language_choices ['en'] ) ) {
496
- $get_language_choices['en'] = 1;
497
- }
498
-
499
- if (!isset ( $get_language_choices ['eo'] ) ) {
500
- $get_language_choices['eo'] = 0;
501
- }
502
-
503
- if (!isset ( $get_language_choices ['et'] ) ) {
504
- $get_language_choices['et'] = 0;
505
- }
506
-
507
- if (!isset ( $get_language_choices ['tl'] ) ) {
508
- $get_language_choices['tl'] = 0;
509
- }
510
-
511
- if (!isset ( $get_language_choices ['fi'] ) ) {
512
- $get_language_choices['fi'] = 0;
513
- }
514
-
515
- if (!isset ( $get_language_choices ['fr'] ) ) {
516
- $get_language_choices['fr'] = 0;
517
- }
518
-
519
- if (!isset ( $get_language_choices ['gl'] ) ) {
520
- $get_language_choices['gl'] = 0;
521
- }
522
-
523
- if (!isset ( $get_language_choices ['ka'] ) ) {
524
- $get_language_choices['ka'] = 0;
525
- }
526
-
527
- if (!isset ( $get_language_choices ['de'] ) ) {
528
- $get_language_choices['de'] = 0;
529
- }
530
-
531
- if (!isset ( $get_language_choices ['el'] ) ) {
532
- $get_language_choices['el'] = 0;
533
- }
534
-
535
- if (!isset ( $get_language_choices ['gu'] ) ) {
536
- $get_language_choices['gu'] = 0;
537
- }
538
-
539
- if (!isset ( $get_language_choices ['ht'] ) ) {
540
- $get_language_choices['ht'] = 0;
541
- }
542
-
543
- if (!isset ( $get_language_choices ['iw'] ) ) {
544
- $get_language_choices['iw'] = 0;
545
- }
546
-
547
- if (!isset ( $get_language_choices ['hi'] ) ) {
548
- $get_language_choices['hi'] = 0;
549
- }
550
-
551
- if (!isset ( $get_language_choices ['hmn'] ) ) {
552
- $get_language_choices['hmn'] = 0;
553
- }
554
-
555
- if (!isset ( $get_language_choices ['hu'] ) ) {
556
- $get_language_choices['hu'] = 0;
557
- }
558
-
559
- if (!isset ( $get_language_choices ['is'] ) ) {
560
- $get_language_choices['is'] = 0;
561
- }
562
-
563
- if (!isset ( $get_language_choices ['id'] ) ) {
564
- $get_language_choices['id'] = 0;
565
- }
566
-
567
- if (!isset ( $get_language_choices ['ga'] ) ) {
568
- $get_language_choices['ga'] = 0;
569
- }
570
-
571
- if (!isset ( $get_language_choices ['it'] ) ) {
572
- $get_language_choices['it'] = 0;
573
- }
574
-
575
- if (!isset ( $get_language_choices ['ja'] ) ) {
576
- $get_language_choices['ja'] = 0;
577
- }
578
-
579
- if (!isset ( $get_language_choices ['jw'] ) ) {
580
- $get_language_choices['jw'] = 0;
581
- }
582
-
583
- if (!isset ( $get_language_choices ['kn'] ) ) {
584
- $get_language_choices['kn'] = 0;
585
- }
586
-
587
- if (!isset ( $get_language_choices ['km'] ) ) {
588
- $get_language_choices['km'] = 0;
589
- }
590
-
591
- if (!isset ( $get_language_choices ['ko'] ) ) {
592
- $get_language_choices['ko'] = 0;
593
- }
594
-
595
- if (!isset ( $get_language_choices ['lo'] ) ) {
596
- $get_language_choices['lo'] = 0;
597
- }
598
-
599
- if (!isset ( $get_language_choices ['la'] ) ) {
600
- $get_language_choices['la'] = 0;
601
- }
602
-
603
- if (!isset ( $get_language_choices ['lv'] ) ) {
604
- $get_language_choices['lv'] = 0;
605
- }
606
-
607
- if (!isset ( $get_language_choices ['lt'] ) ) {
608
- $get_language_choices['lt'] = 0;
609
- }
610
-
611
- if (!isset ( $get_language_choices ['mk'] ) ) {
612
- $get_language_choices['mk'] = 0;
613
- }
614
-
615
- if (!isset ( $get_language_choices ['ms'] ) ) {
616
- $get_language_choices['ms'] = 0;
617
- }
618
-
619
- if (!isset ( $get_language_choices ['mt'] ) ) {
620
- $get_language_choices['mt'] = 0;
621
- }
622
-
623
- if (!isset ( $get_language_choices ['mr'] ) ) {
624
- $get_language_choices['mr'] = 0;
625
- }
626
-
627
- if (!isset ( $get_language_choices ['no'] ) ) {
628
- $get_language_choices['no'] = 0;
629
- }
630
-
631
- if (!isset ( $get_language_choices ['fa'] ) ) {
632
- $get_language_choices['fa'] = 0;
633
- }
634
-
635
- if (!isset ( $get_language_choices ['pl'] ) ) {
636
- $get_language_choices['pl'] = 0;
637
- }
638
-
639
- if (!isset ( $get_language_choices ['pt'] ) ) {
640
- $get_language_choices['pt'] = 0;
641
- }
642
-
643
- if (!isset ( $get_language_choices ['ro'] ) ) {
644
- $get_language_choices['ro'] = 0;
645
- }
646
-
647
- if (!isset ( $get_language_choices ['ru'] ) ) {
648
- $get_language_choices['ru'] = 0;
649
- }
650
-
651
- if (!isset ( $get_language_choices ['sr'] ) ) {
652
- $get_language_choices['sr'] = 0;
653
- }
654
-
655
- if (!isset ( $get_language_choices ['sk'] ) ) {
656
- $get_language_choices['sk'] = 0;
657
- }
658
-
659
- if (!isset ( $get_language_choices ['sl'] ) ) {
660
- $get_language_choices['sl'] = 0;
661
- }
662
-
663
- if (!isset ( $get_language_choices ['es'] ) ) {
664
- $get_language_choices['es'] = 0;
665
- }
666
-
667
- if (!isset ( $get_language_choices ['sw'] ) ) {
668
- $get_language_choices['sw'] = 0;
669
- }
670
-
671
- if (!isset ( $get_language_choices ['sv'] ) ) {
672
- $get_language_choices['sv'] = 0;
673
- }
674
-
675
- if (!isset ( $get_language_choices ['ta'] ) ) {
676
- $get_language_choices['ta'] = 0;
677
- }
678
-
679
- if (!isset ( $get_language_choices ['te'] ) ) {
680
- $get_language_choices['te'] = 0;
681
- }
682
-
683
- if (!isset ( $get_language_choices ['th'] ) ) {
684
- $get_language_choices['th'] = 0;
685
- }
686
-
687
- if (!isset ( $get_language_choices ['tr'] ) ) {
688
- $get_language_choices['tr'] = 0;
689
- }
690
-
691
- if (!isset ( $get_language_choices ['uk'] ) ) {
692
- $get_language_choices['uk'] = 0;
693
- }
694
-
695
- if (!isset ( $get_language_choices ['ur'] ) ) {
696
- $get_language_choices['ur'] = 0;
697
- }
698
-
699
- if (!isset ( $get_language_choices ['vi'] ) ) {
700
- $get_language_choices['vi'] = 0;
701
- }
702
-
703
- if (!isset ( $get_language_choices ['cy'] ) ) {
704
- $get_language_choices['cy'] = 0;
705
- }
706
-
707
- if (!isset ( $get_language_choices ['yi'] ) ) {
708
- $get_language_choices['yi'] = 0;
709
- } ?>
710
-
711
- <div class="languages" style="width:25%; float:left">
712
- <div><input type="checkbox" name="language_display_settings[af]" value="1" <?php if ( 1 == $get_language_choices['af'] ) echo 'checked="checked"'; ?>/> Afrikaans</div>
713
- <div><input type="checkbox" name="language_display_settings[sq]" value="1" <?php if ( 1 == $get_language_choices['sq'] ) echo 'checked="checked"'; ?>/> Albanian</div>
714
- <div><input type="checkbox" name="language_display_settings[ar]" value="1" <?php if ( 1 == $get_language_choices['ar'] ) echo 'checked="checked"'; ?>/> Arabic</div>
715
- <div><input type="checkbox" name="language_display_settings[hy]" value="1" <?php if ( 1 == $get_language_choices['hy'] ) echo 'checked="checked"'; ?>/> Armenian</div>
716
- <div><input type="checkbox" name="language_display_settings[az]" value="1" <?php if ( 1 == $get_language_choices['az'] ) echo 'checked="checked"'; ?>/> Azerbaijani</div>
717
- <div><input type="checkbox" name="language_display_settings[eu]" value="1" <?php if ( 1 == $get_language_choices['eu'] ) echo 'checked="checked"'; ?>/> Basque</div>
718
- <div><input type="checkbox" name="language_display_settings[be]" value="1" <?php if ( 1 == $get_language_choices['be'] ) echo 'checked="checked"'; ?>/> Belarusian</div>
719
- <div><input type="checkbox" name="language_display_settings[bn]" value="1" <?php if ( 1 == $get_language_choices['bn'] ) echo 'checked="checked"'; ?>/> Bengali</div>
720
- <div><input type="checkbox" name="language_display_settings[bs]" value="1" <?php if ( 1 == $get_language_choices['bs'] ) echo 'checked="checked"'; ?>/> Bosnian</div>
721
- <div><input type="checkbox" name="language_display_settings[bg]" value="1" <?php if ( 1 == $get_language_choices['bg'] ) echo 'checked="checked"'; ?>/> Bulgarian</div>
722
- <div><input type="checkbox" name="language_display_settings[ca]" value="1" <?php if ( 1 == $get_language_choices['ca'] ) echo 'checked="checked"'; ?>/> Catalan</div>
723
- <div><input type="checkbox" name="language_display_settings[ceb]" value="1" <?php if ( 1 == $get_language_choices['ceb'] ) echo 'checked="checked"'; ?>/> Cebuano</div>
724
- <div><input type="checkbox" name="language_display_settings[zh-CN]" value="1" <?php if ( 1 == $get_language_choices['zh-CN'] ) echo 'checked="checked"'; ?>/> Chinese</div>
725
- <div><input type="checkbox" name="language_display_settings[zh-TW]" value="1" <?php if ( 1 == $get_language_choices['zh-TW'] ) echo 'checked="checked"'; ?>/> Chinese (Han)</div>
726
- <div><input type="checkbox" name="language_display_settings[hr]" value="1" <?php if ( 1 == $get_language_choices['hr'] ) echo 'checked="checked"'; ?>/> Croatian</div>
727
- <div><input type="checkbox" name="language_display_settings[cs]" value="1" <?php if ( 1 == $get_language_choices['cs'] ) echo 'checked="checked"'; ?>/> Czech</div>
728
- <div><input type="checkbox" name="language_display_settings[da]" value="1" <?php if ( 1 == $get_language_choices['da'] ) echo 'checked="checked"'; ?>/> Danish</div>
729
- <div><input type="checkbox" name="language_display_settings[nl]" value="1" <?php if ( 1 == $get_language_choices['nl'] ) echo 'checked="checked"'; ?>/> Dutch</div>
730
- <div><input type="checkbox" name="language_display_settings[en]" value="1" <?php if ( 1 == $get_language_choices['en'] ) echo 'checked="checked"'; ?>/> English</div>
731
- </div>
732
-
733
- <div class="languages" style="width:25%; float:left">
734
- <div><input type="checkbox" name="language_display_settings[eo]" value="1" <?php if ( 1 == $get_language_choices['eo'] ) echo 'checked="checked"'; ?>/> Esperanto</div>
735
- <div><input type="checkbox" name="language_display_settings[et]" value="1" <?php if ( 1 == $get_language_choices['et'] ) echo 'checked="checked"'; ?>/> Estonian</div>
736
- <div><input type="checkbox" name="language_display_settings[tl]" value="1" <?php if ( 1 == $get_language_choices['tl'] ) echo 'checked="checked"'; ?>/> Filipino</div>
737
- <div><input type="checkbox" name="language_display_settings[fi]" value="1" <?php if ( 1 == $get_language_choices['fi'] ) echo 'checked="checked"'; ?>/> Finnish</div>
738
- <div><input type="checkbox" name="language_display_settings[fr]" value="1" <?php if ( 1 == $get_language_choices['fr'] ) echo 'checked="checked"'; ?>/> French</div>
739
- <div><input type="checkbox" name="language_display_settings[gl]" value="1" <?php if ( 1 == $get_language_choices['gl'] ) echo 'checked="checked"'; ?>/> Galician</div>
740
- <div><input type="checkbox" name="language_display_settings[ka]" value="1" <?php if ( 1 == $get_language_choices['ka'] ) echo 'checked="checked"'; ?>/> Georgian</div>
741
- <div><input type="checkbox" name="language_display_settings[de]" value="1" <?php if ( 1 == $get_language_choices['de'] ) echo 'checked="checked"'; ?>/> German</div>
742
- <div><input type="checkbox" name="language_display_settings[el]" value="1" <?php if ( 1 == $get_language_choices['el'] ) echo 'checked="checked"'; ?>/> Greek</div>
743
- <div><input type="checkbox" name="language_display_settings[gu]" value="1" <?php if ( 1 == $get_language_choices['gu'] ) echo 'checked="checked"'; ?>/> Gujarati</div>
744
- <div><input type="checkbox" name="language_display_settings[ht]" value="1" <?php if ( 1 == $get_language_choices['ht'] ) echo 'checked="checked"'; ?>/> Haitian</div>
745
- <div><input type="checkbox" name="language_display_settings[iw]" value="1" <?php if ( 1 == $get_language_choices['iw'] ) echo 'checked="checked"'; ?>/> Hebrew</div>
746
- <div><input type="checkbox" name="language_display_settings[hi]" value="1" <?php if ( 1 == $get_language_choices['hi'] ) echo 'checked="checked"'; ?>/> Hindi</div>
747
- <div><input type="checkbox" name="language_display_settings[hmn]" value="1" <?php if ( 1 == $get_language_choices['hmn'] ) echo 'checked="checked"'; ?>/> Hmong</div>
748
- <div><input type="checkbox" name="language_display_settings[hu]" value="1" <?php if ( 1 == $get_language_choices['hu'] ) echo 'checked="checked"'; ?>/> Hungarian</div>
749
- <div><input type="checkbox" name="language_display_settings[is]" value="1" <?php if ( 1 == $get_language_choices['is'] ) echo 'checked="checked"'; ?>/> Icelandic</div>
750
- <div><input type="checkbox" name="language_display_settings[id]" value="1" <?php if ( 1 == $get_language_choices['id'] ) echo 'checked="checked"'; ?>/> Indonesian</div>
751
- <div><input type="checkbox" name="language_display_settings[ga]" value="1" <?php if ( 1 == $get_language_choices['ga'] ) echo 'checked="checked"'; ?>/> Irish</div>
752
- <div><input type="checkbox" name="language_display_settings[it]" value="1" <?php if ( 1 == $get_language_choices['it'] ) echo 'checked="checked"'; ?>/> Italian</div>
753
- </div>
754
-
755
- <div class="languages" style="width:25%; float:left">
756
- <div><input type="checkbox" name="language_display_settings[ja]" value="1" <?php if ( 1 == $get_language_choices['ja'] ) echo 'checked="checked"'; ?>/> Japanese</div>
757
- <div><input type="checkbox" name="language_display_settings[jw]" value="1" <?php if ( 1 == $get_language_choices['jw'] ) echo 'checked="checked"'; ?>/> Javanese</div>
758
- <div><input type="checkbox" name="language_display_settings[kn]" value="1" <?php if ( 1 == $get_language_choices['kn'] ) echo 'checked="checked"'; ?>/> Kannada</div>
759
- <div><input type="checkbox" name="language_display_settings[km]" value="1" <?php if ( 1 == $get_language_choices['km'] ) echo 'checked="checked"'; ?>/> Khmer</div>
760
- <div><input type="checkbox" name="language_display_settings[ko]" value="1" <?php if ( 1 == $get_language_choices['ko'] ) echo 'checked="checked"'; ?>/> Korean</div>
761
- <div><input type="checkbox" name="language_display_settings[lo]" value="1" <?php if ( 1 == $get_language_choices['lo'] ) echo 'checked="checked"'; ?>/> Lao</div>
762
- <div><input type="checkbox" name="language_display_settings[la]" value="1" <?php if ( 1 == $get_language_choices['la'] ) echo 'checked="checked"'; ?>/> Latin</div>
763
- <div><input type="checkbox" name="language_display_settings[lv]" value="1" <?php if ( 1 == $get_language_choices['lv'] ) echo 'checked="checked"'; ?>/> Latvian</div>
764
- <div><input type="checkbox" name="language_display_settings[lt]" value="1" <?php if ( 1 == $get_language_choices['lt'] ) echo 'checked="checked"'; ?>/> Lithuanian</div>
765
- <div><input type="checkbox" name="language_display_settings[mk]" value="1" <?php if ( 1 == $get_language_choices['mk'] ) echo 'checked="checked"'; ?>/> Macedonian</div>
766
- <div><input type="checkbox" name="language_display_settings[ms]" value="1" <?php if ( 1 == $get_language_choices['ms'] ) echo 'checked="checked"'; ?>/> Malay</div>
767
- <div><input type="checkbox" name="language_display_settings[mt]" value="1" <?php if ( 1 == $get_language_choices['mt'] ) echo 'checked="checked"'; ?>/> Maltese</div>
768
- <div><input type="checkbox" name="language_display_settings[mr]" value="1" <?php if ( 1 == $get_language_choices['mr'] ) echo 'checked="checked"'; ?>/> Marathi</div>
769
- <div><input type="checkbox" name="language_display_settings[no]" value="1" <?php if ( 1 == $get_language_choices['no'] ) echo 'checked="checked"'; ?>/> Norwegian</div>
770
- <div><input type="checkbox" name="language_display_settings[fa]" value="1" <?php if ( 1 == $get_language_choices['fa'] ) echo 'checked="checked"'; ?>/> Persian</div>
771
- <div><input type="checkbox" name="language_display_settings[pl]" value="1" <?php if ( 1 == $get_language_choices['pl'] ) echo 'checked="checked"'; ?>/> Polish</div>
772
- <div><input type="checkbox" name="language_display_settings[pt]" value="1" <?php if ( 1 == $get_language_choices['pt'] ) echo 'checked="checked"'; ?>/> Portuguese</div>
773
- <div><input type="checkbox" name="language_display_settings[ro]" value="1" <?php if ( 1 == $get_language_choices['ro'] ) echo 'checked="checked"'; ?>/> Romanian</div>
774
- <div><input type="checkbox" name="language_display_settings[ru]" value="1" <?php if ( 1 == $get_language_choices['ru'] ) echo 'checked="checked"'; ?>/> Russian</div>
775
- </div>
776
-
777
- <div class="languages" style="width:25%; float:left">
778
- <div><input type="checkbox" name="language_display_settings[sr]" value="1" <?php if ( 1 == $get_language_choices['sr'] ) echo 'checked="checked"'; ?>/> Serbian</div>
779
- <div><input type="checkbox" name="language_display_settings[sk]" value="1" <?php if ( 1 == $get_language_choices['sk'] ) echo 'checked="checked"'; ?>/> Slovak</div>
780
- <div><input type="checkbox" name="language_display_settings[sl]" value="1" <?php if ( 1 == $get_language_choices['sl'] ) echo 'checked="checked"'; ?>/> Slovenian</div>
781
- <div><input type="checkbox" name="language_display_settings[es]" value="1" <?php if ( 1 == $get_language_choices['es'] ) echo 'checked="checked"'; ?>/> Spanish</div>
782
- <div><input type="checkbox" name="language_display_settings[sw]" value="1" <?php if ( 1 == $get_language_choices['sw'] ) echo 'checked="checked"'; ?>/> Swahili</div>
783
- <div><input type="checkbox" name="language_display_settings[sv]" value="1" <?php if ( 1 == $get_language_choices['sv'] ) echo 'checked="checked"'; ?>/> Swedish</div>
784
- <div><input type="checkbox" name="language_display_settings[ta]" value="1" <?php if ( 1 == $get_language_choices['ta'] ) echo 'checked="checked"'; ?>/> Tamil</div>
785
- <div><input type="checkbox" name="language_display_settings[te]" value="1" <?php if ( 1 == $get_language_choices['te'] ) echo 'checked="checked"'; ?>/> Telugu</div>
786
- <div><input type="checkbox" name="language_display_settings[th]" value="1" <?php if ( 1 == $get_language_choices['th'] ) echo 'checked="checked"'; ?>/> Thai</div>
787
- <div><input type="checkbox" name="language_display_settings[tr]" value="1" <?php if ( 1 == $get_language_choices['tr'] ) echo 'checked="checked"'; ?>/> Turkish</div>
788
- <div><input type="checkbox" name="language_display_settings[uk]" value="1" <?php if ( 1 == $get_language_choices['uk'] ) echo 'checked="checked"'; ?>/> Ukranian</div>
789
- <div><input type="checkbox" name="language_display_settings[ur]" value="1" <?php if ( 1 == $get_language_choices['ur'] ) echo 'checked="checked"'; ?>/> Urdu</div>
790
- <div><input type="checkbox" name="language_display_settings[vi]" value="1" <?php if ( 1 == $get_language_choices['vi'] ) echo 'checked="checked"'; ?>/> Vietnamese</div>
791
- <div><input type="checkbox" name="language_display_settings[cy]" value="1" <?php if ( 1 == $get_language_choices['cy'] ) echo 'checked="checked"'; ?>/> Welsh</div>
792
- <div><input type="checkbox" name="language_display_settings[yi]" value="1" <?php if ( 1 == $get_language_choices['yi'] ) echo 'checked="checked"'; ?>/> Yiddish</div>
793
- </div>
794
-
795
- <div style="clear:both"></div>
796
- <?php }
797
-
798
- function googlelanguagetranslator_flags_cb() {
799
-
800
- $option_name = 'googlelanguagetranslator_flags' ;
801
- $new_value = 'show_flags';
802
-
803
- if ( get_option( $option_name ) === false ) {
804
-
805
- // The option does not exist, so we update it.
806
- update_option( $option_name, $new_value );
807
- }
808
-
809
- $options = get_option (''.$option_name.''); ?>
810
-
811
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
812
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
813
- <?php }
814
-
815
-
816
- function flag_display_settings_cb() {
817
- $defaults = array(
818
- 'flag-en' => 1
819
- );
820
-
821
- $option_name = 'flag_display_settings' ;
822
- $new_value = $defaults;
823
-
824
- if ( get_option( $option_name ) === false ) {
825
-
826
- // The option does not exist, so we update it.
827
- update_option( $option_name, $new_value );
828
- }
829
-
830
- $get_flag_choices = get_option (''.$option_name.'');
831
-
832
- if (!isset ( $get_flag_choices ['flag-af'] ) ) {
833
- $get_flag_choices['flag-af'] = 0;
834
- }
835
-
836
- if (!isset ( $get_flag_choices ['flag-sq'] ) ) {
837
- $get_flag_choices['flag-sq'] = 0;
838
- }
839
-
840
- if (!isset ( $get_flag_choices ['flag-ar'] ) ) {
841
- $get_flag_choices['flag-ar'] = 0;
842
- }
843
-
844
- if (!isset ( $get_flag_choices ['flag-hy'] ) ) {
845
- $get_flag_choices['flag-hy'] = 0;
846
- }
847
-
848
- if (!isset ( $get_flag_choices ['flag-az'] ) ) {
849
- $get_flag_choices['flag-az'] = 0;
850
- }
851
-
852
- if (!isset ( $get_flag_choices ['flag-eu'] ) ) {
853
- $get_flag_choices['flag-eu'] = 0;
854
- }
855
-
856
- if (!isset ( $get_flag_choices ['flag-be'] ) ) {
857
- $get_flag_choices['flag-be'] = 0;
858
- }
859
-
860
- if (!isset ( $get_flag_choices ['flag-bn'] ) ) {
861
- $get_flag_choices['flag-bn'] = 0;
862
- }
863
-
864
- if (!isset ( $get_flag_choices ['flag-bs'] ) ) {
865
- $get_flag_choices['flag-bs'] = 0;
866
- }
867
-
868
- if (!isset ( $get_flag_choices ['flag-bg'] ) ) {
869
- $get_flag_choices['flag-bg'] = 0;
870
- }
871
-
872
- if (!isset ( $get_flag_choices ['flag-ca'] ) ) {
873
- $get_flag_choices['flag-ca'] = 0;
874
- }
875
-
876
- if (!isset ( $get_flag_choices ['flag-ceb'] ) ) {
877
- $get_flag_choices['flag-ceb'] = 0;
878
- }
879
-
880
- if (!isset ( $get_flag_choices ['flag-zh-CN'] ) ) {
881
- $get_flag_choices['flag-zh-CN'] = 0;
882
- }
883
-
884
- if (!isset ( $get_flag_choices ['flag-zh-TW'] ) ) {
885
- $get_flag_choices['flag-zh-TW'] = 0;
886
- }
887
-
888
- if (!isset ( $get_flag_choices ['flag-hr'] ) ) {
889
- $get_flag_choices['flag-hr'] = 0;
890
- }
891
-
892
- if (!isset ( $get_flag_choices ['flag-cs'] ) ) {
893
- $get_flag_choices['flag-cs'] = 0;
894
- }
895
-
896
- if (!isset ( $get_flag_choices ['flag-da'] ) ) {
897
- $get_flag_choices['flag-da'] = 0;
898
- }
899
-
900
- if (!isset ( $get_flag_choices ['flag-nl'] ) ) {
901
- $get_flag_choices['flag-nl'] = 0;
902
- }
903
-
904
- if (!isset ( $get_flag_choices ['flag-en'] ) ) {
905
- $get_flag_choices['flag-en'] = 1;
906
- }
907
-
908
- if (!isset ( $get_flag_choices ['flag-eo'] ) ) {
909
- $get_flag_choices['flag-eo'] = 0;
910
- }
911
-
912
- if (!isset ( $get_flag_choices ['flag-et'] ) ) {
913
- $get_flag_choices['flag-et'] = 0;
914
- }
915
-
916
- if (!isset ( $get_flag_choices ['flag-tl'] ) ) {
917
- $get_flag_choices['flag-tl'] = 0;
918
- }
919
-
920
- if (!isset ( $get_flag_choices ['flag-fi'] ) ) {
921
- $get_flag_choices['flag-fi'] = 0;
922
- }
923
-
924
- if (!isset ( $get_flag_choices ['flag-fr'] ) ) {
925
- $get_flag_choices['flag-fr'] = 0;
926
- }
927
-
928
- if (!isset ( $get_flag_choices ['flag-gl'] ) ) {
929
- $get_flag_choices['flag-gl'] = 0;
930
- }
931
-
932
- if (!isset ( $get_flag_choices ['flag-ka'] ) ) {
933
- $get_flag_choices['flag-ka'] = 0;
934
- }
935
-
936
- if (!isset ( $get_flag_choices ['flag-de'] ) ) {
937
- $get_flag_choices['flag-de'] = 0;
938
- }
939
-
940
- if (!isset ( $get_flag_choices ['flag-el'] ) ) {
941
- $get_flag_choices['flag-el'] = 0;
942
- }
943
-
944
- if (!isset ( $get_flag_choices ['flag-gu'] ) ) {
945
- $get_flag_choices['flag-gu'] = 0;
946
- }
947
-
948
- if (!isset ( $get_flag_choices ['flag-ht'] ) ) {
949
- $get_flag_choices['flag-ht'] = 0;
950
- }
951
-
952
- if (!isset ( $get_flag_choices ['flag-iw'] ) ) {
953
- $get_flag_choices['flag-iw'] = 0;
954
- }
955
-
956
- if (!isset ( $get_flag_choices ['flag-hi'] ) ) {
957
- $get_flag_choices['flag-hi'] = 0;
958
- }
959
-
960
- if (!isset ( $get_flag_choices ['flag-hmn'] ) ) {
961
- $get_flag_choices['flag-hmn'] = 0;
962
- }
963
-
964
- if (!isset ( $get_flag_choices ['flag-hu'] ) ) {
965
- $get_flag_choices['flag-hu'] = 0;
966
- }
967
-
968
- if (!isset ( $get_flag_choices ['flag-is'] ) ) {
969
- $get_flag_choices['flag-is'] = 0;
970
- }
971
-
972
- if (!isset ( $get_flag_choices ['flag-id'] ) ) {
973
- $get_flag_choices['flag-id'] = 0;
974
- }
975
-
976
- if (!isset ( $get_flag_choices ['flag-ga'] ) ) {
977
- $get_flag_choices['flag-ga'] = 0;
978
- }
979
-
980
- if (!isset ( $get_flag_choices ['flag-it'] ) ) {
981
- $get_flag_choices['flag-it'] = 0;
982
- }
983
-
984
- if (!isset ( $get_flag_choices ['flag-ja'] ) ) {
985
- $get_flag_choices['flag-ja'] = 0;
986
- }
987
-
988
- if (!isset ( $get_flag_choices ['flag-jw'] ) ) {
989
- $get_flag_choices['flag-jw'] = 0;
990
- }
991
-
992
- if (!isset ( $get_flag_choices ['flag-kn'] ) ) {
993
- $get_flag_choices['flag-kn'] = 0;
994
- }
995
-
996
- if (!isset ( $get_flag_choices ['flag-km'] ) ) {
997
- $get_flag_choices['flag-km'] = 0;
998
- }
999
-
1000
- if (!isset ( $get_flag_choices ['flag-ko'] ) ) {
1001
- $get_flag_choices['flag-ko'] = 0;
1002
- }
1003
-
1004
- if (!isset ( $get_flag_choices ['flag-lo'] ) ) {
1005
- $get_flag_choices['flag-lo'] = 0;
1006
- }
1007
-
1008
- if (!isset ( $get_flag_choices ['flag-la'] ) ) {
1009
- $get_flag_choices['flag-la'] = 0;
1010
- }
1011
-
1012
- if (!isset ( $get_flag_choices ['flag-lv'] ) ) {
1013
- $get_flag_choices['flag-lv'] = 0;
1014
- }
1015
-
1016
- if (!isset ( $get_flag_choices ['flag-lt'] ) ) {
1017
- $get_flag_choices['flag-lt'] = 0;
1018
- }
1019
-
1020
- if (!isset ( $get_flag_choices ['flag-mk'] ) ) {
1021
- $get_flag_choices['flag-mk'] = 0;
1022
- }
1023
-
1024
- if (!isset ( $get_flag_choices ['flag-ms'] ) ) {
1025
- $get_flag_choices['flag-ms'] = 0;
1026
- }
1027
-
1028
- if (!isset ( $get_flag_choices ['flag-mt'] ) ) {
1029
- $get_flag_choices['flag-mt'] = 0;
1030
- }
1031
-
1032
- if (!isset ( $get_flag_choices ['flag-mr'] ) ) {
1033
- $get_flag_choices['flag-mr'] = 0;
1034
- }
1035
-
1036
- if (!isset ( $get_flag_choices ['flag-no'] ) ) {
1037
- $get_flag_choices['flag-no'] = 0;
1038
- }
1039
-
1040
- if (!isset ( $get_flag_choices ['flag-fa'] ) ) {
1041
- $get_flag_choices['flag-fa'] = 0;
1042
- }
1043
-
1044
- if (!isset ( $get_flag_choices ['flag-pl'] ) ) {
1045
- $get_flag_choices['flag-pl'] = 0;
1046
- }
1047
-
1048
- if (!isset ( $get_flag_choices ['flag-pt'] ) ) {
1049
- $get_flag_choices['flag-pt'] = 0;
1050
- }
1051
-
1052
- if (!isset ( $get_flag_choices ['flag-ro'] ) ) {
1053
- $get_flag_choices['flag-ro'] = 0;
1054
- }
1055
-
1056
- if (!isset ( $get_flag_choices ['flag-ru'] ) ) {
1057
- $get_flag_choices['flag-ru'] = 0;
1058
- }
1059
-
1060
- if (!isset ( $get_flag_choices ['flag-sr'] ) ) {
1061
- $get_flag_choices['flag-sr'] = 0;
1062
- }
1063
-
1064
- if (!isset ( $get_flag_choices ['flag-sk'] ) ) {
1065
- $get_flag_choices['flag-sk'] = 0;
1066
- }
1067
-
1068
- if (!isset ( $get_flag_choices ['flag-sl'] ) ) {
1069
- $get_flag_choices['flag-sl'] = 0;
1070
- }
1071
-
1072
- if (!isset ( $get_flag_choices ['flag-es'] ) ) {
1073
- $get_flag_choices['flag-es'] = 0;
1074
- }
1075
-
1076
- if (!isset ( $get_flag_choices ['flag-sw'] ) ) {
1077
- $get_flag_choices['flag-sw'] = 0;
1078
- }
1079
-
1080
- if (!isset ( $get_flag_choices ['flag-sv'] ) ) {
1081
- $get_flag_choices['flag-sv'] = 0;
1082
- }
1083
-
1084
- if (!isset ( $get_flag_choices ['flag-ta'] ) ) {
1085
- $get_flag_choices['flag-ta'] = 0;
1086
- }
1087
-
1088
- if (!isset ( $get_flag_choices ['flag-te'] ) ) {
1089
- $get_flag_choices['flag-te'] = 0;
1090
- }
1091
-
1092
- if (!isset ( $get_flag_choices ['flag-th'] ) ) {
1093
- $get_flag_choices['flag-th'] = 0;
1094
- }
1095
-
1096
- if (!isset ( $get_flag_choices ['flag-tr'] ) ) {
1097
- $get_flag_choices['flag-tr'] = 0;
1098
- }
1099
-
1100
- if (!isset ( $get_flag_choices ['flag-uk'] ) ) {
1101
- $get_flag_choices['flag-uk'] = 0;
1102
- }
1103
-
1104
- if (!isset ( $get_flag_choices ['flag-ur'] ) ) {
1105
- $get_flag_choices['flag-ur'] = 0;
1106
- }
1107
-
1108
- if (!isset ( $get_flag_choices ['flag-vi'] ) ) {
1109
- $get_flag_choices['flag-vi'] = 0;
1110
- }
1111
-
1112
- if (!isset ( $get_flag_choices ['flag-cy'] ) ) {
1113
- $get_flag_choices['flag-cy'] = 0;
1114
- }
1115
-
1116
- if (!isset ( $get_flag_choices ['flag-yi'] ) ) {
1117
- $get_flag_choices['flag-yi'] = 0;
1118
- }
1119
-
1120
- ?>
1121
- <div class="flagdisplay" style="width:25%; float:left">
1122
- <div><input type="checkbox" name="flag_display_settings[flag-af]" value="1" <?php checked( 1,$get_flag_choices['flag-af']); ?>/> Afrikaans</div>
1123
- <div><input type="checkbox" name="flag_display_settings[flag-sq]" value="1" <?php checked( 1,$get_flag_choices['flag-sq']); ?>/> Albanian</div>
1124
- <div><input type="checkbox" name="flag_display_settings[flag-ar]" value="1" <?php checked( 1,$get_flag_choices['flag-ar']); ?>/> Arabic</div>
1125
- <div><input type="checkbox" name="flag_display_settings[flag-hy]" value="1" <?php checked( 1,$get_flag_choices['flag-hy']); ?>/> Armenian</div>
1126
- <div><input type="checkbox" name="flag_display_settings[flag-az]" value="1" <?php checked( 1,$get_flag_choices['flag-az']); ?>/> Azerbaijani</div>
1127
- <div><input type="checkbox" name="flag_display_settings[flag-eu]" value="1" <?php checked( 1,$get_flag_choices['flag-eu']); ?>/> Basque</div>
1128
- <div><input type="checkbox" name="flag_display_settings[flag-be]" value="1" <?php checked( 1,$get_flag_choices['flag-be']); ?>/> Belarusian</div>
1129
- <div><input type="checkbox" name="flag_display_settings[flag-bn]" value="1" <?php checked( 1,$get_flag_choices['flag-bn']); ?>/> Bengali</div>
1130
- <div><input type="checkbox" name="flag_display_settings[flag-bs]" value="1" <?php checked( 1,$get_flag_choices['flag-bs']); ?>/> Bosnian</div>
1131
- <div><input type="checkbox" name="flag_display_settings[flag-bg]" value="1" <?php checked( 1,$get_flag_choices['flag-bg']); ?>/> Bulgarian</div>
1132
- <div><input type="checkbox" name="flag_display_settings[flag-ca]" value="1" <?php checked( 1,$get_flag_choices['flag-ca']); ?>/> Catalan</div>
1133
- <div><input type="checkbox" name="flag_display_settings[flag-ceb]" value="1" <?php checked( 1,$get_flag_choices['flag-ceb']); ?>/> Cebuano</div>
1134
- <div><input type="checkbox" name="flag_display_settings[flag-zh-CN]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-CN']); ?>/> Chinese</div>
1135
- <div><input type="checkbox" name="flag_display_settings[flag-zh-TW]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-TW']); ?>/> Chinese (Han)</div>
1136
- <div><input type="checkbox" name="flag_display_settings[flag-hr]" value="1" <?php checked( 1,$get_flag_choices['flag-hr']); ?>/> Croatian</div>
1137
- <div><input type="checkbox" name="flag_display_settings[flag-cs]" value="1" <?php checked( 1,$get_flag_choices['flag-cs']); ?>/> Czech</div>
1138
- <div><input type="checkbox" name="flag_display_settings[flag-da]" value="1" <?php checked( 1,$get_flag_choices['flag-da']); ?>/> Danish</div>
1139
- <div><input type="checkbox" name="flag_display_settings[flag-nl]" value="1" <?php checked( 1,$get_flag_choices['flag-nl']); ?>/> Dutch</div>
1140
- <div><input type="checkbox" name="flag_display_settings[flag-en]" value="1" <?php checked(1,$get_flag_choices['flag-en']); ?>/> English</div>
1141
- </div>
1142
-
1143
- <div class="flagdisplay" style="width:25%; float:left">
1144
- <div><input type="checkbox" name="flag_display_settings[flag-eo]" value="1" <?php checked( 1,$get_flag_choices['flag-eo']); ?>/> Esperanto</div>
1145
- <div><input type="checkbox" name="flag_display_settings[flag-et]" value="1" <?php checked( 1,$get_flag_choices['flag-et']); ?>/> Estonian</div>
1146
- <div><input type="checkbox" name="flag_display_settings[flag-tl]" value="1" <?php checked( 1,$get_flag_choices['flag-tl']); ?>/> Filipino</div>
1147
- <div><input type="checkbox" name="flag_display_settings[flag-fi]" value="1" <?php checked( 1,$get_flag_choices['flag-fi']); ?>/> Finnish</div>
1148
- <div><input type="checkbox" name="flag_display_settings[flag-fr]" value="1" <?php checked( 1,$get_flag_choices['flag-fr']); ?>/> French</div>
1149
- <div><input type="checkbox" name="flag_display_settings[flag-gl]" value="1" <?php checked( 1,$get_flag_choices['flag-gl']); ?>/> Galician</div>
1150
- <div><input type="checkbox" name="flag_display_settings[flag-ka]" value="1" <?php checked( 1,$get_flag_choices['flag-ka']); ?>/> Georgian</div>
1151
- <div><input type="checkbox" name="flag_display_settings[flag-de]" value="1" <?php checked( 1,$get_flag_choices['flag-de']); ?>/> German</div>
1152
- <div><input type="checkbox" name="flag_display_settings[flag-el]" value="1" <?php checked( 1,$get_flag_choices['flag-el']); ?>/> Greek</div>
1153
- <div><input type="checkbox" name="flag_display_settings[flag-gu]" value="1" <?php checked( 1,$get_flag_choices['flag-gu']); ?>/> Gujarati</div>
1154
- <div><input type="checkbox" name="flag_display_settings[flag-ht]" value="1" <?php checked( 1,$get_flag_choices['flag-ht']); ?>/> Haitian</div>
1155
- <div><input type="checkbox" name="flag_display_settings[flag-iw]" value="1" <?php checked( 1,$get_flag_choices['flag-iw']); ?>/> Hebrew</div>
1156
- <div><input type="checkbox" name="flag_display_settings[flag-hi]" value="1" <?php checked( 1,$get_flag_choices['flag-hi']); ?>/> Hindi</div>
1157
- <div><input type="checkbox" name="flag_display_settings[flag-hmn]" value="1" <?php checked( 1,$get_flag_choices['flag-hmn']); ?>/> Hmong</div>
1158
- <div><input type="checkbox" name="flag_display_settings[flag-hu]" value="1" <?php checked( 1,$get_flag_choices['flag-hu']); ?>/> Hungarian</div>
1159
- <div><input type="checkbox" name="flag_display_settings[flag-is]" value="1" <?php checked( 1,$get_flag_choices['flag-is']); ?>/> Icelandic</div>
1160
- <div><input type="checkbox" name="flag_display_settings[flag-id]" value="1" <?php checked( 1,$get_flag_choices['flag-id']); ?>/> Indonesian</div>
1161
- <div><input type="checkbox" name="flag_display_settings[flag-ga]" value="1" <?php checked( 1,$get_flag_choices['flag-ga']); ?>/> Irish</div>
1162
- <div><input type="checkbox" name="flag_display_settings[flag-it]" value="1" <?php checked( 1,$get_flag_choices['flag-it']); ?>/> Italian</div>
1163
- </div>
1164
-
1165
- <div class="flagdisplay" style="width:25%; float:left">
1166
- <div><input type="checkbox" name="flag_display_settings[flag-ja]" value="1" <?php checked( 1,$get_flag_choices['flag-ja']); ?>/> Japanese</div>
1167
- <div><input type="checkbox" name="flag_display_settings[flag-jw]" value="1" <?php checked( 1,$get_flag_choices['flag-jw']); ?>/> Javanese</div>
1168
- <div><input type="checkbox" name="flag_display_settings[flag-kn]" value="1" <?php checked( 1,$get_flag_choices['flag-kn']); ?>/> Kannada</div>
1169
- <div><input type="checkbox" name="flag_display_settings[flag-km]" value="1" <?php checked( 1,$get_flag_choices['flag-km']); ?>/> Khmer</div>
1170
- <div><input type="checkbox" name="flag_display_settings[flag-ko]" value="1" <?php checked( 1,$get_flag_choices['flag-ko']); ?>/> Korean</div>
1171
- <div><input type="checkbox" name="flag_display_settings[flag-lo]" value="1" <?php checked( 1,$get_flag_choices['flag-lo']); ?>/> Lao</div>
1172
- <div><input type="checkbox" name="flag_display_settings[flag-la]" value="1" <?php checked( 1,$get_flag_choices['flag-la']); ?>/> Latin</div>
1173
- <div><input type="checkbox" name="flag_display_settings[flag-lv]" value="1" <?php checked( 1,$get_flag_choices['flag-lv']); ?>/> Latvian</div>
1174
- <div><input type="checkbox" name="flag_display_settings[flag-lt]" value="1" <?php checked( 1,$get_flag_choices['flag-lt']); ?>/> Lithuanian</div>
1175
- <div><input type="checkbox" name="flag_display_settings[flag-mk]" value="1" <?php checked( 1,$get_flag_choices['flag-mk']); ?>/> Macedonian</div>
1176
- <div><input type="checkbox" name="flag_display_settings[flag-ms]" value="1" <?php checked( 1,$get_flag_choices['flag-ms']); ?>/> Malay</div>
1177
- <div><input type="checkbox" name="flag_display_settings[flag-mt]" value="1" <?php checked( 1,$get_flag_choices['flag-mt']); ?>/> Maltese</div>
1178
- <div><input type="checkbox" name="flag_display_settings[flag-mr]" value="1" <?php checked( 1,$get_flag_choices['flag-mr']); ?>/> Marathi</div>
1179
- <div><input type="checkbox" name="flag_display_settings[flag-no]" value="1" <?php checked( 1,$get_flag_choices['flag-no']); ?>/> Norwegian</div>
1180
- <div><input type="checkbox" name="flag_display_settings[flag-fa]" value="1" <?php checked( 1,$get_flag_choices['flag-fa']); ?>/> Persian</div>
1181
- <div><input type="checkbox" name="flag_display_settings[flag-pl]" value="1" <?php checked( 1,$get_flag_choices['flag-pl']); ?>/> Polish</div>
1182
- <div><input type="checkbox" name="flag_display_settings[flag-pt]" value="1" <?php checked( 1,$get_flag_choices['flag-pt']); ?>/> Portuguese</div>
1183
- <div><input type="checkbox" name="flag_display_settings[flag-ro]" value="1" <?php checked( 1,$get_flag_choices['flag-ro']); ?>/> Romanian</div>
1184
- <div><input type="checkbox" name="flag_display_settings[flag-ru]" value="1" <?php checked( 1,$get_flag_choices['flag-ru']); ?>/> Russian</div>
1185
- </div>
1186
-
1187
- <div class="flagdisplay" style="width:25%; float:left">
1188
- <div><input type="checkbox" name="flag_display_settings[flag-sr]" value="1" <?php checked( 1,$get_flag_choices['flag-sr']); ?>/> Serbian</div>
1189
- <div><input type="checkbox" name="flag_display_settings[flag-sk]" value="1" <?php checked( 1,$get_flag_choices['flag-sk']); ?>/> Slovak</div>
1190
- <div><input type="checkbox" name="flag_display_settings[flag-sl]" value="1" <?php checked( 1,$get_flag_choices['flag-sl']); ?>/> Slovenian</div>
1191
- <div><input type="checkbox" name="flag_display_settings[flag-es]" value="1" <?php checked( 1,$get_flag_choices['flag-es']); ?>/> Spanish</div>
1192
- <div><input type="checkbox" name="flag_display_settings[flag-sw]" value="1" <?php checked( 1,$get_flag_choices['flag-sw']); ?>/> Swahili</div>
1193
- <div><input type="checkbox" name="flag_display_settings[flag-sv]" value="1" <?php checked( 1,$get_flag_choices['flag-sv']); ?>/> Swedish</div>
1194
- <div><input type="checkbox" name="flag_display_settings[flag-ta]" value="1" <?php checked( 1,$get_flag_choices['flag-ta']); ?>/> Tamil</div>
1195
- <div><input type="checkbox" name="flag_display_settings[flag-te]" value="1" <?php checked( 1,$get_flag_choices['flag-te']); ?>/> Telugu</div>
1196
- <div><input type="checkbox" name="flag_display_settings[flag-th]" value="1" <?php checked( 1,$get_flag_choices['flag-th']); ?>/> Thai</div>
1197
- <div><input type="checkbox" name="flag_display_settings[flag-tr]" value="1" <?php checked( 1,$get_flag_choices['flag-tr']); ?>/> Turkish</div>
1198
- <div><input type="checkbox" name="flag_display_settings[flag-uk]" value="1" <?php checked( 1,$get_flag_choices['flag-uk']); ?>/> Ukranian</div>
1199
- <div><input type="checkbox" name="flag_display_settings[flag-ur]" value="1" <?php checked( 1,$get_flag_choices['flag-ur']); ?>/> Urdu</div>
1200
- <div><input type="checkbox" name="flag_display_settings[flag-vi]" value="1" <?php checked( 1,$get_flag_choices['flag-vi']); ?>/> Vietnamese</div>
1201
- <div><input type="checkbox" name="flag_display_settings[flag-cy]" value="1" <?php checked( 1,$get_flag_choices['flag-cy']); ?>/> Welsh</div>
1202
- <div><input type="checkbox" name="flag_display_settings[flag-yi]" value="1" <?php checked( 1,$get_flag_choices['flag-yi']); ?>/> Yiddish</div>
1203
- </div>
1204
- <div style="clear:both"></div>
1205
- <?php }
1206
-
1207
- function googlelanguagetranslator_translatebox_cb() {
1208
-
1209
- $option_name = 'googlelanguagetranslator_translatebox' ;
1210
- $new_value = 'yes';
1211
-
1212
- if ( get_option( $option_name ) === false ) {
1213
-
1214
- // The option does not exist, so we update it.
1215
- update_option( $option_name, $new_value );
1216
- }
1217
-
1218
- $options = get_option (''.$option_name.''); ?>
1219
-
1220
- <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
1221
- <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
1222
- <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
1223
- </select>
1224
- <?php }
1225
-
1226
- function googlelanguagetranslator_display_cb() {
1227
-
1228
- $option_name = 'googlelanguagetranslator_display' ;
1229
- $new_value = 'Vertical';
1230
-
1231
- if ( get_option( $option_name ) === false ) {
1232
-
1233
- // The option does not exist, so we update it.
1234
- update_option( $option_name, $new_value );
1235
- }
1236
-
1237
- $options = get_option (''.$option_name.''); ?>
1238
-
1239
- <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
1240
- <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
1241
- <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
1242
-
1243
- </select>
1244
- <?php }
1245
-
1246
- function googlelanguagetranslator_toolbar_cb() {
1247
-
1248
- $option_name = 'googlelanguagetranslator_toolbar' ;
1249
- $new_value = 'Yes';
1250
-
1251
- if ( get_option( $option_name ) === false ) {
1252
-
1253
- // The option does not exist, so we update it.
1254
- update_option( $option_name, $new_value );
1255
- }
1256
-
1257
- $options = get_option (''.$option_name.''); ?>
1258
-
1259
- <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
1260
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
1261
- <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
1262
- </select>
1263
- <?php }
1264
-
1265
- function googlelanguagetranslator_showbranding_cb() {
1266
-
1267
- $option_name = 'googlelanguagetranslator_showbranding' ;
1268
- $new_value = 'Yes';
1269
-
1270
- if ( get_option( $option_name ) === false ) {
1271
-
1272
- // The option does not exist, so we update it.
1273
- update_option( $option_name, $new_value );
1274
- }
1275
-
1276
- $options = get_option (''.$option_name.''); ?>
1277
-
1278
- <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
1279
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
1280
- <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
1281
- </select>
1282
- <?php }
1283
-
1284
- function googlelanguagetranslator_flags_alignment_cb() {
1285
-
1286
- $option_name = 'googlelanguagetranslator_flags_alignment' ;
1287
- $new_value = 'flags_left';
1288
-
1289
- if ( get_option( $option_name ) === false ) {
1290
-
1291
- // The option does not exist, so we update it.
1292
- update_option( $option_name, 'flags_left' );
1293
- }
1294
-
1295
- $options = get_option (''.$option_name.''); ?>
1296
-
1297
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_left" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
1298
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_right" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
1299
- <?php }
1300
-
1301
-
1302
- function googlelanguagetranslator_analytics_cb() {
1303
-
1304
- $option_name = 'googlelanguagetranslator_analytics' ;
1305
- $new_value = 0;
1306
-
1307
- if ( get_option( $option_name ) === false ) {
1308
-
1309
- // The option does not exist, so we update it.
1310
- update_option( $option_name, $new_value );
1311
- }
1312
-
1313
- $options = get_option (''.$option_name.'');
1314
-
1315
- $html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Analytics tracking?';
1316
- echo $html;
1317
- }
1318
-
1319
- function googlelanguagetranslator_analytics_id_cb() {
1320
-
1321
- $option_name = 'googlelanguagetranslator_analytics_id' ;
1322
- $new_value = '';
1323
-
1324
- if ( get_option( $option_name ) === false ) {
1325
-
1326
- // The option does not exist, so we update it.
1327
- update_option( $option_name, $new_value );
1328
- }
1329
-
1330
- $options = get_option (''.$option_name.'');
1331
-
1332
- $html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
1333
- echo $html;
1334
- }
1335
-
1336
- function googlelanguagetranslator_css_cb() {
1337
-
1338
- $option_name = 'googlelanguagetranslator_css' ;
1339
- $new_value = '';
1340
-
1341
- if ( get_option( $option_name ) === false ) {
1342
-
1343
- // The option does not exist, so we update it.
1344
- update_option( $option_name, $new_value );
1345
- }
1346
-
1347
- $options = get_option (''.$option_name.'');
1348
-
1349
- $html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
1350
- echo $html;
1351
- }
1352
-
1353
- function googlelanguagetranslator_manage_translations_cb() {
1354
- $option_name = 'googlelanguagetranslator_manage_translations' ;
1355
- $new_value = 0;
1356
-
1357
- if ( get_option( $option_name ) === false ) {
1358
-
1359
- // The option does not exist, so we update it.
1360
- update_option( $option_name, $new_value );
1361
- }
1362
-
1363
- $options = get_option (''.$option_name.'');
1364
-
1365
- $html = '<input type="checkbox" name="googlelanguagetranslator_manage_translations" id="googlelanguagetranslator_manage_translations" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on translation management?';
1366
- echo $html;
1367
- }
1368
-
1369
- function googlelanguagetranslator_multilanguage_cb() {
1370
-
1371
- $option_name = 'googlelanguagetranslator_multilanguage' ;
1372
- $new_value = 0;
1373
-
1374
- if ( get_option( $option_name ) === false ) {
1375
-
1376
- // The option does not exist, so we update it.
1377
- update_option( $option_name, $new_value );
1378
- }
1379
-
1380
- $options = get_option (''.$option_name.'');
1381
-
1382
- $html = '<input type="checkbox" name="googlelanguagetranslator_multilanguage" id="googlelanguagetranslator_multilanguage" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on multilanguage mode?';
1383
- echo $html;
1384
- }
1385
-
1386
-
1387
-
1388
-
1389
- } //End initialize_settings()
1390
- add_action('admin_init', 'initialize_settings');
1391
-
1392
-
1393
- // Functions for frontend display
1394
-
1395
- function googlelanguagetranslator_included_languages() {
1396
- if ( get_option('googlelanguagetranslator_language_option')=='specific') {
1397
- $get_language_choices = get_option ('language_display_settings');
1398
- //print_r($get_language_choices);
1399
-
1400
- foreach ($get_language_choices as $key=>$value) {
1401
- if($value == 1) {
1402
- $items[] = $key;
1403
- }
1404
- }
1405
- $comma_separated = implode(",",array_values($items));
1406
-
1407
- if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
1408
- $lang = 'includedLanguages:\''.$comma_separated.'\',';
1409
- return $lang;
1410
- } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
1411
- $lang = 'includedLanguages:\''.$comma_separated.'\',';
1412
- return $lang;
1413
- }
1414
- }
1415
- }
1416
-
1417
- function analytics() {
1418
- if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
1419
- $analytics_id = get_option('googlelanguagetranslator_analytics_id');
1420
- $analytics = 'gaTrack: true, gaId: \''.$analytics_id.'\'';
1421
- return $analytics;
1422
- }
1423
- }
1424
-
1425
  ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: Google Language Translator
4
+ Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 3.0.4
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/
9
+ */
10
+
11
+ register_activation_hook( __FILE__, 'glt_activate' );
12
+
13
+ include( plugin_dir_path( __FILE__ ) . 'glt_activate.php');
14
+
15
+ include( plugin_dir_path( __FILE__ ) . 'glt_scripts.php');
16
+
17
+ include( plugin_dir_path( __FILE__ ) . 'glt_widget.php');
18
+
19
+ include( plugin_dir_path( __FILE__ ) . 'glt_settings_display.php');
20
+
21
+ include( plugin_dir_path( __FILE__ ) . 'glt_settings_init.php');
22
+
23
+ include( plugin_dir_path( __FILE__ ) . 'glt_horizontal.php');
24
+
25
+ include( plugin_dir_path( __FILE__ ) . 'glt_vertical.php');
26
+
27
+ function load_css() {
28
+ include( plugin_dir_path( __FILE__ ) . 'glt_css.php');
29
+ }
30
+ add_action('wp_head','load_css');
31
+ add_action('admin_head','load_css');
32
+
33
+ function google_translator_shortcode() {
34
+ if (get_option('googlelanguagetranslator_display')=='Vertical'){
35
+ return googlelanguagetranslator_vertical();
36
+ }
37
+
38
+ elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
39
+ return googlelanguagetranslator_horizontal();
40
+ }
41
+
42
+ }
43
+
44
+ add_shortcode( 'google-translator', 'google_translator_shortcode');
45
+
46
+ add_filter('widget_text', 'do_shortcode');
47
+
48
+ // Functions for frontend display
49
+
50
+ function googlelanguagetranslator_included_languages() {
51
+ if ( get_option('googlelanguagetranslator_language_option')=='specific') {
52
+ $get_language_choices = get_option ('language_display_settings');
53
+ //print_r($get_language_choices);
54
+
55
+ foreach ($get_language_choices as $key=>$value) {
56
+ if($value == 1) {
57
+ $items[] = $key;
58
+ }
59
+ }
60
+ $comma_separated = implode(",",array_values($items));
61
+
62
+ if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
63
+ $lang = 'includedLanguages:\''.$comma_separated.'\',';
64
+ return $lang;
65
+ } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
66
+ $lang = 'includedLanguages:\''.$comma_separated.'\',';
67
+ return $lang;
68
+ }
69
+ }
70
+ }
71
+
72
+ function analytics() {
73
+ if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
74
+ $analytics_id = get_option('googlelanguagetranslator_analytics_id');
75
+ $analytics = 'gaTrack: true, gaId: \''.$analytics_id.'\'';
76
+ return $analytics;
77
+ }
78
+ }
79
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ?>
readme.txt CHANGED
@@ -1,154 +1,160 @@
1
- === Google Language Translator ===
2
- Contributors: Rob Myrick
3
- Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=47LFA33AC89S6
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.8.1
8
- stable tag: 3.0.3
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
-
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
- 2.2
70
-
71
- - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
72
-
73
- - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
74
-
75
- - Added link in the settings panel that points to Google's Attribution Policy.
76
-
77
- 2.3
78
-
79
- - Added a "Preview" area on the settings page that allows you to see your settings in action.
80
-
81
- - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
82
-
83
- - Added an option that allows left/right alignment of the translation tool.
84
-
85
- - Added the "Google Language Translator" widget.
86
-
87
- - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
88
-
89
- 2.4
90
-
91
- - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
92
-
93
- 2.5
94
-
95
- - Eliminated an internal Wordpress error being generated from a coding mistake.
96
-
97
- - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
98
-
99
- 2.6
100
-
101
- - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
102
-
103
- 2.7
104
-
105
- - Added Google Analytics tracking capability to the plugin.
106
-
107
- - Added a "CSS Styles" box in the settings panel.
108
-
109
- - Changed the Catalonian flag to its correct flag image.
110
-
111
- - Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
112
-
113
- - Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
114
-
115
-
116
- 2.8
117
-
118
- - Added an option to allow users to manage their own translations directly through their Google Translate account (free). When activated, users can hover over the text of their website, and edit the translations from the webpage directly. Google will remember these translations, and then serve them to users once the edits are made. Users must install the Google Translate Customization meta tag provided through Google Translate here: translate.google.com/manager/website/settings. To obtain this meta tag, users need to configure the Google Translate tool directly from this website (although they will not use this because the plugin provides it), then the user can obtain the meta tag on the "Get Code" screen, which is displayed after configuring the Google Translate tool on this webpage.
119
- - Added an option to allow users to turn on/off Google's multilanguagePage option, that when activated, the original website content will be a forced translation, instead of original content (but only after a translation is made.)
120
- - Added more flexible styles to the settings page, so that left and right panels display nicely to the user.
121
-
122
- 2.9
123
-
124
- ***IMPORTANT: Google's most recent server update is producing display issues for website translation tool. There are major display issues with the translation toolbar and also the translations editing interface. Version 2.9 temporarily hides the edit translation functionality until Google decides to fix this issue, although you can still edit translations directly through your Google account at translate.google.com. Please direct any support requests through Wordpress.org and we will be happy to assist you.
125
-
126
- - Fixed Google Translation toolbar display issue
127
- - Fixed the Edit Translation interface by hiding it temporarily until Google fixes this
128
- - Removed some unneeded styles from the style sheet.
129
- - Fixed some CSS issues for the Google Branding display, which was affected by Google's most recent update
130
-
131
- 3.0
132
-
133
- - Correct a small CSS error that affected the showing/hiding of the Google toolbar.
134
-
135
- 3.0.1
136
-
137
- - Changed the url request to Google to allow both unsecured and secured page translations. Previously, some users experienced errors when trying to use the translator on "https://" (secured) pages.
138
- - Adjusted some minor spacing issues in the settings page HTML (caused some annoying red HTML errors when using "View Source" in right-click menu).
139
- - Removed old CSS styles that were added in the previous 3.0 update - the styles were added when Google servers were being updated, and were producing major translation dislay issues until their update was complete. Now the styles I added are no longer needed.
140
-
141
- 3.0.2
142
-
143
- - Adjusted additional minor invalid HTML issues on the settings page, and also in the front-end plugin display.
144
-
145
- 3.0.3
146
-
147
- - Re-factored/Re-arranged some of the code in googlelanguagetranslator.php by placing them into separate files.
148
- - Fixed a minor coding issue in glt_widget.php - this was generating an error in Wordpress when debugging.
149
- - Moved all CSS code into a single file. The result is nice, clean inline CSS code that is now called only once.
150
- - Fixed some additional CSS display issues.
151
-
152
- == Screenshots ==
153
-
154
- 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.
 
 
 
 
 
 
1
+ === Google Language Translator ===
2
+ Contributors: Rob Myrick
3
+ Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=47LFA33AC89S6
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.8.1
8
+ stable tag: 3.0.4
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
+
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
+ 2.2
70
+
71
+ - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
72
+
73
+ - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
74
+
75
+ - Added link in the settings panel that points to Google's Attribution Policy.
76
+
77
+ 2.3
78
+
79
+ - Added a "Preview" area on the settings page that allows you to see your settings in action.
80
+
81
+ - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
82
+
83
+ - Added an option that allows left/right alignment of the translation tool.
84
+
85
+ - Added the "Google Language Translator" widget.
86
+
87
+ - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
88
+
89
+ 2.4
90
+
91
+ - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
92
+
93
+ 2.5
94
+
95
+ - Eliminated an internal Wordpress error being generated from a coding mistake.
96
+
97
+ - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
98
+
99
+ 2.6
100
+
101
+ - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
102
+
103
+ 2.7
104
+
105
+ - Added Google Analytics tracking capability to the plugin.
106
+
107
+ - Added a "CSS Styles" box in the settings panel.
108
+
109
+ - Changed the Catalonian flag to its correct flag image.
110
+
111
+ - Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
112
+
113
+ - Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
114
+
115
+
116
+ 2.8
117
+
118
+ - Added an option to allow users to manage their own translations directly through their Google Translate account (free). When activated, users can hover over the text of their website, and edit the translations from the webpage directly. Google will remember these translations, and then serve them to users once the edits are made. Users must install the Google Translate Customization meta tag provided through Google Translate here: translate.google.com/manager/website/settings. To obtain this meta tag, users need to configure the Google Translate tool directly from this website (although they will not use this because the plugin provides it), then the user can obtain the meta tag on the "Get Code" screen, which is displayed after configuring the Google Translate tool on this webpage.
119
+ - Added an option to allow users to turn on/off Google's multilanguagePage option, that when activated, the original website content will be a forced translation, instead of original content (but only after a translation is made.)
120
+ - Added more flexible styles to the settings page, so that left and right panels display nicely to the user.
121
+
122
+ 2.9
123
+
124
+ ***IMPORTANT: Google's most recent server update is producing display issues for website translation tool. There are major display issues with the translation toolbar and also the translations editing interface. Version 2.9 temporarily hides the edit translation functionality until Google decides to fix this issue, although you can still edit translations directly through your Google account at translate.google.com. Please direct any support requests through Wordpress.org and we will be happy to assist you.
125
+
126
+ - Fixed Google Translation toolbar display issue
127
+ - Fixed the Edit Translation interface by hiding it temporarily until Google fixes this
128
+ - Removed some unneeded styles from the style sheet.
129
+ - Fixed some CSS issues for the Google Branding display, which was affected by Google's most recent update
130
+
131
+ 3.0
132
+
133
+ - Correct a small CSS error that affected the showing/hiding of the Google toolbar.
134
+
135
+ 3.0.1
136
+
137
+ - Changed the url request to Google to allow both unsecured and secured page translations. Previously, some users experienced errors when trying to use the translator on "https://" (secured) pages.
138
+ - Adjusted some minor spacing issues in the settings page HTML (caused some annoying red HTML errors when using "View Source" in right-click menu).
139
+ - Removed old CSS styles that were added in the previous 3.0 update - the styles were added when Google servers were being updated, and were producing major translation dislay issues until their update was complete. Now the styles I added are no longer needed.
140
+
141
+ 3.0.2
142
+
143
+ - Adjusted additional minor invalid HTML issues on the settings page, and also in the front-end plugin display.
144
+
145
+ 3.0.3
146
+
147
+ - Re-factored/re-arranged some of the code in googlelanguagetranslator.php by placing them into separate files.
148
+ - Fixed a minor coding issue in glt_widget.php - this was generating an error in Wordpress when debugging.
149
+ - Moved all CSS code into a single file. The result is nice, clean inline CSS code that is now called only once.
150
+ - Fixed some additional CSS display issues.
151
+
152
+ 3.0.4
153
+
154
+ - Re-factored/re-arranged more code in google languagetransltor.php by placing them into separate files.
155
+ - Fixed the issue of Custom CSS box not displaying it's styles to the website. This was only missed in this last update, due to re-arrangement of the files. Sorry for any inconvenience.
156
+ - Removed style2.php file, which is unnecessary and was being used in testing.
157
+
158
+ == Screenshots ==
159
+
160
+ 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.