Google Language Translator - Version 2.3

Version Description

Download this release

Release Info

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

Code changes from version 2.2 to 2.3

Files changed (69) hide show
  1. admin.js +25 -0
  2. css/style.css +36 -0
  3. google-language-translator.php +2170 -510
  4. images/Jersey.png +0 -0
  5. images/Jordan.png +0 -0
  6. images/Togo.png +0 -0
  7. images/albania.png +0 -0
  8. images/armenia.png +0 -0
  9. images/azerbaijan.png +0 -0
  10. images/bangladesh.png +0 -0
  11. images/basque.png +0 -0
  12. images/belarus.png +0 -0
  13. images/bosnia.png +0 -0
  14. images/bulgaria.png +0 -0
  15. images/cambodia.png +0 -0
  16. images/croatia.png +0 -0
  17. images/czechrepublic.png +0 -0
  18. images/esperanto.png +0 -0
  19. images/estonia.png +0 -0
  20. images/finland.png +0 -0
  21. images/galicia.png +0 -0
  22. images/georgia.png +0 -0
  23. images/greece.png +0 -0
  24. images/gujarati.png +0 -0
  25. images/haiti.png +0 -0
  26. images/hmong.png +0 -0
  27. images/hungary.png +0 -0
  28. images/iceland.png +0 -0
  29. images/india.png +0 -0
  30. images/indonesia.png +0 -0
  31. images/iran.png +0 -0
  32. images/ireland.png +0 -0
  33. images/israel.png +0 -0
  34. images/kannada.png +0 -0
  35. images/kenya.png +0 -0
  36. images/korea.png +0 -0
  37. images/laos.png +0 -0
  38. images/latin.png +0 -0
  39. images/latvia.png +0 -0
  40. images/lithuania.png +0 -0
  41. images/macedonia.png +0 -0
  42. images/malaysia.png +0 -0
  43. images/malta.png +0 -0
  44. images/marathi.png +0 -0
  45. images/netherlands.png +0 -0
  46. images/norway.png +0 -0
  47. images/pakistan.png +0 -0
  48. images/philippines.png +0 -0
  49. images/poland.png +0 -0
  50. images/portugal.png +0 -0
  51. images/romania.png +0 -0
  52. images/russia.png +0 -0
  53. images/saudiarabia.png +0 -0
  54. images/serbia.png +0 -0
  55. images/slovakia.png +0 -0
  56. images/slovenia.png +0 -0
  57. images/southafrica.png +0 -0
  58. images/sweden.png +0 -0
  59. images/tamil.png +0 -0
  60. images/telugu.png +0 -0
  61. images/thailand.png +0 -0
  62. images/turkey.png +0 -0
  63. images/ukraine.png +0 -0
  64. images/united-kingdom.png +0 -0
  65. images/vietnam.png +0 -0
  66. images/wales.png +0 -0
  67. images/yiddish.png +0 -0
  68. readme.txt +12 -2
  69. widget.php +25 -0
admin.js CHANGED
@@ -11,6 +11,19 @@ jQuery(document).ready(function(){
11
  jQuery ('.choose_flags').css('display','none');
12
  }
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  jQuery('input[name=googlelanguagetranslator_language_option]').change(function(){
15
  if( jQuery(this).val() == 'all'){
16
  jQuery ('.languages').fadeOut("slow");
@@ -43,7 +56,19 @@ jQuery(document).ready(function(){
43
  jQuery ('.choose_flags').fadeIn("slow");
44
  }
45
  });
 
 
 
 
 
 
 
 
 
46
  });
 
 
 
47
 
48
 
49
 
11
  jQuery ('.choose_flags').css('display','none');
12
  }
13
 
14
+ var display = jQuery('select[name=googlelanguagetranslator_display] option:selected').val();
15
+ if ( display == 'Horizontal') {
16
+ //jQuery ('.alignment').css('display','none');
17
+ }
18
+
19
+ jQuery('select[name=googlelanguagetranslator_display]').change(function() {
20
+ if( jQuery(this).val() == 'Horizontal') {
21
+ //jQuery ('.alignment').fadeOut("slow");
22
+ } else if ( jQuery(this).val() == 'Vertical') {
23
+ //jQuery ('.alignment').fadeIn("slow");
24
+ }
25
+ });
26
+
27
  jQuery('input[name=googlelanguagetranslator_language_option]').change(function(){
28
  if( jQuery(this).val() == 'all'){
29
  jQuery ('.languages').fadeOut("slow");
56
  jQuery ('.choose_flags').fadeIn("slow");
57
  }
58
  });
59
+
60
+
61
+
62
+ //Prevent the translator preview from translating Dashboard text
63
+ jQuery('#adminmenu').addClass('notranslate');
64
+ jQuery('#wp-toolbar').addClass('notranslate');
65
+ jQuery('#setting-error-settings_updated').addClass('notranslate');
66
+ jQuery('.update-nag').addClass('notranslate');
67
+ jQuery('title').addClass('notranslate');
68
  });
69
+
70
+
71
+
72
 
73
 
74
 
css/style.css ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ select.goog-te-combo {
2
+ width:143px !important;
3
+ box-shadow:none !important;
4
+ -moz-box-shadow:none !important;
5
+ -webkit-box-shadow:none !important;
6
+ padding:3px !important;
7
+ height:auto !important;
8
+ border:1px solid lightgray !important;
9
+ border-radius:0px !important;
10
+ -webkit-border-radius:0px;
11
+ -moz-border-radius:0px !important;
12
+ }
13
+
14
+ select.goog-te-combo:focus {
15
+ box-shadow:none !important;
16
+ -moz-box-shadow:none !important;
17
+ -webkit-box-shadow:none !important;
18
+ }
19
+
20
+ .metabox-holder {
21
+ width:65%;
22
+ float:left;
23
+ }
24
+
25
+ .metabox-holder h2 {
26
+ margin-bottom:18px;
27
+ }
28
+
29
+ .submit {
30
+ padding:0px;
31
+ }
32
+
33
+ .form-table th {
34
+ width:50%;
35
+ }
36
+
google-language-translator.php CHANGED
@@ -2,33 +2,39 @@
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 2.2
6
  Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
  Author: Rob Myrick
8
  Author URI: http://www.studio88design.com/
9
  */
 
 
10
 
11
- function toggle_dropdown_script($hook_suffix) {
12
- global $my_settings_page;
13
- if ($my_settings_page == $hook_suffix) {
14
- wp_enqueue_script( 'my-script', plugins_url('/admin.js',__FILE__), array('jquery'));
 
 
 
15
  }
16
  }
17
 
18
  function flags() {
19
  wp_enqueue_script( 'flags', plugins_url('/flags.js',__FILE__), array('jquery'));
 
 
20
  }
21
  add_action('wp_enqueue_scripts', 'flags');
22
 
23
- add_filter('widget_text', 'do_shortcode');
24
-
25
- add_action('admin_menu', 'googlelanguagetranslator_menu_options');
26
-
27
- add_option("googlelanguagetranslator_active","0");
28
-
29
- add_option("googlelanguagetranslator_language_option","all");
30
-
31
- add_shortcode( 'google-translator', 'google_translator_shortcode');
32
 
33
  function google_translator_shortcode() {
34
  if (get_option('googlelanguagetranslator_display')=='Vertical'){
@@ -38,445 +44,851 @@ function google_translator_shortcode() {
38
  elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
39
  return googlelanguagetranslator_horizontal();
40
  }
41
-
42
- if (get_option('googlelanguagetranslator_toolbar')=='Yes'){
43
- return googlelanguagetranslator_toolbar_yes();
 
 
44
  }
45
 
46
  elseif(get_option('googlelanguagetranslator_toolbar')=='No'){
47
- return googlelanguagetranslator_toolbar_no();
48
  add_action ('wp_head','googlelanguagetranslator_toolbar_no');
 
49
  }
50
 
51
- if (get_option('googlelanguagetranslator_showbranding')=='Yes'){
52
- return googlelanguagetranslator_showbranding_yes();
53
  add_action ('wp_head','googlelanguagetranslator_showbranding_yes');
 
54
  }
55
 
56
- elseif(get_option('googlelanguagetranslator_showbranding')=='No'){
57
- return googlelanguagetranslator_showbranding_no();
58
  add_action ('wp_head','googlelanguagetranslator_showbranding_no');
 
59
  }
60
- }
 
 
 
 
61
 
62
- if (get_option('googlelanguagetranslator_translatebox') == 'no') {
63
- add_action ('wp_head', 'googlelanguagetranslator_translatebox');
64
- }
 
65
 
66
- if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
67
- add_action ('wp_head','googlelanguagetranslator_flags');
68
- }
 
 
69
 
70
- if (get_option('googlelanguagetranslator_toolbar')=='Yes') {
71
- add_action ('wp_head','googlelanguagetranslator_toolbar_yes');
72
- }
73
 
74
- if (get_option('googlelanguagetranslator_toolbar')=='No') {
75
- add_action ('wp_head','googlelanguagetranslator_toolbar_no');
76
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
- if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
79
- add_action ('wp_head','googlelanguagetranslator_showbranding_yes');
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
- if (get_option('googlelanguagetranslator_showbranding')=='No') {
83
- add_action ('wp_head','googlelanguagetranslator_showbranding_no');
 
 
 
 
 
84
  }
85
 
86
- function googlelanguagetranslator_menu_options(){
87
- global $my_settings_page;
88
-
89
- add_action( 'admin_enqueue_scripts', 'toggle_dropdown_script');
90
-
91
- $my_settings_page = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'googlelanguagetranslator-menu-options', 'googlelanguagetranslator_menu');
92
-
93
- if(isset($_POST['googlelanguagetranslator_update_options'])){
94
- update_option('googlelanguagetranslator_language',$_POST['googlelanguagetranslator_language']);
95
- update_option('googlelanguagetranslator_display',$_POST['googlelanguagetranslator_display']);
96
- update_option('googlelanguagetranslator_toolbar',$_POST['googlelanguagetranslator_toolbar']);
97
- update_option('googlelanguagetranslator_showbranding',$_POST['googlelanguagetranslator_showbranding']);
98
- update_option('googlelanguagetranslator_language_option',$_POST['googlelanguagetranslator_language_option']);
99
- update_option('googlelanguagetranslator_flags', $_POST['googlelanguagetranslator_flags']);
100
- update_option('googlelanguagetranslator_translatebox', $_POST['googlelanguagetranslator_translatebox']);
101
- }
102
-
103
- if(isset($_POST['googlelanguagetranslator_update_options'])) {
104
- $get_language_choices = get_option ('language_display_settings');
105
- $get_language_choices['af'] = $_POST['af'];
106
- $get_language_choices['sq'] = $_POST['sq'];
107
- $get_language_choices['ar'] = $_POST['ar'];
108
- $get_language_choices['hy'] = $_POST['hy'];
109
- $get_language_choices['az'] = $_POST['az'];
110
- $get_language_choices['eu'] = $_POST['eu'];
111
- $get_language_choices['be'] = $_POST['be'];
112
- $get_language_choices['bn'] = $_POST['bn'];
113
- $get_language_choices['bs'] = $_POST['bs'];
114
- $get_language_choices['bg'] = $_POST['bg'];
115
- $get_language_choices['ca'] = $_POST['ca'];
116
- $get_language_choices['ceb'] = $_POST['ceb'];
117
- $get_language_choices['zh-CN'] = $_POST['zh-CN'];
118
- $get_language_choices['zh-TW'] = $_POST['zh-TW'];
119
- $get_language_choices['cs'] = $_POST['cs'];
120
- $get_language_choices['hr'] = $_POST['hr'];
121
- $get_language_choices['da'] = $_POST['da'];
122
- $get_language_choices['nl'] = $_POST['nl'];
123
- $get_language_choices['en'] = $_POST['en'];
124
- $get_language_choices['eo'] = $_POST['eo'];
125
- $get_language_choices['et'] = $_POST['et'];
126
- $get_language_choices['tl'] = $_POST['tl'];
127
- $get_language_choices['fi'] = $_POST['fi'];
128
- $get_language_choices['fr'] = $_POST['fr'];
129
- $get_language_choices['gl'] = $_POST['gl'];
130
- $get_language_choices['ka'] = $_POST['ka'];
131
- $get_language_choices['de'] = $_POST['de'];
132
- $get_language_choices['el'] = $_POST['el'];
133
- $get_language_choices['gu'] = $_POST['gu'];
134
- $get_language_choices['ht'] = $_POST['ht'];
135
- $get_language_choices['iw'] = $_POST['iw'];
136
- $get_language_choices['hi'] = $_POST['hi'];
137
- $get_language_choices['hmn'] = $_POST['hmn'];
138
- $get_language_choices['hu'] = $_POST['hu'];
139
- $get_language_choices['is'] = $_POST['is'];
140
- $get_language_choices['id'] = $_POST['id'];
141
- $get_language_choices['ga'] = $_POST['ga'];
142
- $get_language_choices['it'] = $_POST['it'];
143
- $get_language_choices['ja'] = $_POST['ja'];
144
- $get_language_choices['jw'] = $_POST['jw'];
145
- $get_language_choices['kn'] = $_POST['kn'];
146
- $get_language_choices['km'] = $_POST['km'];
147
- $get_language_choices['ko'] = $_POST['ko'];
148
- $get_language_choices['lo'] = $_POST['lo'];
149
- $get_language_choices['la'] = $_POST['la'];
150
- $get_language_choices['lv'] = $_POST['lv'];
151
- $get_language_choices['lt'] = $_POST['lt'];
152
- $get_language_choices['mk'] = $_POST['mk'];
153
- $get_language_choices['ms'] = $_POST['ms'];
154
- $get_language_choices['mt'] = $_POST['mt'];
155
- $get_language_choices['mr'] = $_POST['mr'];
156
- $get_language_choices['no'] = $_POST['no'];
157
- $get_language_choices['fa'] = $_POST['fa'];
158
- $get_language_choices['pl'] = $_POST['pl'];
159
- $get_language_choices['pt'] = $_POST['pt'];
160
- $get_language_choices['ro'] = $_POST['ro'];
161
- $get_language_choices['ru'] = $_POST['ru'];
162
- $get_language_choices['sr'] = $_POST['sr'];
163
- $get_language_choices['sk'] = $_POST['sk'];
164
- $get_language_choices['sl'] = $_POST['sl'];
165
- $get_language_choices['es'] = $_POST['es'];
166
- $get_language_choices['sw'] = $_POST['sw'];
167
- $get_language_choices['sv'] = $_POST['sv'];
168
- $get_language_choices['ta'] = $_POST['ta'];
169
- $get_language_choices['te'] = $_POST['te'];
170
- $get_language_choices['th'] = $_POST['th'];
171
- $get_language_choices['tr'] = $_POST['tr'];
172
- $get_language_choices['uk'] = $_POST['uk'];
173
- $get_language_choices['ur'] = $_POST['ur'];
174
- $get_language_choices['vi'] = $_POST['vi'];
175
- $get_language_choices['cy'] = $_POST['cy'];
176
- $get_language_choices['yi'] = $_POST['yi'];
177
- update_option('language_display_settings', $get_language_choices);
178
- }
179
-
180
- if(isset($_POST['googlelanguagetranslator_update_options'])) {
181
- $get_flag_choices = get_option ('flag_display_settings');
182
- $get_flag_choices['flag-zh-CN'] = $_POST['flag-zh-CN'];
183
- $get_flag_choices['flag-en'] = $_POST['flag-en'];
184
- $get_flag_choices['flag-fr'] = $_POST['flag-fr'];
185
- $get_flag_choices['flag-de'] = $_POST['flag-de'];
186
- $get_flag_choices['flag-it'] = $_POST['flag-it'];
187
- $get_flag_choices['flag-es'] = $_POST['flag-es'];
188
- $get_flag_choices['flag-da'] = $_POST['flag-da'];
189
- update_option('flag_display_settings', $get_flag_choices);
190
- }
191
- }
192
 
 
 
 
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
 
195
- function googlelanguagetranslator_menu(){
196
- if (!current_user_can('manage_options')) {
197
- wp_die( __('You do not have sufficient permissions to access this page.') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  }
199
- ?>
200
- <div class="wrap" style="width:70%">
201
- <div id="icon-options-general" class="icon32"></div>
202
- <h2>Google Language Translator</h2>
203
- <div id="poststuff" class="metabox-holder has-right-sidebar" >
204
- <div class="postbox" style="width: 100%">
205
- <h3>Settings</h3>
206
- <form method="post" action="options.php">
207
- <?php wp_nonce_field('update-options');?>
208
- <table width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
209
- <tr>
210
- <td style="width:45%">Plugin Status:</td>
211
- <td><input class="activate" type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" <?php if(get_option('googlelanguagetranslator_active')==1){echo "checked";}?> />
212
- Click Here to Activate Google Language Translator</td>
213
- </tr>
214
-
215
- <tr>
216
- <td>Choose the original language of your website</td>
217
- <td>
218
- <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language" style="width:170px">
219
- <option value="en" <?php if(get_option('googlelanguagetranslator_language')=='en'){echo "selected";}?>>English</option>
220
- <option value="es" <?php if(get_option('googlelanguagetranslator_language')=='es'){echo "selected";}?>>Spanish</option>
221
- <option value="fr" <?php if(get_option('googlelanguagetranslator_language')=='fr'){echo "selected";}?>>French</option>
222
- <option value="it" <?php if(get_option('googlelanguagetranslator_language')=='it'){echo "selected";}?>>Italian</option>
223
- <option value="da" <?php if(get_option('googlelanguagetranslator_language')=='da'){echo "selected";}?>>Danish</option>
224
- <option value="nl" <?php if(get_option('googlelanguagetranslator_language')=='nl'){echo "selected";}?>>Dutch</option>
225
- <option value="de" <?php if(get_option('googlelanguagetranslator_language')=="de"){echo "selected";}?>>German</option>
226
- <option value="pt" <?php if(get_option('googlelanguagetranslator_language')=="pt"){echo "selected";}?>>Portuguese</option>
227
- <option value="ja" <?php if(get_option('googlelanguagetranslator_language')=='ja'){echo "selected";}?>>Japanese</option>
228
- <option value="zh-CN" <?php if(get_option('googlelanguagetranslator_language')=='zh-CN'){echo "selected";}?>>Chinese</option>
229
- <option value="ru" <?php if(get_option('googlelanguagetranslator_language')=='ru') {echo "selected";}?>>Russian</option>
230
- </select>
231
- </td>
232
- </tr>
233
-
234
- <tr>
235
- <td>What translation languages will you display to website visitors?<br/>(Note: To show flags you must choose "All Languages")</td>
236
- <td>
237
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if(get_option('googlelanguagetranslator_language_option')=='all'){echo "checked";}?>/> All Languages<br/>
238
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if(get_option('googlelanguagetranslator_language_option')=='specific'){echo "checked";}?>/> Specific Languages
239
- </td>
240
- </tr>
241
-
242
- <tr>
243
- <td colspan="2">
244
- <div class="languages" style="width:25%; float:left">
245
- <?php $get_language_choices = get_option ('language_display_settings'); ?>
246
- <div><input type="checkbox" name="af" value="1"<?php checked( isset ( $get_language_choices['af'] ) ); ?> /> Afrikaans</div>
247
- <div><input type="checkbox" name="sq" value="1"<?php checked( isset ( $get_language_choices['sq'] ) ); ?> /> Albanian</div>
248
- <div><input type="checkbox" name="ar" value="1"<?php checked( isset ( $get_language_choices['ar'] ) ); ?> /> Arabic</div>
249
- <div><input type="checkbox" name="hy" value="1"<?php checked( isset ( $get_language_choices['hy'] ) ); ?> /> Armenian</div>
250
- <div><input type="checkbox" name="az" value="1"<?php checked( isset ( $get_language_choices['az'] ) ); ?> /> Azerbaijani</div>
251
- <div><input type="checkbox" name="eu" value="1"<?php checked( isset ( $get_language_choices['eu'] ) ); ?> /> Basque</div>
252
- <div><input type="checkbox" name="be" value="1"<?php checked( isset ( $get_language_choices['be'] ) ); ?> /> Belarusian</div>
253
- <div><input type="checkbox" name="bn" value="1"<?php checked( isset ( $get_language_choices['bn'] ) ); ?> /> Bengali</div>
254
- <div><input type="checkbox" name="bs" value="1"<?php checked( isset ( $get_language_choices['bs'] ) ); ?> /> Bosnian</div>
255
- <div><input type="checkbox" name="bg" value="1"<?php checked( isset ( $get_language_choices['bg'] ) ); ?> /> Bulgarian</div>
256
- <div><input type="checkbox" name="ca" value="1"<?php checked( isset ( $get_language_choices['ca'] ) ); ?> /> Catalan</div>
257
- <div><input type="checkbox" name="ceb" value="1"<?php checked( isset ( $get_language_choices['ceb'] ) ); ?> /> Cebuano</div>
258
- <div><input type="checkbox" name="zh-CN" value="1"<?php checked( isset ( $get_language_choices['zh-CN'] ) ); ?> /> Chinese</div>
259
- <div><input type="checkbox" name="zh-TW" value="1"<?php checked( isset ( $get_language_choices['zh-TW'] ) ); ?> /> Chinese (Han)</div>
260
- <div><input type="checkbox" name="hr" value="1"<?php checked( isset ( $get_language_choices['hr'] ) ); ?> /> Croatian</div>
261
- <div><input type="checkbox" name="cs" value="1"<?php checked( isset ( $get_language_choices['cs'] ) ); ?> /> Czech</div>
262
- <div><input type="checkbox" name="da" value="1"<?php checked( isset ( $get_language_choices['da'] ) ); ?> /> Danish</div>
263
- <div><input type="checkbox" name="nl" value="1"<?php checked( isset ( $get_language_choices['nl'] ) ); ?> /> Dutch</div>
264
- <div><input type="checkbox" name="en" value="1"<?php checked( isset ( $get_language_choices['en'] ) ); ?> /> English</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  </div>
266
 
267
  <div class="languages" style="width:25%; float:left">
268
- <div><input type="checkbox" name="eo" value="1"<?php checked( isset ( $get_language_choices['eo'] ) ); ?> /> Esperanto</div>
269
- <div><input type="checkbox" name="et" value="1"<?php checked( isset ( $get_language_choices['et'] ) ); ?> /> Estonian</div>
270
- <div><input type="checkbox" name="tl" value="1"<?php checked( isset ( $get_language_choices['tl'] ) ); ?> /> Filipino</div>
271
- <div><input type="checkbox" name="fi" value="1"<?php checked( isset ( $get_language_choices['fi'] ) ); ?> /> Finnish</div>
272
- <div><input type="checkbox" name="fr" value="1"<?php checked( isset ( $get_language_choices['fr'] ) ); ?> /> French</div>
273
- <div><input type="checkbox" name="gl" value="1"<?php checked( isset ( $get_language_choices['gl'] ) ); ?> /> Galician</div>
274
- <div><input type="checkbox" name="ka" value="1"<?php checked( isset ( $get_language_choices['ka'] ) ); ?> /> Georgian</div>
275
- <div><input type="checkbox" name="de" value="1"<?php checked( isset ( $get_language_choices['de'] ) ); ?> /> German</div>
276
- <div><input type="checkbox" name="el" value="1"<?php checked( isset ( $get_language_choices['el'] ) ); ?> /> Greek</div>
277
- <div><input type="checkbox" name="gu" value="1"<?php checked( isset ( $get_language_choices['gu'] ) ); ?> /> Gujarati</div>
278
- <div><input type="checkbox" name="ht" value="1"<?php checked( isset ( $get_language_choices['ht'] ) ); ?> /> Haitian</div>
279
- <div><input type="checkbox" name="iw" value="1"<?php checked( isset ( $get_language_choices['iw'] ) ); ?> /> Hebrew</div>
280
- <div><input type="checkbox" name="hi" value="1"<?php checked( isset ( $get_language_choices['hi'] ) ); ?> /> Hindi</div>
281
- <div><input type="checkbox" name="hmn" value="1"<?php checked( isset ( $get_language_choices['hmn'] ) ); ?> /> Hmong</div>
282
- <div><input type="checkbox" name="hu" value="1"<?php checked( isset ( $get_language_choices['hu'] ) ); ?> /> Hungarian</div>
283
- <div><input type="checkbox" name="is" value="1"<?php checked( isset ( $get_language_choices['is'] ) ); ?> /> Icelandic</div>
284
- <div><input type="checkbox" name="id" value="1"<?php checked( isset ( $get_language_choices['id'] ) ); ?> /> Indonesian</div>
285
- <div><input type="checkbox" name="ga" value="1"<?php checked( isset ( $get_language_choices['ga'] ) ); ?> /> Irish</div>
286
- <div><input type="checkbox" name="it" value="1"<?php checked( isset ( $get_language_choices['it'] ) ); ?> /> Italian</div>
287
  </div>
288
 
289
  <div class="languages" style="width:25%; float:left">
290
- <div><input type="checkbox" name="ja" value="1"<?php checked( isset ( $get_language_choices['ja'] ) ); ?> /> Japanese</div>
291
- <div><input type="checkbox" name="jw" value="1"<?php checked( isset ( $get_language_choices['jw'] ) ); ?> /> Javanese</div>
292
- <div><input type="checkbox" name="kn" value="1"<?php checked( isset ( $get_language_choices['kn'] ) ); ?> /> Kannada</div>
293
- <div><input type="checkbox" name="km" value="1"<?php checked( isset ( $get_language_choices['km'] ) ); ?> /> Khmer</div>
294
- <div><input type="checkbox" name="ko" value="1"<?php checked( isset ( $get_language_choices['ko'] ) ); ?> /> Korean</div>
295
- <div><input type="checkbox" name="lo" value="1"<?php checked( isset ( $get_language_choices['lo'] ) ); ?> /> Lao</div>
296
- <div><input type="checkbox" name="la" value="1"<?php checked( isset ( $get_language_choices['la'] ) ); ?> /> Latin</div>
297
- <div><input type="checkbox" name="lv" value="1"<?php checked( isset ( $get_language_choices['lv'] ) ); ?> /> Latvian</div>
298
- <div><input type="checkbox" name="lt" value="1"<?php checked( isset ( $get_language_choices['lt'] ) ); ?> /> Lithuanian</div>
299
- <div><input type="checkbox" name="mk" value="1"<?php checked( isset ( $get_language_choices['mk'] ) ); ?> /> Macedonian</div>
300
- <div><input type="checkbox" name="ms" value="1"<?php checked( isset ( $get_language_choices['ms'] ) ); ?> /> Malay</div>
301
- <div><input type="checkbox" name="mt" value="1"<?php checked( isset ( $get_language_choices['mt'] ) ); ?> /> Maltese</div>
302
- <div><input type="checkbox" name="mr" value="1"<?php checked( isset ( $get_language_choices['mr'] ) ); ?> /> Marathi</div>
303
- <div><input type="checkbox" name="no" value="1"<?php checked( isset ( $get_language_choices['no'] ) ); ?> /> Norwegian</div>
304
- <div><input type="checkbox" name="fa" value="1"<?php checked( isset ( $get_language_choices['fa'] ) ); ?> /> Persian</div>
305
- <div><input type="checkbox" name="pl" value="1"<?php checked( isset ( $get_language_choices['pl'] ) ); ?> /> Polish</div>
306
- <div><input type="checkbox" name="pt" value="1"<?php checked( isset ( $get_language_choices['pt'] ) ); ?> /> Portuguese</div>
307
- <div><input type="checkbox" name="ro" value="1"<?php checked( isset ( $get_language_choices['ro'] ) ); ?> /> Romanian</div>
308
- <div><input type="checkbox" name="ru" value="1"<?php checked( isset ( $get_language_choices['ru'] ) ); ?> /> Russian</div>
309
  </div>
310
 
311
  <div class="languages" style="width:25%; float:left">
312
- <div><input type="checkbox" name="sr" value="1"<?php checked( isset ( $get_language_choices['sr'] ) ); ?> /> Serbian</div>
313
- <div><input type="checkbox" name="sk" value="1"<?php checked( isset ( $get_language_choices['sk'] ) ); ?> /> Slovak</div>
314
- <div><input type="checkbox" name="sl" value="1"<?php checked( isset ( $get_language_choices['sl'] ) ); ?> /> Slovenian</div>
315
- <div><input type="checkbox" name="es" value="1"<?php checked( isset ( $get_language_choices['es'] ) ); ?> /> Spanish</div>
316
- <div><input type="checkbox" name="sw" value="1"<?php checked( isset ( $get_language_choices['sw'] ) ); ?> /> Swahili</div>
317
- <div><input type="checkbox" name="sv" value="1"<?php checked( isset ( $get_language_choices['sv'] ) ); ?> /> Swedish</div>
318
- <div><input type="checkbox" name="ta" value="1"<?php checked( isset ( $get_language_choices['ta'] ) ); ?> /> Tamil</div>
319
- <div><input type="checkbox" name="te" value="1"<?php checked( isset ( $get_language_choices['te'] ) ); ?> /> Telugu</div>
320
- <div><input type="checkbox" name="th" value="1"<?php checked( isset ( $get_language_choices['th'] ) ); ?> /> Thai</div>
321
- <div><input type="checkbox" name="tr" value="1"<?php checked( isset ( $get_language_choices['tr'] ) ); ?> /> Turkish</div>
322
- <div><input type="checkbox" name="uk" value="1"<?php checked( isset ( $get_language_choices['uk'] ) ); ?> /> Ukranian</div>
323
- <div><input type="checkbox" name="ur" value="1"<?php checked( isset ( $get_language_choices['ur'] ) ); ?> /> Urdu</div>
324
- <div><input type="checkbox" name="vi" value="1"<?php checked( isset ( $get_language_choices['vi'] ) ); ?> /> Vietnamese</div>
325
- <div><input type="checkbox" name="cy" value="1"<?php checked( isset ( $get_language_choices['cy'] ) ); ?> /> Welsh</div>
326
- <div><input type="checkbox" name="yi" value="1"<?php checked( isset ( $get_language_choices['yi'] ) ); ?> /> Yiddish</div>
327
  </div>
328
- <div style="clear:both"></div>
329
 
330
- </td><td>
331
-
332
- </td>
333
- </tr>
334
-
335
- <tr>
336
- <td class="choose_flags_intro">Show flag images?<br/>(Display up to 7 flags above the translator)</td>
337
- <td class="choose_flags_intro">
338
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if(get_option('googlelanguagetranslator_flags')=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
339
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if(get_option('googlelanguagetranslator_flags')=='hide_flags'){echo "checked";}?>/> No, hide flag images
340
- </td>
341
- </tr>
342
-
343
- <tr>
344
- <td class="choose_flags">Choose the flags you want to display:</td>
345
-
346
- <td class="choose_flags">
347
- <div class="flagdisplay">
348
- <?php $get_flag_choices = get_option ('flag_display_settings'); ?>
349
- <div><input type="checkbox" name="flag-zh-CN" value="1"<?php checked( isset ( $get_flag_choices['flag-zh-CN'] ) ); ?> /> Chinese</div>
350
- <div><input type="checkbox" name="flag-en" value="1"<?php checked( isset ( $get_flag_choices['flag-en'] ) ); ?> /> English</div>
351
- <div><input type="checkbox" name="flag-fr" value="1"<?php checked( isset ( $get_flag_choices['flag-fr'] ) ); ?> /> French</div>
352
- <div><input type="checkbox" name="flag-de" value="1"<?php checked( isset ( $get_flag_choices['flag-de'] ) ); ?> /> German</div>
353
- <div><input type="checkbox" name="flag-it" value="1"<?php checked( isset ( $get_flag_choices['flag-it'] ) ); ?> /> Italian</div>
354
- <div><input type="checkbox" name="flag-es" value="1"<?php checked( isset ( $get_flag_choices['flag-es'] ) ); ?> /> Spanish</div>
355
- <div><input type="checkbox" name="flag-da" value="1"<?php checked( isset ( $get_flag_choices['flag-da'] ) ); ?> /> Danish</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
 
357
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
 
359
- <div style="clear:both"></div>
360
-
361
- </td>
362
- </tr>
363
-
364
- <tr>
365
- <td>Show translate box?</td>
366
- <td>
367
- <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
368
- <option value="yes" <?php if(get_option('googlelanguagetranslator_translatebox')=='yes'){echo "selected";}?>>Yes, show language box</option>
369
- <option value="no" <?php if(get_option('googlelanguagetranslator_translatebox')=='no'){echo "selected";}?>>No, hide language box</option>
370
- </select>
371
- </td>
372
- </tr>
 
 
 
 
 
 
 
373
 
374
- <tr>
375
- <td>Display options:</td>
376
- <td>
377
- <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
378
- <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
379
- <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
380
- </select> </td>
381
- </tr>
382
-
383
- <tr>
384
- <td>Show Google Toolbar?</td>
385
- <td>
386
- <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
387
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
388
- <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
389
- </select> </td>
390
- </tr>
391
-
392
- <tr>
393
- <td>Show Google Branding?<br/>
394
- <span>(<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a> about Google's Attribution Requirments.)</span>
395
- </td>
396
- <td>
397
- <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
398
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
399
- <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
400
- </select>
401
- </td>
402
- </tr>
403
-
404
- <tr>
405
- <td>&nbsp;</td>
406
- <td><input type="submit" class="button-primary" value="<?php _e('Update Option')?>" name="googlelanguagetranslator_update_options" /></td>
407
- </tr>
408
- <tr>
409
- <td>&nbsp;</td>
410
- <td>&nbsp;</td>
411
- </tr>
412
-
413
- <tr>
414
- <td>Copy/Paste This Shortcode:</td>
415
- <td>
416
- [google-translator]
417
- </td>
418
- </tr>
419
-
420
- </table>
421
- <input type="hidden" name="action" value="update" />
422
- <input type="hidden" name="page_options" value="googlelanguagetranslator_active" />
423
- </form>
424
- </div>
425
- </div>
426
-
427
- <div id="poststuff" class="metabox-holder" style="float: left; width: 48%;">
428
- <div class="postbox">
429
- <h3>Another Plugin You Might Like:</h3>
430
- <table class="form-table" width="100%">
431
- <tr><td align="left" valign="top">
432
- <table width="100%" border="0" cellspacing="0" cellpadding="4">
433
-
434
- <tr>
435
- <td>
436
- <div>
437
- <div>
438
- <div>
439
- <a href="http://wordpress.org/extend/plugins/malware-finder/" target="_blank">Malware Finder</a>
440
- This plugin enables you to look inside all your WordPress files at once to find malicious code.<br>
441
- </div>
442
- </div>
443
- </div>
444
- </td>
445
- </tr>
446
-
447
- <tr>
448
- <td><strong>You can also download this plugin at <a href="http://www.studio88design.com" target="_blank">www.studio88design.com</a></strong></td>
449
- </tr>
450
- </table>
451
- </td>
452
- </tr>
453
- </table></div></div>
454
- <div id="poststuff" class="metabox-holder" style="float: right; width: 48%;">
455
- <div class="postbox">
456
- <h3>Please Consider A Donation</h3>
457
- <div class="inside">
458
- If you like this plugin and find it useful, help keep this plugin actively developed by clicking the donate button <br /><br />
459
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
460
- <input type="hidden" name="cmd" value="_donations">
461
- <input type="hidden" name="business" value="robertmyrick@hotmail.com">
462
- <input type="hidden" name="lc" value="US">
463
- <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!">
464
- <input type="hidden" name="no_note" value="0">
465
- <input type="hidden" name="currency_code" value="USD">
466
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
467
- <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!">
468
- <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
469
- </form>
470
-
471
- <br />
472
- <br />
473
- </div>
474
- </div>
475
- </div>
476
- </div>
477
-
478
- <?php
479
- }
480
 
481
  function googlelanguagetranslator_included_languages() {
482
  if ( get_option('googlelanguagetranslator_language_option')=='specific') {
@@ -503,86 +915,652 @@ function googlelanguagetranslator_included_languages() {
503
  function googlelanguagetranslator_vertical(){
504
  $language_choices = googlelanguagetranslator_included_languages();
505
  if(get_option('googlelanguagetranslator_active')==1){
506
- $str.= '<div id="flags">
507
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\');return false;" title="English" class="flag english"></a>
508
-
509
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\');return false;" title="Spanish" class="flag spanish"></a>
510
-
511
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\');return false;" title="French" class="flag french"></a>
512
-
513
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\');return false;" title="Italian" class="flag italian"></a>
514
-
515
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\');return false;" title="German" class="flag german"></a>
516
-
517
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\');return false;" title="Danish" class="flag danish"></a>
518
-
519
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\');return false;" title="Chinese" class="flag chinese"></a>
520
-
521
- </div>
522
- <script type="text/javascript">
523
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  function GoogleLanguageTranslatorInit() {
525
  new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.'autoDisplay: false }, \'google_language_translator\');}
526
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
527
- <div id="google_language_translator"></div>';
528
- // $str.='<div id="google_translate_element"></div><script>
529
- //function googleTranslateElementInit() {
530
- //new google.translate.TranslateElement({
531
- //pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.'
532
- //}, \'google_translate_element\');
533
- //}
534
- //</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
535
- return '<div>'.$str.'</div>';
536
  }
537
  }
 
538
 
539
  function googlelanguagetranslator_horizontal(){
540
  $language_choices = googlelanguagetranslator_included_languages();
541
  if(get_option('googlelanguagetranslator_active')==1){
542
- $str.= '<div id="flags">
543
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\');return false;" title="English" class="flag english"></a>
544
-
545
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\');return false;" title="Spanish" class="flag spanish"></a>
546
-
547
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\');return false;" title="French" class="flag french"></a>
548
-
549
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\');return false;" title="Italian" class="flag italian"></a>
550
-
551
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\');return false;" title="German" class="flag german"></a>
552
-
553
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\');return false;" title="Danish" class="flag danish"></a>
554
-
555
- <a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\');return false;" title="Chinese" class="flag chinese"></a>
556
-
557
- </div>
558
- <script type="text/javascript">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  function GoogleLanguageTranslatorInit() {
560
  new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.' layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,autoDisplay: false }, \'google_language_translator\'); }
561
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
562
- <div id="google_language_translator"></div>';
563
- //$language_choices = googlelanguagetranslator_included_languages();
564
- //if(get_option('googlelanguagetranslator_active')==1){
565
- // $str.='<div id="google_translate_element"></div><script>
566
- //function googleTranslateElementInit() {
567
- // new google.translate.TranslateElement({
568
- // pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.' layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
569
- // }, \'google_translate_element\');
570
- //}
571
- //</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';
572
- return '<div>'.$str.'</div>';
573
  }
574
  }
575
 
 
576
  function googlelanguagetranslator_toolbar_yes(){
577
- if(get_option('googlelanguagetranslator_active')==1) { ?>
578
- <style type="text/css">
579
- #google_language_translator {color: transparent;}
580
- .goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
581
- .goog-tooltip {display: none !important;}
582
- .goog-tooltip:hover {display: none !important;}
583
- .goog-text-highlight {background-color: transparent !important; border: none !important;box-shadow: none !important;}
584
- </style>
585
- <?php
586
  }
587
  }
588
 
@@ -600,8 +1578,8 @@ body {top:0px !important;}
600
  function googlelanguagetranslator_showbranding_yes() {
601
  if(get_option('googlelanguagetranslator_active')==1) { ?>
602
  <style type="text/css">
603
- #google_language_translator { width:130px !important; }
604
- .goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
605
  .goog-tooltip {display: none !important;}
606
  .goog-tooltip:hover {display: none !important;}
607
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
@@ -646,80 +1624,762 @@ function googlelanguagetranslator_showbranding_no() {
646
 
647
  function googlelanguagetranslator_flags_display() { ?>
648
  <style type="text/css">
649
- #flags { width:140px; }
650
- #flags a { display:inline-block; width:16px; height:12px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
651
  </style>
652
- <?php $get_flag_choices = get_option ('flag_display_settings');
653
-
654
-
655
- if ( isset ( $get_flag_choices['flag-zh-CN'] ) && (get_option('googlelanguagetranslator_language_option')=='all') ) { ?>
656
  <style type="text/css">
657
- #flags a.chinese { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/china.png") 0px -1px no-repeat; }
658
  </style>
659
  <?php } else { ?>
660
  <style type="text/css">
661
- #flags a.chinese { display:none; }
662
  </style>
663
  <?php }
664
 
665
- if ( isset ( $get_flag_choices['flag-en'] ) && (get_option('googlelanguagetranslator_language_option')=='all') ) { ?>
 
 
 
 
 
 
 
 
 
 
666
  <style type="text/css">
667
- #flags a.english { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/united-kingdom.png") 0px -2px no-repeat; }
668
  </style>
669
  <?php } else { ?>
670
  <style type="text/css">
671
- #flags a.english { display:none; }
672
  </style>
673
  <?php }
674
 
675
- if ( isset ( $get_flag_choices['flag-fr'] ) && (get_option('googlelanguagetranslator_language_option')=='all') ) { ?>
676
  <style type="text/css">
677
- #flags a.french { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/france.png") 0px -1px no-repeat; }
678
  </style>
679
  <?php } else { ?>
680
  <style type="text/css">
681
- #flags a.french { display:none; }
682
  </style>
683
  <?php }
684
 
685
- if ( isset ( $get_flag_choices['flag-de'] ) && (get_option('googlelanguagetranslator_language_option')=='all') ) { ?>
686
  <style type="text/css">
687
- #flags a.german { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/germany.png") 0px -1px no-repeat; }
688
  </style>
689
  <?php } else { ?>
690
  <style type="text/css">
691
- #flags a.german { display:none; }
692
  </style>
693
  <?php }
694
 
695
- if ( isset ( $get_flag_choices['flag-it'] ) && (get_option('googlelanguagetranslator_language_option')=='all') ) { ?>
696
  <style type="text/css">
697
- #flags a.italian { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/italy.png") 0px -1px no-repeat; }
698
  </style>
699
  <?php } else { ?>
700
  <style type="text/css">
701
- #flags a.italian { display:none; }
702
  </style>
703
  <?php }
704
 
705
- if ( isset ( $get_flag_choices['flag-es'] ) && (get_option('googlelanguagetranslator_language_option')=='all') ) { ?>
706
  <style type="text/css">
707
- #flags a.spanish { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/spain.png") 0px -1px no-repeat; }
708
  </style>
709
  <?php } else { ?>
710
  <style type="text/css">
711
- #flags a.spanish { display:none; }
712
  </style>
713
  <?php }
714
 
715
- if ( isset ( $get_flag_choices['flag-da'] ) && (get_option('googlelanguagetranslator_language_option')=='all') ) { ?>
 
 
 
 
 
 
716
  <style type="text/css">
717
- #flags a.danish { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/denmark.png") 0px -1px no-repeat; }
718
  </style>
719
- <?php } else { ?>
 
 
 
 
 
 
720
  <style type="text/css">
721
- #flags a.danish { display:none; }
722
  </style>
723
  <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
  }
725
- add_action('wp_head','googlelanguagetranslator_flags_display');
 
 
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 2.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
+ //include_once ( plugins_url() . '/widget.php' );
11
+ include( plugin_dir_path( __FILE__ ) . 'widget.php');
12
 
13
+ function scripts($hook_suffix) {
14
+ global $p;
15
+ if ($p == $hook_suffix) {
16
+ wp_enqueue_script( 'my-admin-script', plugins_url('/admin.js',__FILE__), array('jquery'));
17
+ wp_enqueue_script( 'my-flag-script', plugins_url('/flags.js',__FILE__), array('jquery'));
18
+ wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
19
+ wp_enqueue_style( 'style.css' );
20
  }
21
  }
22
 
23
  function flags() {
24
  wp_enqueue_script( 'flags', plugins_url('/flags.js',__FILE__), array('jquery'));
25
+ wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
26
+ wp_enqueue_style( 'style.css' );
27
  }
28
  add_action('wp_enqueue_scripts', 'flags');
29
 
30
+ function page (){
31
+ global $p;
32
+
33
+ add_action( 'admin_enqueue_scripts', 'scripts');
34
+
35
+ $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', 'page_cb');
36
+ }
37
+ add_action('admin_menu', 'page');
 
38
 
39
  function google_translator_shortcode() {
40
  if (get_option('googlelanguagetranslator_display')=='Vertical'){
44
  elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
45
  return googlelanguagetranslator_horizontal();
46
  }
47
+ }
48
+
49
+ if (get_option('googlelanguagetranslator_toolbar')=='Yes') {
50
+ add_action ('wp_head','googlelanguagetranslator_toolbar_yes');
51
+ add_action ('admin_head','googlelanguagetranslator_toolbar_yes');
52
  }
53
 
54
  elseif(get_option('googlelanguagetranslator_toolbar')=='No'){
 
55
  add_action ('wp_head','googlelanguagetranslator_toolbar_no');
56
+ add_action ('admin_head','googlelanguagetranslator_toolbar_no');
57
  }
58
 
59
+ if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
 
60
  add_action ('wp_head','googlelanguagetranslator_showbranding_yes');
61
+ add_action ('admin_head','googlelanguagetranslator_showbranding_yes');
62
  }
63
 
64
+ elseif(get_option('googlelanguagetranslator_showbranding')=='No') {
 
65
  add_action ('wp_head','googlelanguagetranslator_showbranding_no');
66
+ add_action ('admin_head','googlelanguagetranslator_showbranding_no');
67
  }
68
+
69
+ if (get_option('googlelanguagetranslator_translatebox') == 'no') {
70
+ add_action ('wp_head', 'googlelanguagetranslator_translatebox');
71
+ add_action ('admin_head', 'googlelanguagetranslator_translatebox');
72
+ }
73
 
74
+ if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
75
+ add_action ('wp_head','googlelanguagetranslator_flags');
76
+ add_action ('admin_head','googlelanguagetranslator_flags');
77
+ }
78
 
79
+ if (get_option('googlelanguagetranslator_flags') == 'show_flags') {
80
+ add_action ('wp_head','googlelanguagetranslator_flags_display');
81
+ add_action ('admin_head','googlelanguagetranslator_flags_display');
82
+ }
83
+ add_shortcode( 'google-translator', 'google_translator_shortcode');
84
 
85
+ add_filter('widget_text', 'do_shortcode');
 
 
86
 
87
+ function page_cb() { ?>
88
+ <div class="wrap" style="width:89%">
89
+ <div id="icon-options-general" class="icon32"></div>
90
+ <h2><span class="notranslate">Google Language Translator</span></h2>
91
+ <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
92
+ <div class="postbox" style="width: 100%">
93
+ <h3 class="notranslate">Settings</h3>
94
+ <form action="<?php echo admin_url('options.php'); ?>" method="post">
95
+ <?php settings_fields('google_language_translator'); ?>
96
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
97
+ <tr>
98
+ <td class="notranslate">Plugin Status:</td>
99
+ <td class="notranslate"><?php googlelanguagetranslator_active_cb(); ?></td>
100
+ </tr>
101
+
102
+ <tr class="notranslate">
103
+ <td>Choose the original language of your website</td>
104
+ <td><?php googlelanguagetranslator_language_cb(); ?></td>
105
+ </tr>
106
+
107
+ <tr class="notranslate">
108
+ <td>What translation languages will you display to website visitors?<br/>(Note: To show flags you must choose "All Languages")</td>
109
+ <td><?php googlelanguagetranslator_language_option_cb(); ?></td>
110
+ </tr>
111
+
112
+ <tr class="notranslate">
113
+ <td colspan="2"><?php language_display_settings_cb(); ?></td>
114
+ </tr>
115
+
116
+ <tr class="notranslate">
117
+ <td class="choose_flags_intro">Show flag images?<br/>(Display up to 7 flags above the translator)</td>
118
+ <td class="choose_flags_intro"><?php googlelanguagetranslator_flags_cb(); ?></td>
119
+ </tr>
120
+
121
+ <tr class="notranslate">
122
+ <td class="choose_flags">Choose the flags you want to display:</td>
123
+ <td></td>
124
+ </tr>
125
+
126
+ <tr class="notranslate">
127
+ <td colspan="2" class="choose_flags"><?php flag_display_settings_cb(); ?></td>
128
+ </tr>
129
+
130
+ <tr class="notranslate">
131
+ <td>Show translate box?</td>
132
+ <td><?php googlelanguagetranslator_translatebox_cb(); ?></td>
133
+ </tr>
134
+
135
+ <tr class="notranslate">
136
+ <td>Layout options:</td>
137
+ <td><?php googlelanguagetranslator_display_cb(); ?></td>
138
+ </tr>
139
+
140
+ <tr class="notranslate">
141
+ <td>Show Google Toolbar?</td>
142
+ <td><?php googlelanguagetranslator_toolbar_cb(); ?></td>
143
+ </tr>
144
+
145
+ <tr class="notranslate">
146
+ <td>Show Google Branding?<br/>
147
+ <span>(<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a> about Google's Attribution Requirements.)</span>
148
+ </td>
149
+ <td><?php googlelanguagetranslator_showbranding_cb(); ?></td>
150
+ </tr>
151
+
152
+ <tr class="alignment notranslate">
153
+ <td class="flagdisplay">Align the translator left or right?<br/>(This option is for vertical layout only)</td>
154
+ <td class="flagdisplay"><?php googlelanguagetranslator_flags_alignment_cb(); ?></td>
155
+ </tr>
156
+
157
+ <tr class="notranslate">
158
+ <td>Copy/Paste this shortcode if adding to pages/posts:</td>
159
+ <td>[google-translator]</td>
160
+ </tr>
161
+
162
+ <tr class="notranslate">
163
+ <td>Copy/Paste this code if adding to header/footer:</td>
164
+ <td>&lt?php echo do_shortcode('[google-translator]'); ?&gt</td>
165
+ </tr>
166
+
167
+ <tr class="notranslate">
168
+ <td><?php submit_button(); ?></td>
169
+ <td></td>
170
+ </tr>
171
+ </table>
172
+ </form>
173
+ </div> <!-- .postbox -->
174
+ </div> <!-- .metbox-holder -->
175
+
176
+ <div class="metabox-holder" style="float:right; clear:right; width:33%; min-width:350px; ">
177
+ <div class="postbox">
178
+ <h3 class="notranslate">Preview</h3>
179
+ <table style="width:100%">
180
+ <tr>
181
+ <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>
182
+ </tr>
183
+ </table>
184
+ </div> <!-- .postbox -->
185
+ </div> <!-- .metabox-holder -->
186
+
187
 
188
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
189
+ <div class="postbox">
190
+ <h3>Please Consider A Donation</h3>
191
+ <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 />
192
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
193
+ <input type="hidden" name="cmd" value="_donations">
194
+ <input type="hidden" name="business" value="robertmyrick@hotmail.com">
195
+ <input type="hidden" name="lc" value="US">
196
+ <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!">
197
+ <input type="hidden" name="no_note" value="0">
198
+ <input type="hidden" name="currency_code" value="USD">
199
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
200
+ <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!">
201
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
202
+ </form>
203
 
204
+ <br />
205
+ <br />
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </div> <!-- .wrap -->
210
+ <?php
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
 
214
+ /* ------------------------------------------------------------------------ *
215
+ * Setting Registration
216
+ * ------------------------------------------------------------------------ */
217
 
218
+
219
+ function initialize_settings() {
220
+
221
+ // First, we register a section. This is necessary since all future options must belong to one.
222
+ add_settings_section(
223
+ 'glt_settings', // ID used to identify this section and with which to register options
224
+ 'Settings', // Title to be displayed on the administration page
225
+ '', // Callback used to render the description of the section
226
+ 'google_language_translator' // Page on which to add this section of options
227
+ );
228
+
229
+
230
+
231
+
232
 
233
+ //Fieldset 1
234
+ add_settings_field( 'googlelanguagetranslator_active','Plugin status:','googlelanguagetranslator_active_cb','google_language_translator','glt_settings');
235
+ add_settings_field( 'googlelanguagetranslator_language','Choose the original language of your website','','googlelanguagetranslator_language_cb','glt_settings');
236
+ add_settings_field( 'googlelanguagetranslator_language_option','What translation languages will you display to website visitors?','googlelanguagetranslator_language_option_cb','google_language_translator','glt_settings');
237
+ add_settings_field( 'language_display_settings','Your language choices','language_display_settings_cb','google_language_translator','glt_settings');
238
+ add_settings_field( 'googlelanguagetranslator_flags','Show Flag Images?','googlelanguagetranslator_flags_cb','google_language_translator','glt_settings');
239
+ add_settings_field( 'flag_display_settings','Flag Options','flag_display_settings_cb','google_language_translator','glt_settings');
240
+ add_settings_field( 'googlelanguagetranslator_translatebox','Show Translate Box?','googlelanguagetranslator_translatebox_cb','google_language_translator','glt_settings');
241
+ add_settings_field( 'googlelanguagetranslator_display', 'Layout Options','googlelanguagetranslator_display_cb','google_language_translator','glt_settings');
242
+ add_settings_field( 'googlelanguagetranslator_toolbar', 'Show Toolbar','googlelanguagetranslator_toolbar_cb','google_language_translator','glt_settings');
243
+ add_settings_field( 'googlelanguagetranslator_showbranding', 'Show Google Branding','googlelanguagetranslator_showbranding_cb','google_language_translator','glt_settings');
244
+ add_settings_field( 'googlelanguagetranslator_flags_alignment', 'Align Flags Right or Left', 'googlelanguagetranslator_flags_alignment_cb','google_language_translator','glt_settings');
245
+
246
+
247
+
248
+ //Register Fieldset 1
249
+ register_setting( 'google_language_translator','googlelanguagetranslator_active');
250
+ register_setting( 'google_language_translator','googlelanguagetranslator_language');
251
+ register_setting( 'google_language_translator','googlelanguagetranslator_language_option');
252
+ register_setting( 'google_language_translator','language_display_settings');
253
+ register_setting( 'google_language_translator','googlelanguagetranslator_flags');
254
+ register_setting( 'google_language_translator','flag_display_settings');
255
+ register_setting( 'google_language_translator','googlelanguagetranslator_translatebox');
256
+ register_setting( 'google_language_translator','googlelanguagetranslator_display');
257
+ register_setting( 'google_language_translator','googlelanguagetranslator_toolbar');
258
+ register_setting( 'google_language_translator','googlelanguagetranslator_showbranding');
259
+ register_setting( 'google_language_translator','googlelanguagetranslator_flags_alignment');
260
+
261
+ function googlelanguagetranslator_active_cb() {
262
+ $options = get_option( 'googlelanguagetranslator_active');
263
+ $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options['googlelanguagetranslator_active'],false).'/> &nbsp; Activate Google Language Translator?';
264
+ echo $html;
265
  }
266
+
267
+ function googlelanguagetranslator_language_cb() {
268
+ $options = get_option( 'googlelanguagetranslator_language' ); ?>
269
+ <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
270
+ <option value="af" <?php if($options=='af'){echo "selected";}?>>Afrikaans</option>
271
+ <option value="sq" <?php if($options=='sq'){echo "selected";}?>>Albanian</option>
272
+ <option value="ar" <?php if($options=='ar'){echo "selected";}?>>Arabic</option>
273
+ <option value="hy" <?php if($options=='hy'){echo "selected";}?>>Armenian</option>
274
+ <option value="az" <?php if($options=='az'){echo "selected";}?>>Azerbaijani</option>
275
+ <option value="eu" <?php if($options=='eu'){echo "selected";}?>>Basque</option>
276
+ <option value="be" <?php if($options=='be'){echo "selected";}?>>Belarusian</option>
277
+ <option value="bn" <?php if($options=='bn'){echo "selected";}?>>Bengali</option>
278
+ <option value="bs" <?php if($options=='bs'){echo "selected";}?>>Bosnian</option>
279
+ <option value="bg" <?php if($options=='bg'){echo "selected";}?>>Bulgarian</option>
280
+ <option value="ca" <?php if($options=='ca'){echo "selected";}?>>Catalan</option>
281
+ <option value="ceb" <?php if($options=='ceb'){echo "selected";}?>>Cebuano</option>
282
+ <option value="zh-CN" <?php if($options=='zh-CN'){echo "selected";}?>>Chinese</option>
283
+ <option value="zh-TW" <?php if($options=='zh-TW'){echo "selected";}?>>Chinese (Han)</option>
284
+ <option value="hr" <?php if($options=='hr'){echo "selected";}?>>Croatian</option>
285
+ <option value="cs" <?php if($options=='cs'){echo "selected";}?>>Czech</option>
286
+ <option value="da" <?php if($options=='da'){echo "selected";}?>>Danish</option>
287
+ <option value="nl" <?php if($options=='nl'){echo "selected";}?>>Dutch</option>
288
+ <option value="en" <?php if($options=='en'){echo "selected";}?>>English</option>
289
+ <option value="eo" <?php if($options=='eo'){echo "selected";}?>>Esperanto</option>
290
+ <option value="et" <?php if($options=='et'){echo "selected";}?>>Estonian</option>
291
+ <option value="tl" <?php if($options=='tl'){echo "selected";}?>>Filipino</option>
292
+ <option value="fi" <?php if($options=='fi'){echo "selected";}?>>Finnish</option>
293
+ <option value="fr" <?php if($options=='fr'){echo "selected";}?>>French</option>
294
+ <option value="gl" <?php if($options=='gl'){echo "selected";}?>>Galician</option>
295
+ <option value="ka" <?php if($options=='ka'){echo "selected";}?>>Georgian</option>
296
+ <option value="de" <?php if($options=='de'){echo "selected";}?>>German</option>
297
+ <option value="el" <?php if($options=='el'){echo "selected";}?>>Greek</option>
298
+ <option value="gu" <?php if($options=='gu'){echo "selected";}?>>Gujarati</option>
299
+ <option value="ht" <?php if($options=='ht'){echo "selected";}?>>Haitian</option>
300
+ <option value="iw" <?php if($options=='iw'){echo "selected";}?>>Hebrew</option>
301
+ <option value="hi" <?php if($options=='hi'){echo "selected";}?>>Hindi</option>
302
+ <option value="hmn" <?php if($options=='hmn'){echo "selected";}?>>Hmong</option>
303
+ <option value="hu" <?php if($options=='hu'){echo "selected";}?>>Hungarian</option>
304
+ <option value="is" <?php if($options=='is'){echo "selected";}?>>Icelandic</option>
305
+ <option value="id" <?php if($options=='id'){echo "selected";}?>>Indonesian</option>
306
+ <option value="ga" <?php if($options=='ga'){echo "selected";}?>>Irish</option>
307
+ <option value="it" <?php if($options=='it'){echo "selected";}?>>Italian</option>
308
+ <option value="ja" <?php if($options=='ja'){echo "selected";}?>>Japanese</option>
309
+ <option value="jw" <?php if($options=='jw'){echo "selected";}?>>Javanese</option>
310
+ <option value="kn" <?php if($options=='kn'){echo "selected";}?>>Kannada</option>
311
+ <option value="km" <?php if($options=='km'){echo "selected";}?>>Khmer</option>
312
+ <option value="ko" <?php if($options=='ko'){echo "selected";}?>>Korean</option>
313
+ <option value="lo" <?php if($options=='lo'){echo "selected";}?>>Lao</option>
314
+ <option value="la" <?php if($options=='la'){echo "selected";}?>>Latin</option>
315
+ <option value="lv" <?php if($options=='lv'){echo "selected";}?>>Latvian</option>
316
+ <option value="lt" <?php if($options=='lt'){echo "selected";}?>>Lithuanian</option>
317
+ <option value="mk" <?php if($options=='mk'){echo "selected";}?>>Macedonian</option>
318
+ <option value="ms" <?php if($options=='ms'){echo "selected";}?>>Malay</option>
319
+ <option value="mt" <?php if($options=='mt'){echo "selected";}?>>Maltese</option>
320
+ <option value="mr" <?php if($options=='mr'){echo "selected";}?>>Marathi</option>
321
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>Norwegian</option>
322
+ <option value="fa" <?php if($options=='fa'){echo "selected";}?>>Persian</option>
323
+ <option value="pl" <?php if($options=='pl'){echo "selected";}?>>Polish</option>
324
+ <option value="pt" <?php if($options=='pt'){echo "selected";}?>>Portuguese</option>
325
+ <option value="ro" <?php if($options=='ro'){echo "selected";}?>>Romanian</option>
326
+ <option value="ru" <?php if($options=='ru'){echo "selected";}?>>Russian</option>
327
+ <option value="sr" <?php if($options=='sr'){echo "selected";}?>>Serbian</option>
328
+ <option value="sk" <?php if($options=='sk'){echo "selected";}?>>Slovak</option>
329
+ <option value="sl" <?php if($options=='sl'){echo "selected";}?>>Slovenian</option>
330
+ <option value="es" <?php if($options=='es'){echo "selected";}?>>Spanish</option>
331
+ <option value="sw" <?php if($options=='sw'){echo "selected";}?>>Swahili</option>
332
+ <option value="sv" <?php if($options=='sv'){echo "selected";}?>>Swedish</option>
333
+ <option value="ta" <?php if($options=='ta'){echo "selected";}?>>Tamil</option>
334
+ <option value="te" <?php if($options=='te'){echo "selected";}?>>Telugu</option>
335
+ <option value="th" <?php if($options=='th'){echo "selected";}?>>Thai</option>
336
+ <option value="tr" <?php if($options=='tr'){echo "selected";}?>>Turkish</option>
337
+ <option value="uk" <?php if($options=='uk'){echo "selected";}?>>Ukranian</option>
338
+ <option value="ur" <?php if($options=='ur'){echo "selected";}?>>Urdu</option>
339
+ <option value="vi" <?php if($options=='vi'){echo "selected";}?>>Vietnamese</option>
340
+ <option value="cy" <?php if($options=='cy'){echo "selected";}?>>Welsh</option>
341
+ <option value="yi" <?php if($options=='yi'){echo "selected";}?>>Yiddish</option>
342
+ </select>
343
+ <?php
344
+ }
345
+
346
+ function googlelanguagetranslator_language_option_cb() {
347
+ $options = get_option('googlelanguagetranslator_language_option','all'); ?>
348
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
349
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
350
+ <?php }
351
+
352
+
353
+
354
+ function language_display_settings_cb() {
355
+ $get_language_choices = get_option ('language_display_settings'); ?>
356
+ <div class="languages" style="width:25%; float:left">
357
+ <div><input type="checkbox" name="language_display_settings[af]" value="1"<?php if ( 1 == $get_language_choices['af'] ) echo 'checked="checked"'; ?> /> Afrikaans</div>
358
+ <div><input type="checkbox" name="language_display_settings[sq]" value="1"<?php if ( 1 == $get_language_choices['sq'] ) echo 'checked="checked"'; ?> /> Albanian</div>
359
+ <div><input type="checkbox" name="language_display_settings[ar]" value="1"<?php if ( 1 == $get_language_choices['ar'] ) echo 'checked="checked"'; ?> /> Arabic</div>
360
+ <div><input type="checkbox" name="language_display_settings[hy]" value="1"<?php if ( 1 == $get_language_choices['hy'] ) echo 'checked="checked"'; ?> /> Armenian</div>
361
+ <div><input type="checkbox" name="language_display_settings[az]" value="1"<?php if ( 1 == $get_language_choices['az'] ) echo 'checked="checked"'; ?> /> Azerbaijani</div>
362
+ <div><input type="checkbox" name="language_display_settings[eu]" value="1"<?php if ( 1 == $get_language_choices['eu'] ) echo 'checked="checked"'; ?> /> Basque</div>
363
+ <div><input type="checkbox" name="language_display_settings[be]" value="1"<?php if ( 1 == $get_language_choices['be'] ) echo 'checked="checked"'; ?> /> Belarusian</div>
364
+ <div><input type="checkbox" name="language_display_settings[bn]" value="1"<?php if ( 1 == $get_language_choices['bn'] ) echo 'checked="checked"'; ?> /> Bengali</div>
365
+ <div><input type="checkbox" name="language_display_settings[bs]" value="1"<?php if ( 1 == $get_language_choices['bs'] ) echo 'checked="checked"'; ?> /> Bosnian</div>
366
+ <div><input type="checkbox" name="language_display_settings[bg]" value="1"<?php if ( 1 == $get_language_choices['bg'] ) echo 'checked="checked"'; ?> /> Bulgarian</div>
367
+ <div><input type="checkbox" name="language_display_settings[ca]" value="1"<?php if ( 1 == $get_language_choices['ca'] ) echo 'checked="checked"'; ?> /> Catalan</div>
368
+ <div><input type="checkbox" name="language_display_settings[ceb]" value="1"<?php if ( 1 == $get_language_choices['ceb'] ) echo 'checked="checked"'; ?> /> Cebuano</div>
369
+ <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>
370
+ <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>
371
+ <div><input type="checkbox" name="language_display_settings[hr]" value="1"<?php if ( 1 == $get_language_choices['hr'] ) echo 'checked="checked"'; ?> /> Croatian</div>
372
+ <div><input type="checkbox" name="language_display_settings[cs]" value="1"<?php if ( 1 == $get_language_choices['cs'] ) echo 'checked="checked"'; ?> /> Czech</div>
373
+ <div><input type="checkbox" name="language_display_settings[da]" value="1"<?php if ( 1 == $get_language_choices['da'] ) echo 'checked="checked"'; ?> /> Danish</div>
374
+ <div><input type="checkbox" name="language_display_settings[nl]" value="1"<?php if ( 1 == $get_language_choices['nl'] ) echo 'checked="checked"'; ?> /> Dutch</div>
375
+ <div><input type="checkbox" name="language_display_settings[en]" value="1"<?php if ( 1 == $get_language_choices['en'] ) echo 'checked="checked"'; ?> /> English</div>
376
  </div>
377
 
378
  <div class="languages" style="width:25%; float:left">
379
+ <div><input type="checkbox" name="language_display_settings[eo]" value="1"<?php if ( 1 == $get_language_choices['eo'] ) echo 'checked="checked"'; ?> /> Esperanto</div>
380
+ <div><input type="checkbox" name="language_display_settings[et]" value="1"<?php if ( 1 == $get_language_choices['et'] ) echo 'checked="checked"'; ?> /> Estonian</div>
381
+ <div><input type="checkbox" name="language_display_settings[tl]" value="1"<?php if ( 1 == $get_language_choices['tl'] ) echo 'checked="checked"'; ?> /> Filipino</div>
382
+ <div><input type="checkbox" name="language_display_settings[fi]" value="1"<?php if ( 1 == $get_language_choices['fi'] ) echo 'checked="checked"'; ?> /> Finnish</div>
383
+ <div><input type="checkbox" name="language_display_settings[fr]" value="1"<?php if ( 1 == $get_language_choices['fr'] ) echo 'checked="checked"'; ?> /> French</div>
384
+ <div><input type="checkbox" name="language_display_settings[gl]" value="1"<?php if ( 1 == $get_language_choices['gl'] ) echo 'checked="checked"'; ?> /> Galician</div>
385
+ <div><input type="checkbox" name="language_display_settings[ka]" value="1"<?php if ( 1 == $get_language_choices['ka'] ) echo 'checked="checked"'; ?> /> Georgian</div>
386
+ <div><input type="checkbox" name="language_display_settings[de]" value="1"<?php if ( 1 == $get_language_choices['de'] ) echo 'checked="checked"'; ?> /> German</div>
387
+ <div><input type="checkbox" name="language_display_settings[el]" value="1"<?php if ( 1 == $get_language_choices['el'] ) echo 'checked="checked"'; ?> /> Greek</div>
388
+ <div><input type="checkbox" name="language_display_settings[gu]" value="1"<?php if ( 1 == $get_language_choices['gu'] ) echo 'checked="checked"'; ?> /> Gujarati</div>
389
+ <div><input type="checkbox" name="language_display_settings[ht]" value="1"<?php if ( 1 == $get_language_choices['ht'] ) echo 'checked="checked"'; ?> /> Haitian</div>
390
+ <div><input type="checkbox" name="language_display_settings[iw]" value="1"<?php if ( 1 == $get_language_choices['iw'] ) echo 'checked="checked"'; ?> /> Hebrew</div>
391
+ <div><input type="checkbox" name="language_display_settings[hi]" value="1"<?php if ( 1 == $get_language_choices['hi'] ) echo 'checked="checked"'; ?> /> Hindi</div>
392
+ <div><input type="checkbox" name="language_display_settings[hmn]" value="1"<?php if ( 1 == $get_language_choices['hmn'] ) echo 'checked="checked"'; ?> /> Hmong</div>
393
+ <div><input type="checkbox" name="language_display_settings[hu]" value="1"<?php if ( 1 == $get_language_choices['hu'] ) echo 'checked="checked"'; ?> /> Hungarian</div>
394
+ <div><input type="checkbox" name="language_display_settings[is]" value="1"<?php if ( 1 == $get_language_choices['is'] ) echo 'checked="checked"'; ?> /> Icelandic</div>
395
+ <div><input type="checkbox" name="language_display_settings[id]" value="1"<?php if ( 1 == $get_language_choices['id'] ) echo 'checked="checked"'; ?> /> Indonesian</div>
396
+ <div><input type="checkbox" name="language_display_settings[ga]" value="1"<?php if ( 1 == $get_language_choices['ga'] ) echo 'checked="checked"'; ?> /> Irish</div>
397
+ <div><input type="checkbox" name="language_display_settings[it]" value="1"<?php if ( 1 == $get_language_choices['it'] ) echo 'checked="checked"'; ?> /> Italian</div>
398
  </div>
399
 
400
  <div class="languages" style="width:25%; float:left">
401
+ <div><input type="checkbox" name="language_display_settings[ja]" value="1"<?php if ( 1 == $get_language_choices['ja'] ) echo 'checked="checked"'; ?> /> Japanese</div>
402
+ <div><input type="checkbox" name="language_display_settings[jw]" value="1"<?php if ( 1 == $get_language_choices['jw'] ) echo 'checked="checked"'; ?> /> Javanese</div>
403
+ <div><input type="checkbox" name="language_display_settings[kn]" value="1"<?php if ( 1 == $get_language_choices['kn'] ) echo 'checked="checked"'; ?> /> Kannada</div>
404
+ <div><input type="checkbox" name="language_display_settings[km]" value="1"<?php if ( 1 == $get_language_choices['km'] ) echo 'checked="checked"'; ?> /> Khmer</div>
405
+ <div><input type="checkbox" name="language_display_settings[ko]" value="1"<?php if ( 1 == $get_language_choices['ko'] ) echo 'checked="checked"'; ?> /> Korean</div>
406
+ <div><input type="checkbox" name="language_display_settings[lo]" value="1"<?php if ( 1 == $get_language_choices['lo'] ) echo 'checked="checked"'; ?> /> Lao</div>
407
+ <div><input type="checkbox" name="language_display_settings[la]" value="1"<?php if ( 1 == $get_language_choices['la'] ) echo 'checked="checked"'; ?> /> Latin</div>
408
+ <div><input type="checkbox" name="language_display_settings[lv]" value="1"<?php if ( 1 == $get_language_choices['lv'] ) echo 'checked="checked"'; ?> /> Latvian</div>
409
+ <div><input type="checkbox" name="language_display_settings[lt]" value="1"<?php if ( 1 == $get_language_choices['lt'] ) echo 'checked="checked"'; ?> /> Lithuanian</div>
410
+ <div><input type="checkbox" name="language_display_settings[mk]" value="1"<?php if ( 1 == $get_language_choices['mk'] ) echo 'checked="checked"'; ?> /> Macedonian</div>
411
+ <div><input type="checkbox" name="language_display_settings[ms]" value="1"<?php if ( 1 == $get_language_choices['ms'] ) echo 'checked="checked"'; ?> /> Malay</div>
412
+ <div><input type="checkbox" name="language_display_settings[mt]" value="1"<?php if ( 1 == $get_language_choices['mt'] ) echo 'checked="checked"'; ?> /> Maltese</div>
413
+ <div><input type="checkbox" name="language_display_settings[mr]" value="1"<?php if ( 1 == $get_language_choices['mr'] ) echo 'checked="checked"'; ?> /> Marathi</div>
414
+ <div><input type="checkbox" name="language_display_settings[no]" value="1"<?php if ( 1 == $get_language_choices['no'] ) echo 'checked="checked"'; ?> /> Norwegian</div>
415
+ <div><input type="checkbox" name="language_display_settings[fa]" value="1"<?php if ( 1 == $get_language_choices['fa'] ) echo 'checked="checked"'; ?> /> Persian</div>
416
+ <div><input type="checkbox" name="language_display_settings[pl]" value="1"<?php if ( 1 == $get_language_choices['pl'] ) echo 'checked="checked"'; ?> /> Polish</div>
417
+ <div><input type="checkbox" name="language_display_settings[pt]" value="1"<?php if ( 1 == $get_language_choices['pt'] ) echo 'checked="checked"'; ?> /> Portuguese</div>
418
+ <div><input type="checkbox" name="language_display_settings[ro]" value="1"<?php if ( 1 == $get_language_choices['ro'] ) echo 'checked="checked"'; ?> /> Romanian</div>
419
+ <div><input type="checkbox" name="language_display_settings[ru]" value="1"<?php if ( 1 == $get_language_choices['ru'] ) echo 'checked="checked"'; ?> /> Russian</div>
420
  </div>
421
 
422
  <div class="languages" style="width:25%; float:left">
423
+ <div><input type="checkbox" name="language_display_settings[sr]" value="1"<?php if ( 1 == $get_language_choices['sr'] ) echo 'checked="checked"'; ?> /> Serbian</div>
424
+ <div><input type="checkbox" name="language_display_settings[sk]" value="1"<?php if ( 1 == $get_language_choices['sk'] ) echo 'checked="checked"'; ?> /> Slovak</div>
425
+ <div><input type="checkbox" name="language_display_settings[sl]" value="1"<?php if ( 1 == $get_language_choices['sl'] ) echo 'checked="checked"'; ?> /> Slovenian</div>
426
+ <div><input type="checkbox" name="language_display_settings[es]" value="1"<?php if ( 1 == $get_language_choices['es'] ) echo 'checked="checked"'; ?> /> Spanish</div>
427
+ <div><input type="checkbox" name="language_display_settings[sw]" value="1"<?php if ( 1 == $get_language_choices['sw'] ) echo 'checked="checked"'; ?> /> Swahili</div>
428
+ <div><input type="checkbox" name="language_display_settings[sv]" value="1"<?php if ( 1 == $get_language_choices['sv'] ) echo 'checked="checked"'; ?> /> Swedish</div>
429
+ <div><input type="checkbox" name="language_display_settings[ta]" value="1"<?php if ( 1 == $get_language_choices['ta'] ) echo 'checked="checked"'; ?> /> Tamil</div>
430
+ <div><input type="checkbox" name="language_display_settings[te]" value="1"<?php if ( 1 == $get_language_choices['te'] ) echo 'checked="checked"'; ?> /> Telugu</div>
431
+ <div><input type="checkbox" name="language_display_settings[th]" value="1"<?php if ( 1 == $get_language_choices['th'] ) echo 'checked="checked"'; ?> /> Thai</div>
432
+ <div><input type="checkbox" name="language_display_settings[tr]" value="1"<?php if ( 1 == $get_language_choices['tr'] ) echo 'checked="checked"'; ?> /> Turkish</div>
433
+ <div><input type="checkbox" name="language_display_settings[uk]" value="1"<?php if ( 1 == $get_language_choices['uk'] ) echo 'checked="checked"'; ?> /> Ukranian</div>
434
+ <div><input type="checkbox" name="language_display_settings[ur]" value="1"<?php if ( 1 == $get_language_choices['ur'] ) echo 'checked="checked"'; ?> /> Urdu</div>
435
+ <div><input type="checkbox" name="language_display_settings[vi]" value="1"<?php if ( 1 == $get_language_choices['vi'] ) echo 'checked="checked"'; ?> /> Vietnamese</div>
436
+ <div><input type="checkbox" name="language_display_settings[cy]" value="1"<?php if ( 1 == $get_language_choices['cy'] ) echo 'checked="checked"'; ?> /> Welsh</div>
437
+ <div><input type="checkbox" name="language_display_settings[yi]" value="1"<?php if ( 1 == $get_language_choices['yi'] ) echo 'checked="checked"'; ?> /> Yiddish</div>
438
  </div>
 
439
 
440
+ <div style="clear:both"></div>
441
+ <?php }
442
+
443
+ function googlelanguagetranslator_flags_cb() {
444
+ $options = get_option('googlelanguagetranslator_flags','hide_flags'); ?>
445
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
446
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
447
+ <?php }
448
+
449
+
450
+ function flag_display_settings_cb() {
451
+ $flag_defaults = array (
452
+ 'flag-en' => 1
453
+ );
454
+
455
+ $get_flag_choices = get_option ('flag_display_settings');
456
+
457
+ if (!isset ( $get_flag_choices ['flag-af'] ) ) {
458
+ $get_flag_choices['flag-af'] = 0;
459
+ }
460
+
461
+ if (!isset ( $get_flag_choices ['flag-sq'] ) ) {
462
+ $get_flag_choices['flag-sq'] = 0;
463
+ }
464
+
465
+ if (!isset ( $get_flag_choices ['flag-ar'] ) ) {
466
+ $get_flag_choices['flag-ar'] = 0;
467
+ }
468
+
469
+ if (!isset ( $get_flag_choices ['flag-hy'] ) ) {
470
+ $get_flag_choices['flag-hy'] = 0;
471
+ }
472
+
473
+ if (!isset ( $get_flag_choices ['flag-az'] ) ) {
474
+ $get_flag_choices['flag-az'] = 0;
475
+ }
476
+
477
+ if (!isset ( $get_flag_choices ['flag-eu'] ) ) {
478
+ $get_flag_choices['flag-eu'] = 0;
479
+ }
480
+
481
+ if (!isset ( $get_flag_choices ['flag-be'] ) ) {
482
+ $get_flag_choices['flag-be'] = 0;
483
+ }
484
+
485
+ if (!isset ( $get_flag_choices ['flag-bn'] ) ) {
486
+ $get_flag_choices['flag-bn'] = 0;
487
+ }
488
+
489
+ if (!isset ( $get_flag_choices ['flag-bs'] ) ) {
490
+ $get_flag_choices['flag-bs'] = 0;
491
+ }
492
+
493
+ if (!isset ( $get_flag_choices ['flag-bg'] ) ) {
494
+ $get_flag_choices['flag-bg'] = 0;
495
+ }
496
+
497
+ if (!isset ( $get_flag_choices ['flag-ca'] ) ) {
498
+ $get_flag_choices['flag-ca'] = 0;
499
+ }
500
+
501
+ if (!isset ( $get_flag_choices ['flag-ceb'] ) ) {
502
+ $get_flag_choices['flag-ceb'] = 0;
503
+ }
504
+
505
+ if (!isset ( $get_flag_choices ['flag-zh-CN'] ) ) {
506
+ $get_flag_choices['flag-zh-CN'] = 0;
507
+ }
508
+
509
+ if (!isset ( $get_flag_choices ['flag-zh-TW'] ) ) {
510
+ $get_flag_choices['flag-zh-TW'] = 0;
511
+ }
512
+
513
+ if (!isset ( $get_flag_choices ['flag-hr'] ) ) {
514
+ $get_flag_choices['flag-hr'] = 0;
515
+ }
516
+
517
+ if (!isset ( $get_flag_choices ['flag-cs'] ) ) {
518
+ $get_flag_choices['flag-cs'] = 0;
519
+ }
520
+
521
+ if (!isset ( $get_flag_choices ['flag-da'] ) ) {
522
+ $get_flag_choices['flag-da'] = 0;
523
+ }
524
+
525
+ if (!isset ( $get_flag_choices ['flag-nl'] ) ) {
526
+ $get_flag_choices['flag-nl'] = 0;
527
+ }
528
+
529
+ if (!isset ( $get_flag_choices ['flag-en'] ) ) {
530
+ $get_flag_choices['flag-en'] = 0;
531
+ update_option ('flag_display_settings',$flag_defaults);
532
+ }
533
+
534
+ if (!isset ( $get_flag_choices ['flag-eo'] ) ) {
535
+ $get_flag_choices['flag-eo'] = 0;
536
+ }
537
+
538
+ if (!isset ( $get_flag_choices ['flag-et'] ) ) {
539
+ $get_flag_choices['flag-et'] = 0;
540
+ }
541
+
542
+ if (!isset ( $get_flag_choices ['flag-tl'] ) ) {
543
+ $get_flag_choices['flag-tl'] = 0;
544
+ }
545
+
546
+ if (!isset ( $get_flag_choices ['flag-fi'] ) ) {
547
+ $get_flag_choices['flag-fi'] = 0;
548
+ }
549
+
550
+ if (!isset ( $get_flag_choices ['flag-fr'] ) ) {
551
+ $get_flag_choices['flag-fr'] = 0;
552
+ }
553
+
554
+ if (!isset ( $get_flag_choices ['flag-gl'] ) ) {
555
+ $get_flag_choices['flag-gl'] = 0;
556
+ }
557
+
558
+ if (!isset ( $get_flag_choices ['flag-ka'] ) ) {
559
+ $get_flag_choices['flag-ka'] = 0;
560
+ }
561
+
562
+ if (!isset ( $get_flag_choices ['flag-de'] ) ) {
563
+ $get_flag_choices['flag-de'] = 0;
564
+ }
565
+
566
+ if (!isset ( $get_flag_choices ['flag-el'] ) ) {
567
+ $get_flag_choices['flag-el'] = 0;
568
+ }
569
+
570
+ if (!isset ( $get_flag_choices ['flag-gu'] ) ) {
571
+ $get_flag_choices['flag-gu'] = 0;
572
+ }
573
+
574
+ if (!isset ( $get_flag_choices ['flag-ht'] ) ) {
575
+ $get_flag_choices['flag-ht'] = 0;
576
+ }
577
+
578
+ if (!isset ( $get_flag_choices ['flag-iw'] ) ) {
579
+ $get_flag_choices['flag-iw'] = 0;
580
+ }
581
+
582
+ if (!isset ( $get_flag_choices ['flag-hi'] ) ) {
583
+ $get_flag_choices['flag-hi'] = 0;
584
+ }
585
+
586
+ if (!isset ( $get_flag_choices ['flag-hmn'] ) ) {
587
+ $get_flag_choices['flag-hmn'] = 0;
588
+ }
589
+
590
+ if (!isset ( $get_flag_choices ['flag-hu'] ) ) {
591
+ $get_flag_choices['flag-hu'] = 0;
592
+ }
593
+
594
+ if (!isset ( $get_flag_choices ['flag-is'] ) ) {
595
+ $get_flag_choices['flag-is'] = 0;
596
+ }
597
+
598
+ if (!isset ( $get_flag_choices ['flag-id'] ) ) {
599
+ $get_flag_choices['flag-id'] = 0;
600
+ }
601
+
602
+ if (!isset ( $get_flag_choices ['flag-ga'] ) ) {
603
+ $get_flag_choices['flag-ga'] = 0;
604
+ }
605
+
606
+ if (!isset ( $get_flag_choices ['flag-it'] ) ) {
607
+ $get_flag_choices['flag-it'] = 0;
608
+ }
609
+
610
+ if (!isset ( $get_flag_choices ['flag-ja'] ) ) {
611
+ $get_flag_choices['flag-ja'] = 0;
612
+ }
613
+
614
+ if (!isset ( $get_flag_choices ['flag-jw'] ) ) {
615
+ $get_flag_choices['flag-jw'] = 0;
616
+ }
617
+
618
+ if (!isset ( $get_flag_choices ['flag-kn'] ) ) {
619
+ $get_flag_choices['flag-kn'] = 0;
620
+ }
621
+
622
+ if (!isset ( $get_flag_choices ['flag-km'] ) ) {
623
+ $get_flag_choices['flag-km'] = 0;
624
+ }
625
+
626
+ if (!isset ( $get_flag_choices ['flag-ko'] ) ) {
627
+ $get_flag_choices['flag-ko'] = 0;
628
+ }
629
+
630
+ if (!isset ( $get_flag_choices ['flag-lo'] ) ) {
631
+ $get_flag_choices['flag-lo'] = 0;
632
+ }
633
+
634
+ if (!isset ( $get_flag_choices ['flag-la'] ) ) {
635
+ $get_flag_choices['flag-la'] = 0;
636
+ }
637
+
638
+ if (!isset ( $get_flag_choices ['flag-lv'] ) ) {
639
+ $get_flag_choices['flag-lv'] = 0;
640
+ }
641
+
642
+ if (!isset ( $get_flag_choices ['flag-lt'] ) ) {
643
+ $get_flag_choices['flag-lt'] = 0;
644
+ }
645
+
646
+ if (!isset ( $get_flag_choices ['flag-mk'] ) ) {
647
+ $get_flag_choices['flag-mk'] = 0;
648
+ }
649
+
650
+ if (!isset ( $get_flag_choices ['flag-ms'] ) ) {
651
+ $get_flag_choices['flag-ms'] = 0;
652
+ }
653
+
654
+ if (!isset ( $get_flag_choices ['flag-mt'] ) ) {
655
+ $get_flag_choices['flag-mt'] = 0;
656
+ }
657
+
658
+ if (!isset ( $get_flag_choices ['flag-mr'] ) ) {
659
+ $get_flag_choices['flag-mr'] = 0;
660
+ }
661
+
662
+ if (!isset ( $get_flag_choices ['flag-no'] ) ) {
663
+ $get_flag_choices['flag-no'] = 0;
664
+ }
665
+
666
+ if (!isset ( $get_flag_choices ['flag-fa'] ) ) {
667
+ $get_flag_choices['flag-fa'] = 0;
668
+ }
669
+
670
+ if (!isset ( $get_flag_choices ['flag-pl'] ) ) {
671
+ $get_flag_choices['flag-pl'] = 0;
672
+ }
673
+
674
+ if (!isset ( $get_flag_choices ['flag-pt'] ) ) {
675
+ $get_flag_choices['flag-pt'] = 0;
676
+ }
677
+
678
+ if (!isset ( $get_flag_choices ['flag-ro'] ) ) {
679
+ $get_flag_choices['flag-ro'] = 0;
680
+ }
681
+
682
+ if (!isset ( $get_flag_choices ['flag-ru'] ) ) {
683
+ $get_flag_choices['flag-ru'] = 0;
684
+ }
685
+
686
+ if (!isset ( $get_flag_choices ['flag-sr'] ) ) {
687
+ $get_flag_choices['flag-sr'] = 0;
688
+ }
689
+
690
+ if (!isset ( $get_flag_choices ['flag-sk'] ) ) {
691
+ $get_flag_choices['flag-sk'] = 0;
692
+ }
693
+
694
+ if (!isset ( $get_flag_choices ['flag-sl'] ) ) {
695
+ $get_flag_choices['flag-sl'] = 0;
696
+ }
697
+
698
+ if (!isset ( $get_flag_choices ['flag-sw'] ) ) {
699
+ $get_flag_choices['flag-es'] = 0;
700
+ }
701
+
702
+ if (!isset ( $get_flag_choices ['flag-sw'] ) ) {
703
+ $get_flag_choices['flag-sw'] = 0;
704
+ }
705
+
706
+ if (!isset ( $get_flag_choices ['flag-sv'] ) ) {
707
+ $get_flag_choices['flag-sv'] = 0;
708
+ }
709
+
710
+ if (!isset ( $get_flag_choices ['flag-ta'] ) ) {
711
+ $get_flag_choices['flag-ta'] = 0;
712
+ }
713
+
714
+ if (!isset ( $get_flag_choices ['flag-te'] ) ) {
715
+ $get_flag_choices['flag-te'] = 0;
716
+ }
717
+
718
+ if (!isset ( $get_flag_choices ['flag-th'] ) ) {
719
+ $get_flag_choices['flag-th'] = 0;
720
+ }
721
+
722
+ if (!isset ( $get_flag_choices ['flag-tr'] ) ) {
723
+ $get_flag_choices['flag-tr'] = 0;
724
+ }
725
+
726
+ if (!isset ( $get_flag_choices ['flag-uk'] ) ) {
727
+ $get_flag_choices['flag-uk'] = 0;
728
+ }
729
+
730
+ if (!isset ( $get_flag_choices ['flag-ur'] ) ) {
731
+ $get_flag_choices['flag-ur'] = 0;
732
+ }
733
+
734
+ if (!isset ( $get_flag_choices ['flag-vi'] ) ) {
735
+ $get_flag_choices['flag-vi'] = 0;
736
+ }
737
+
738
+ if (!isset ( $get_flag_choices ['flag-cy'] ) ) {
739
+ $get_flag_choices['flag-cy'] = 0;
740
+ }
741
+
742
+ if (!isset ( $get_flag_choices ['flag-yi'] ) ) {
743
+ $get_flag_choices['flag-yi'] = 0;
744
+ }
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+ ?>
754
+ <div class="flagdisplay" style="width:25%; float:left">
755
+
756
+ <div><input type="checkbox" name="flag_display_settings[flag-af]" value="1" <?php checked( 1,$get_flag_choices['flag-af']); ?> /> Afrikaans</div>
757
+
758
+
759
+ <div><input type="checkbox" name="flag_display_settings[flag-sq]" value="1" <?php checked( 1,$get_flag_choices['flag-sq']); ?> /> Albanian</div>
760
+ <div><input type="checkbox" name="flag_display_settings[flag-ar]" value="1" <?php checked( 1,$get_flag_choices['flag-ar']); ?> /> Arabic</div>
761
+ <div><input type="checkbox" name="flag_display_settings[flag-hy]" value="1" <?php checked( 1,$get_flag_choices['flag-hy']); ?> /> Armenian</div>
762
+ <div><input type="checkbox" name="flag_display_settings[flag-az]" value="1" <?php checked( 1,$get_flag_choices['flag-az']); ?> /> Azerbaijani</div>
763
+ <div><input type="checkbox" name="flag_display_settings[flag-eu]" value="1" <?php checked( 1,$get_flag_choices['flag-eu']); ?> /> Basque</div>
764
+ <div><input type="checkbox" name="flag_display_settings[flag-be]" value="1" <?php checked( 1,$get_flag_choices['flag-be']); ?> /> Belarusian</div>
765
+ <div><input type="checkbox" name="flag_display_settings[flag-bn]" value="1" <?php checked( 1,$get_flag_choices['flag-bn']); ?> /> Bengali</div>
766
+ <div><input type="checkbox" name="flag_display_settings[flag-bs]" value="1" <?php checked( 1,$get_flag_choices['flag-bs']); ?> /> Bosnian</div>
767
+ <div><input type="checkbox" name="flag_display_settings[flag-bg]" value="1" <?php checked( 1,$get_flag_choices['flag-bg']); ?> /> Bulgarian</div>
768
+ <div><input type="checkbox" name="flag_display_settings[flag-ca]" value="1" <?php checked( 1,$get_flag_choices['flag-ca']); ?> /> Catalan</div>
769
+ <div><input type="checkbox" name="flag_display_settings[flag-ceb]" value="1" <?php checked( 1,$get_flag_choices['flag-ceb']); ?> /> Cebuano</div>
770
+ <div><input type="checkbox" name="flag_display_settings[flag-zh-CN]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-CN']); ?> /> Chinese</div>
771
+ <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>
772
+ <div><input type="checkbox" name="flag_display_settings[flag-hr]" value="1" <?php checked( 1,$get_flag_choices['flag-hr']); ?> /> Croatian</div>
773
+ <div><input type="checkbox" name="flag_display_settings[flag-cs]" value="1" <?php checked( 1,$get_flag_choices['flag-cs']); ?> /> Czech</div>
774
+ <div><input type="checkbox" name="flag_display_settings[flag-da]" value="1" <?php checked( 1,$get_flag_choices['flag-da']); ?> /> Danish</div>
775
+ <div><input type="checkbox" name="flag_display_settings[flag-nl]" value="1" <?php checked( 1,$get_flag_choices['flag-nl']); ?> /> Dutch</div>
776
+ <div><input type="checkbox" name="flag_display_settings[flag-en]" value="1" <?php checked(1,$get_flag_choices['flag-en']); ?> /> English</div>
777
+ </div>
778
 
779
+ <div class="flagdisplay" style="width:25%; float:left">
780
+ <div><input type="checkbox" name="flag_display_settings[flag-eo]" value="1"<?php checked( 1,$get_flag_choices['flag-eo']); ?> /> Esperanto</div>
781
+ <div><input type="checkbox" name="flag_display_settings[flag-et]" value="1"<?php checked( 1,$get_flag_choices['flag-et']); ?> /> Estonian</div>
782
+ <div><input type="checkbox" name="flag_display_settings[flag-tl]" value="1"<?php checked( 1,$get_flag_choices['flag-tl']); ?> /> Filipino</div>
783
+ <div><input type="checkbox" name="flag_display_settings[flag-fi]" value="1"<?php checked( 1,$get_flag_choices['flag-fi']); ?> /> Finnish</div>
784
+ <div><input type="checkbox" name="flag_display_settings[flag-fr]" value="1"<?php checked( 1,$get_flag_choices['flag-fr']); ?> /> French</div>
785
+ <div><input type="checkbox" name="flag_display_settings[flag-gl]" value="1"<?php checked( 1,$get_flag_choices['flag-gl']); ?> /> Galician</div>
786
+ <div><input type="checkbox" name="flag_display_settings[flag-ka]" value="1"<?php checked( 1,$get_flag_choices['flag-ka']); ?> /> Georgian</div>
787
+ <div><input type="checkbox" name="flag_display_settings[flag-de]" value="1"<?php checked( 1,$get_flag_choices['flag-de']); ?> /> German</div>
788
+ <div><input type="checkbox" name="flag_display_settings[flag-el]" value="1"<?php checked( 1,$get_flag_choices['flag-el']); ?> /> Greek</div>
789
+ <div><input type="checkbox" name="flag_display_settings[flag-gu]" value="1"<?php checked( 1,$get_flag_choices['flag-gu']); ?> /> Gujarati</div>
790
+ <div><input type="checkbox" name="flag_display_settings[flag-ht]" value="1"<?php checked( 1,$get_flag_choices['flag-ht']); ?> /> Haitian</div>
791
+ <div><input type="checkbox" name="flag_display_settings[flag-iw]" value="1"<?php checked( 1,$get_flag_choices['flag-iw']); ?> /> Hebrew</div>
792
+ <div><input type="checkbox" name="flag_display_settings[flag-hi]" value="1"<?php checked( 1,$get_flag_choices['flag-hi']); ?> /> Hindi</div>
793
+ <div><input type="checkbox" name="flag_display_settings[flag-hmn]" value="1"<?php checked( 1,$get_flag_choices['flag-hmn']); ?> /> Hmong</div>
794
+ <div><input type="checkbox" name="flag_display_settings[flag-hu]" value="1"<?php checked( 1,$get_flag_choices['flag-hu']); ?> /> Hungarian</div>
795
+ <div><input type="checkbox" name="flag_display_settings[flag-is]" value="1"<?php checked( 1,$get_flag_choices['flag-is']); ?> /> Icelandic</div>
796
+ <div><input type="checkbox" name="flag_display_settings[flag-id]" value="1"<?php checked( 1,$get_flag_choices['flag-id']); ?> /> Indonesian</div>
797
+ <div><input type="checkbox" name="flag_display_settings[flag-ga]" value="1"<?php checked( 1,$get_flag_choices['flag-ga']); ?> /> Irish</div>
798
+ <div><input type="checkbox" name="flag_display_settings[flag-it]" value="1"<?php checked( 1,$get_flag_choices['flag-it']); ?> /> Italian</div>
799
+ </div>
800
 
801
+ <div class="flagdisplay" style="width:25%; float:left">
802
+ <div><input type="checkbox" name="flag_display_settings[flag-ja]" value="1"<?php checked( 1,$get_flag_choices['flag-ja']); ?> /> Japanese</div>
803
+ <div><input type="checkbox" name="flag_display_settings[flag-jw]" value="1"<?php checked( 1,$get_flag_choices['flag-jw']); ?> /> Javanese</div>
804
+ <div><input type="checkbox" name="flag_display_settings[flag-kn]" value="1"<?php checked( 1,$get_flag_choices['flag-kn']); ?> /> Kannada</div>
805
+ <div><input type="checkbox" name="flag_display_settings[flag-km]" value="1"<?php checked( 1,$get_flag_choices['flag-km']); ?> /> Khmer</div>
806
+ <div><input type="checkbox" name="flag_display_settings[flag-ko]" value="1"<?php checked( 1,$get_flag_choices['flag-ko']); ?> /> Korean</div>
807
+ <div><input type="checkbox" name="flag_display_settings[flag-lo]" value="1"<?php checked( 1,$get_flag_choices['flag-lo']); ?> /> Lao</div>
808
+ <div><input type="checkbox" name="flag_display_settings[flag-la]" value="1"<?php checked( 1,$get_flag_choices['flag-la']); ?> /> Latin</div>
809
+ <div><input type="checkbox" name="flag_display_settings[flag-lv]" value="1"<?php checked( 1,$get_flag_choices['flag-lv']); ?> /> Latvian</div>
810
+ <div><input type="checkbox" name="flag_display_settings[flag-lt]" value="1"<?php checked( 1,$get_flag_choices['flag-lt']); ?> /> Lithuanian</div>
811
+ <div><input type="checkbox" name="flag_display_settings[flag-mk]" value="1"<?php checked( 1,$get_flag_choices['flag-mk']); ?> /> Macedonian</div>
812
+ <div><input type="checkbox" name="flag_display_settings[flag-ms]" value="1"<?php checked( 1,$get_flag_choices['flag-ms']); ?> /> Malay</div>
813
+ <div><input type="checkbox" name="flag_display_settings[flag-mt]" value="1"<?php checked( 1,$get_flag_choices['flag-mt']); ?> /> Maltese</div>
814
+ <div><input type="checkbox" name="flag_display_settings[flag-mr]" value="1"<?php checked( 1,$get_flag_choices['flag-mr']); ?> /> Marathi</div>
815
+ <div><input type="checkbox" name="flag_display_settings[flag-no]" value="1"<?php checked( 1,$get_flag_choices['flag-no']); ?> /> Norwegian</div>
816
+ <div><input type="checkbox" name="flag_display_settings[flag-fa]" value="1"<?php checked( 1,$get_flag_choices['flag-fa']); ?> /> Persian</div>
817
+ <div><input type="checkbox" name="flag_display_settings[flag-pl]" value="1"<?php checked( 1,$get_flag_choices['flag-pl']); ?> /> Polish</div>
818
+ <div><input type="checkbox" name="flag_display_settings[flag-pt]" value="1"<?php checked( 1,$get_flag_choices['flag-pt']); ?> /> Portuguese</div>
819
+ <div><input type="checkbox" name="flag_display_settings[flag-ro]" value="1"<?php checked( 1,$get_flag_choices['flag-ro']); ?> /> Romanian</div>
820
+ <div><input type="checkbox" name="flag_display_settings[flag-ru]" value="1"<?php checked( 1,$get_flag_choices['flag-ru']); ?> /> Russian</div>
821
+ </div>
822
 
823
+ <div class="flagdisplay" style="width:25%; float:left">
824
+ <div><input type="checkbox" name="flag_display_settings[flag-sr]" value="1"<?php checked( 1,$get_flag_choices['flag-sr']); ?> /> Serbian</div>
825
+ <div><input type="checkbox" name="flag_display_settings[flag-sk]" value="1"<?php checked( 1,$get_flag_choices['flag-sk']); ?> /> Slovak</div>
826
+ <div><input type="checkbox" name="flag_display_settings[flag-sl]" value="1"<?php checked( 1,$get_flag_choices['flag-sl']); ?> /> Slovenian</div>
827
+ <div><input type="checkbox" name="flag_display_settings[flag-es]" value="1"<?php checked( 1,$get_flag_choices['flag-es']); ?> /> Spanish</div>
828
+ <div><input type="checkbox" name="flag_display_settings[flag-sw]" value="1"<?php checked( 1,$get_flag_choices['flag-sw']); ?> /> Swahili</div>
829
+ <div><input type="checkbox" name="flag_display_settings[flag-sv]" value="1"<?php checked( 1,$get_flag_choices['flag-sv']); ?> /> Swedish</div>
830
+ <div><input type="checkbox" name="flag_display_settings[flag-ta]" value="1"<?php checked( 1,$get_flag_choices['flag-ta']); ?> /> Tamil</div>
831
+ <div><input type="checkbox" name="flag_display_settings[flag-te]" value="1"<?php checked( 1,$get_flag_choices['flag-te']); ?> /> Telugu</div>
832
+ <div><input type="checkbox" name="flag_display_settings[flag-th]" value="1"<?php checked( 1,$get_flag_choices['flag-th']); ?> /> Thai</div>
833
+ <div><input type="checkbox" name="flag_display_settings[flag-tr]" value="1"<?php checked( 1,$get_flag_choices['flag-tr']); ?> /> Turkish</div>
834
+ <div><input type="checkbox" name="flag_display_settings[flag-uk]" value="1"<?php checked( 1,$get_flag_choices['flag-uk']); ?> /> Ukranian</div>
835
+ <div><input type="checkbox" name="flag_display_settings[flag-ur]" value="1"<?php checked( 1,$get_flag_choices['flag-ur']); ?> /> Urdu</div>
836
+ <div><input type="checkbox" name="flag_display_settings[flag-vi]" value="1"<?php checked( 1,$get_flag_choices['flag-vi']); ?> /> Vietnamese</div>
837
+ <div><input type="checkbox" name="flag_display_settings[flag-cy]" value="1"<?php checked( 1,$get_flag_choices['flag-cy']); ?> /> Welsh</div>
838
+ <div><input type="checkbox" name="flag_display_settings[flag-yi]" value="1"<?php checked( 1,$get_flag_choices['flag-yi']); ?> /> Yiddish</div>
839
+
840
+
841
+ </div>
842
+ <div style="clear:both"></div>
843
+ <?php }
844
+
845
+ function googlelanguagetranslator_translatebox_cb() {
846
+ $options = get_option('googlelanguagetranslator_translatebox'); ?>
847
+
848
+ <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
849
+ <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
850
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
851
+ </select>
852
+ <?php }
853
+
854
+ function googlelanguagetranslator_display_cb() {
855
+ $options = get_option('googlelanguagetranslator_display'); ?>
856
+ <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
857
+ <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
858
+ <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
859
+ </select>
860
+ <?php }
861
+
862
+ function googlelanguagetranslator_toolbar_cb() {
863
+ $options = get_option('googlelanguagetranslator_toolbar'); ?>
864
+ <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
865
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
866
+ <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
867
+ </select>
868
+ <?php }
869
+
870
+ function googlelanguagetranslator_showbranding_cb() {
871
+ $options = get_option('googlelanguagetranslator_showbranding'); ?>
872
+ <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
873
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
874
+ <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
875
+ </select>
876
+ <?php }
877
+
878
+ function googlelanguagetranslator_flags_alignment_cb() {
879
+ $options = get_option('googlelanguagetranslator_flags_alignment'); ?>
880
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="googlelanguagetranslator_flags_alignment" value="flags_left" <?php if(get_option('googlelanguagetranslator_flags_alignment')=='flags_left'){echo "checked";}?>/> Align Left<br/>
881
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="googlelanguagetranslator_flags_alignment" value="flags_right" <?php if(get_option('googlelanguagetranslator_flags_alignment')=='flags_right'){echo "checked";}?>/> Align Right
882
+ <?php }
883
+
884
+
885
+
886
+
887
+ } //End initialize_settings()
888
+ add_action('admin_init', 'initialize_settings');
889
+
890
+
891
+ // Functions for frontend display
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
892
 
893
  function googlelanguagetranslator_included_languages() {
894
  if ( get_option('googlelanguagetranslator_language_option')=='specific') {
915
  function googlelanguagetranslator_vertical(){
916
  $language_choices = googlelanguagetranslator_included_languages();
917
  if(get_option('googlelanguagetranslator_active')==1){
918
+ $get_flag_choices = get_option ('flag_display_settings');
919
+
920
+ $str='<div id="flags">';
921
+
922
+ foreach ($get_flag_choices as $key) {
923
+ //print_r($key);
924
+ }
925
+ if ($key == '1') {
926
+ if ( isset ( $get_flag_choices['flag-af'] ) ) {
927
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|af\'); return false;" title="Afrikaans" class="flag af"></a>';
928
+ }
929
+
930
+
931
+ if ( isset ( $get_flag_choices['flag-sq'] ) ) {
932
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sq\'); return false;" title="Albanian" class="flag sq"></a>';
933
+ }
934
+
935
+ if ( isset ( $get_flag_choices['flag-ar'] ) ) {
936
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ar\'); return false;" title="Arabic" class="flag ar"></a>';
937
+ }
938
+
939
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
940
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
941
+ }
942
+
943
+ if ( isset ( $get_flag_choices['flag-az'] ) ) {
944
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|az\'); return false;" title="Azerbaijani" class="flag az"></a>';
945
+ }
946
+
947
+ if ( isset ( $get_flag_choices['flag-eu'] ) ) {
948
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eu\'); return false;" title="Basque" class="flag eu"></a>';
949
+ }
950
+
951
+ if ( isset ( $get_flag_choices['flag-be'] ) ) {
952
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|be\'); return false;" title="Belarusian" class="flag be"></a>';
953
+ }
954
+
955
+ if ( isset ( $get_flag_choices['flag-bn'] ) ) {
956
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bn\'); return false;" title="Bengali" class="flag bn"></a>';
957
+ }
958
+
959
+ if ( isset ( $get_flag_choices['flag-bs'] ) ) {
960
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bs\'); return false;" title="Bosnian" class="flag bs"></a>';
961
+ }
962
+
963
+ if ( isset ( $get_flag_choices['flag-bg'] ) ) {
964
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bg\'); return false;" title="Bulgarian" class="flag bg"></a>';
965
+ }
966
+
967
+ if ( isset ( $get_flag_choices['flag-ca'] ) ) {
968
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ca\'); return false;" title="Catalan" class="flag ca"></a>';
969
+ }
970
+
971
+ if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
972
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ceb\'); return false;" title="Cebuano" class="flag ceb"></a>';
973
+ }
974
+
975
+ if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
976
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\'); return false;" title="Chinese (Simplified)" class="flag zh-CN"></a>';
977
+ }
978
+
979
+ if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
980
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-TW\'); return false;" title="Chinese (Traditional)" class="flag zh-TW"></a>';
981
+ }
982
+
983
+ if ( isset ( $get_flag_choices['flag-cs'] ) ) {
984
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cs\'); return false;" title="Czech Republic" class="flag cs"></a>';
985
+ }
986
+
987
+ if ( isset ( $get_flag_choices['flag-hr'] ) ) {
988
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hr\'); return false;" title="Croatian" class="flag hr"></a>';
989
+ }
990
+
991
+ if ( isset ( $get_flag_choices['flag-da'] ) ) {
992
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\'); return false;" title="Danish" class="flag da"></a>';
993
+ }
994
+
995
+ if ( isset ( $get_flag_choices['flag-nl'] ) ) {
996
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|nl\'); return false;" title="Netherlands" class="flag nl"></a>';
997
+ }
998
+
999
+ if ( isset ( $get_flag_choices['flag-en'] ) ) {
1000
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\'); return false;" title="English" class="flag en"></a>';
1001
+ }
1002
+
1003
+ if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1004
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eo\'); return false;" title="Esperanto" class="flag eo"></a>';
1005
+ }
1006
+
1007
+ if ( isset ( $get_flag_choices['flag-et'] ) ) {
1008
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|et\'); return false;" title="Estonian" class="flag et"></a>';
1009
+ }
1010
+
1011
+ if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1012
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tl\'); return false;" title="Filipino" class="flag tl"></a>';
1013
+ }
1014
+
1015
+ if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1016
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fi\'); return false;" title="Finnish" class="flag fi"></a>';
1017
+ }
1018
+
1019
+ if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1020
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\'); return false;" title="French" class="flag fr"></a>';
1021
+ }
1022
+
1023
+ if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1024
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gl\'); return false;" title="Galician" class="flag gl"></a>';
1025
+ }
1026
+
1027
+ if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1028
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ka\'); return false;" title="Georgian" class="flag ka"></a>';
1029
+ }
1030
+
1031
+ if ( isset ( $get_flag_choices['flag-de'] ) ) {
1032
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\'); return false;" title="German" class="flag de"></a>';
1033
+ }
1034
+
1035
+ if ( isset ( $get_flag_choices['flag-el'] ) ) {
1036
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|el\'); return false;" title="Greek" class="flag el"></a>';
1037
+ }
1038
+
1039
+ if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1040
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gu\'); return false;" title="Gujarati" class="flag gu"></a>';
1041
+ }
1042
+
1043
+ if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1044
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ht\'); return false;" title="Haitian" class="flag ht"></a>';
1045
+ }
1046
+
1047
+ if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1048
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|iw\'); return false;" title="Hebrew" class="flag iw"></a>';
1049
+ }
1050
+
1051
+ if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1052
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hi\'); return false;" title="Hindi" class="flag hi"></a>';
1053
+ }
1054
+
1055
+ if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1056
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hmn\'); return false;" title="Hmong" class="flag hmn"></a>';
1057
+ }
1058
+
1059
+ if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1060
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hu\'); return false;" title="Hungarian" class="flag hu"></a>';
1061
+ }
1062
+
1063
+ if ( isset ( $get_flag_choices['flag-is'] ) ) {
1064
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|is\'); return false;" title="Iceland" class="flag is"></a>';
1065
+ }
1066
+
1067
+ if ( isset ( $get_flag_choices['flag-id'] ) ) {
1068
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|id\'); return false;" title="Indonesian" class="flag id"></a>';
1069
+ }
1070
+
1071
+ if ( isset ( $get_flag_choices['flag-ga'] ) ) {
1072
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ga\'); return false;" title="Irish" class="flag ga"></a>';
1073
+ }
1074
+
1075
+ if ( isset ( $get_flag_choices['flag-it'] ) ) {
1076
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\'); return false;" title="Italian" class="flag it"></a>';
1077
+ }
1078
+
1079
+ if ( isset ( $get_flag_choices['flag-ja'] ) ) {
1080
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ja\'); return false;" title="Japanese" class="flag ja"></a>';
1081
+ }
1082
+
1083
+ if ( isset ( $get_flag_choices['flag-jw'] ) ) {
1084
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|jw\'); return false;" title="Javanese" class="flag jw"></a>';
1085
+ }
1086
+
1087
+ if ( isset ( $get_flag_choices['flag-kn'] ) ) {
1088
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|kn\'); return false;" title="Kannada" class="flag kn"></a>';
1089
+ }
1090
+
1091
+ if ( isset ( $get_flag_choices['flag-km'] ) ) {
1092
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|km\'); return false;" title="Khmer" class="flag km"></a>';
1093
+ }
1094
+
1095
+ if ( isset ( $get_flag_choices['flag-ko'] ) ) {
1096
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ko\'); return false;" title="Korean" class="flag ko"></a>';
1097
+ }
1098
+
1099
+ if ( isset ( $get_flag_choices['flag-lo'] ) ) {
1100
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lo\'); return false;" title="Lao" class="flag lo"></a>';
1101
+ }
1102
+
1103
+ if ( isset ( $get_flag_choices['flag-la'] ) ) {
1104
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|la\'); return false;" title="Latin" class="flag la"></a>';
1105
+ }
1106
+
1107
+ if ( isset ( $get_flag_choices['flag-lv'] ) ) {
1108
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lv\'); return false;" title="Latvian" class="flag lv"></a>';
1109
+ }
1110
+
1111
+ if ( isset ( $get_flag_choices['flag-lt'] ) ) {
1112
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lt\'); return false;" title="Lithuanian" class="flag lt"></a>';
1113
+ }
1114
+
1115
+ if ( isset ( $get_flag_choices['flag-mk'] ) ) {
1116
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mk\'); return false;" title="Macedonian" class="flag mk"></a>';
1117
+ }
1118
+
1119
+ if ( isset ( $get_flag_choices['flag-ms'] ) ) {
1120
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ms\'); return false;" title="Malay" class="flag ms"></a>';
1121
+ }
1122
+
1123
+ if ( isset ( $get_flag_choices['flag-mt'] ) ) {
1124
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mt\'); return false;" title="Maltese" class="flag mt"></a>';
1125
+ }
1126
+
1127
+ if ( isset ( $get_flag_choices['flag-mr'] ) ) {
1128
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mr\'); return false;" title="Marathi" class="flag mr"></a>';
1129
+ }
1130
+
1131
+ if ( isset ( $get_flag_choices['flag-no'] ) ) {
1132
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|no\'); return false;" title="Norwegian" class="flag no"></a>';
1133
+ }
1134
+
1135
+ if ( isset ( $get_flag_choices['flag-fa'] ) ) {
1136
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fa\'); return false;" title="Persian" class="flag fa"></a>';
1137
+ }
1138
+
1139
+ if ( isset ( $get_flag_choices['flag-pl'] ) ) {
1140
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pl\'); return false;" title="Polish" class="flag pl"></a>';
1141
+ }
1142
+
1143
+ if ( isset ( $get_flag_choices['flag-pt'] ) ) {
1144
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pt\'); return false;" title="Portuguese" class="flag pt"></a>';
1145
+ }
1146
+
1147
+ if ( isset ( $get_flag_choices['flag-ro'] ) ) {
1148
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ro\'); return false;" title="Romanian" class="flag ro"></a>';
1149
+ }
1150
+
1151
+ if ( isset ( $get_flag_choices['flag-ru'] ) ) {
1152
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ru\'); return false;" title="Russian" class="flag ru"></a>';
1153
+ }
1154
+
1155
+ if ( isset ( $get_flag_choices['flag-sr'] ) ) {
1156
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sr\'); return false;" title="Serbian" class="flag sr"></a>';
1157
+ }
1158
+
1159
+ if ( isset ( $get_flag_choices['flag-sk'] ) ) {
1160
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sk\'); return false;" title="Slovak" class="flag sk"></a>';
1161
+ }
1162
+
1163
+ if ( isset ( $get_flag_choices['flag-sl'] ) ) {
1164
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sl\'); return false;" title="Slovenian" class="flag sl"></a>';
1165
+ }
1166
+
1167
+ if ( isset ( $get_flag_choices['flag-es'] ) ) {
1168
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\'); return false;" title="Spanish" class="flag es"></a>';
1169
+ }
1170
+
1171
+ if ( isset ( $get_flag_choices['flag-sw'] ) ) {
1172
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sw\'); return false;" title="Swahili" class="flag sw"></a>';
1173
+ }
1174
+
1175
+ if ( isset ( $get_flag_choices['flag-sv'] ) ) {
1176
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sv\'); return false;" title="Swedish" class="flag sv"></a>';
1177
+ }
1178
+
1179
+ if ( isset ( $get_flag_choices['flag-ta'] ) ) {
1180
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ta\'); return false;" title="Tamil" class="flag ta"></a>';
1181
+ }
1182
+
1183
+ if ( isset ( $get_flag_choices['flag-te'] ) ) {
1184
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|te\'); return false;" title="Telugu" class="flag te"></a>';
1185
+ }
1186
+
1187
+ if ( isset ( $get_flag_choices['flag-th'] ) ) {
1188
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|th\'); return false;" title="haiT" class="flag th"></a>';
1189
+ }
1190
+
1191
+ if ( isset ( $get_flag_choices['flag-tr'] ) ) {
1192
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tr\'); return false;" title="Turkish" class="flag tr"></a>';
1193
+ }
1194
+
1195
+ if ( isset ( $get_flag_choices['flag-uk'] ) ) {
1196
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|uk\'); return false;" title="Ukranian" class="flag uk"></a>';
1197
+ }
1198
+
1199
+ if ( isset ( $get_flag_choices['flag-ur'] ) ) {
1200
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ur\'); return false;" title="Urdu" class="flag ur"></a>';
1201
+ }
1202
+
1203
+ if ( isset ( $get_flag_choices['flag-vi'] ) ) {
1204
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|vi\'); return false;" title="Vietnamese" class="flag vi"></a>';
1205
+ }
1206
+
1207
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1208
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
1209
+ }
1210
+
1211
+ if ( isset ( $get_flag_choices['flag-cy'] ) ) {
1212
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cy\'); return false;" title="Welsh" class="flag cy"></a>';
1213
+ }
1214
+
1215
+ if ( isset ( $get_flag_choices['flag-yi'] ) ) {
1216
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|yi\'); return false;" title="Yiddish (Jewish)" class="flag yi"></a>';
1217
+ }
1218
+
1219
+
1220
+ // }
1221
+
1222
+ $str.='<div class="glt-clear"></div>';
1223
+ $str.='</div>';
1224
+ $str.='<script type="text/javascript">
1225
  function GoogleLanguageTranslatorInit() {
1226
  new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.'autoDisplay: false }, \'google_language_translator\');}
1227
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
1228
+ <div id="google_language_translator"></div>';
1229
+ return $str;
 
 
 
 
 
 
 
1230
  }
1231
  }
1232
+ }
1233
 
1234
  function googlelanguagetranslator_horizontal(){
1235
  $language_choices = googlelanguagetranslator_included_languages();
1236
  if(get_option('googlelanguagetranslator_active')==1){
1237
+ $get_flag_choices = get_option ('flag_display_settings');
1238
+
1239
+ $str = '<div id="flags">';
1240
+
1241
+ foreach ($get_flag_choices as $key) {
1242
+ //print_r($key);
1243
+ }
1244
+ if ($key == '1') {
1245
+ if ( isset ( $get_flag_choices['flag-af'] ) ) {
1246
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|af\'); return false;" title="Afrikaans" class="flag af"></a>';
1247
+ }
1248
+
1249
+
1250
+ if ( isset ( $get_flag_choices['flag-sq'] ) ) {
1251
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sq\'); return false;" title="Albanian" class="flag sq"></a>';
1252
+ }
1253
+
1254
+ if ( isset ( $get_flag_choices['flag-ar'] ) ) {
1255
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ar\'); return false;" title="Arabic" class="flag ar"></a>';
1256
+ }
1257
+
1258
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1259
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
1260
+ }
1261
+
1262
+ if ( isset ( $get_flag_choices['flag-az'] ) ) {
1263
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|az\'); return false;" title="Azerbaijani" class="flag az"></a>';
1264
+ }
1265
+
1266
+ if ( isset ( $get_flag_choices['flag-eu'] ) ) {
1267
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eu\'); return false;" title="Basque" class="flag eu"></a>';
1268
+ }
1269
+
1270
+ if ( isset ( $get_flag_choices['flag-be'] ) ) {
1271
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|be\'); return false;" title="Belarusian" class="flag be"></a>';
1272
+ }
1273
+
1274
+ if ( isset ( $get_flag_choices['flag-bn'] ) ) {
1275
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bn\'); return false;" title="Bengali" class="flag bn"></a>';
1276
+ }
1277
+
1278
+ if ( isset ( $get_flag_choices['flag-bs'] ) ) {
1279
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bs\'); return false;" title="Bosnian" class="flag bs"></a>';
1280
+ }
1281
+
1282
+ if ( isset ( $get_flag_choices['flag-bg'] ) ) {
1283
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bg\'); return false;" title="Bulgarian" class="flag bg"></a>';
1284
+ }
1285
+
1286
+ if ( isset ( $get_flag_choices['flag-ca'] ) ) {
1287
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ca\'); return false;" title="Catalan" class="flag ca"></a>';
1288
+ }
1289
+
1290
+ if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
1291
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ceb\'); return false;" title="Cebuano" class="flag ceb"></a>';
1292
+ }
1293
+
1294
+ if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
1295
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\'); return false;" title="Chinese (Simplified)" class="flag zh-CN"></a>';
1296
+ }
1297
+
1298
+ if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
1299
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-TW\'); return false;" title="Chinese (Traditional)" class="flag zh-TW"></a>';
1300
+ }
1301
+
1302
+ if ( isset ( $get_flag_choices['flag-cs'] ) ) {
1303
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cs\'); return false;" title="Czech Republic" class="flag cs"></a>';
1304
+ }
1305
+
1306
+ if ( isset ( $get_flag_choices['flag-hr'] ) ) {
1307
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hr\'); return false;" title="Croatian" class="flag hr"></a>';
1308
+ }
1309
+
1310
+ if ( isset ( $get_flag_choices['flag-da'] ) ) {
1311
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\'); return false;" title="Danish" class="flag da"></a>';
1312
+ }
1313
+
1314
+ if ( isset ( $get_flag_choices['flag-nl'] ) ) {
1315
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|nl\'); return false;" title="Netherlands" class="flag nl"></a>';
1316
+ }
1317
+
1318
+ if ( isset ( $get_flag_choices['flag-en'] ) ) {
1319
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\'); return false;" title="English" class="flag en"></a>';
1320
+ }
1321
+
1322
+ if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1323
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eo\'); return false;" title="Esperanto" class="flag eo"></a>';
1324
+ }
1325
+
1326
+ if ( isset ( $get_flag_choices['flag-et'] ) ) {
1327
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|et\'); return false;" title="Estonian" class="flag et"></a>';
1328
+ }
1329
+
1330
+ if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1331
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tl\'); return false;" title="Filipino" class="flag tl"></a>';
1332
+ }
1333
+
1334
+ if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1335
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fi\'); return false;" title="Finnish" class="flag fi"></a>';
1336
+ }
1337
+
1338
+ if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1339
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\'); return false;" title="French" class="flag fr"></a>';
1340
+ }
1341
+
1342
+ if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1343
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gl\'); return false;" title="Galician" class="flag gl"></a>';
1344
+ }
1345
+
1346
+ if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1347
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ka\'); return false;" title="Georgian" class="flag ka"></a>';
1348
+ }
1349
+
1350
+ if ( isset ( $get_flag_choices['flag-de'] ) ) {
1351
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\'); return false;" title="German" class="flag de"></a>';
1352
+ }
1353
+
1354
+ if ( isset ( $get_flag_choices['flag-el'] ) ) {
1355
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|el\'); return false;" title="Greek" class="flag el"></a>';
1356
+ }
1357
+
1358
+ if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1359
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gu\'); return false;" title="Gujarati" class="flag gu"></a>';
1360
+ }
1361
+
1362
+ if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1363
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ht\'); return false;" title="Haitian" class="flag ht"></a>';
1364
+ }
1365
+
1366
+ if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1367
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|iw\'); return false;" title="Hebrew" class="flag iw"></a>';
1368
+ }
1369
+
1370
+ if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1371
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hi\'); return false;" title="Hindi" class="flag hi"></a>';
1372
+ }
1373
+
1374
+ if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1375
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hmn\'); return false;" title="Hmong" class="flag hmn"></a>';
1376
+ }
1377
+
1378
+ if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1379
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hu\'); return false;" title="Hungarian" class="flag hu"></a>';
1380
+ }
1381
+
1382
+ if ( isset ( $get_flag_choices['flag-is'] ) ) {
1383
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|is\'); return false;" title="Iceland" class="flag is"></a>';
1384
+ }
1385
+
1386
+ if ( isset ( $get_flag_choices['flag-id'] ) ) {
1387
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|id\'); return false;" title="Indonesian" class="flag id"></a>';
1388
+ }
1389
+
1390
+ if ( isset ( $get_flag_choices['flag-ga'] ) ) {
1391
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ga\'); return false;" title="Irish" class="flag ga"></a>';
1392
+ }
1393
+
1394
+ if ( isset ( $get_flag_choices['flag-it'] ) ) {
1395
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\'); return false;" title="Italian" class="flag it"></a>';
1396
+ }
1397
+
1398
+ if ( isset ( $get_flag_choices['flag-ja'] ) ) {
1399
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ja\'); return false;" title="Japanese" class="flag ja"></a>';
1400
+ }
1401
+
1402
+ if ( isset ( $get_flag_choices['flag-jw'] ) ) {
1403
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|jw\'); return false;" title="Javanese" class="flag jw"></a>';
1404
+ }
1405
+
1406
+ if ( isset ( $get_flag_choices['flag-kn'] ) ) {
1407
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|kn\'); return false;" title="Kannada" class="flag kn"></a>';
1408
+ }
1409
+
1410
+ if ( isset ( $get_flag_choices['flag-km'] ) ) {
1411
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|km\'); return false;" title="Khmer" class="flag km"></a>';
1412
+ }
1413
+
1414
+ if ( isset ( $get_flag_choices['flag-ko'] ) ) {
1415
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ko\'); return false;" title="Korean" class="flag ko"></a>';
1416
+ }
1417
+
1418
+ if ( isset ( $get_flag_choices['flag-lo'] ) ) {
1419
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lo\'); return false;" title="Lao" class="flag lo"></a>';
1420
+ }
1421
+
1422
+ if ( isset ( $get_flag_choices['flag-la'] ) ) {
1423
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|la\'); return false;" title="Latin" class="flag la"></a>';
1424
+ }
1425
+
1426
+ if ( isset ( $get_flag_choices['flag-lv'] ) ) {
1427
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lv\'); return false;" title="Latvian" class="flag lv"></a>';
1428
+ }
1429
+
1430
+ if ( isset ( $get_flag_choices['flag-lt'] ) ) {
1431
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lt\'); return false;" title="Lithuanian" class="flag lt"></a>';
1432
+ }
1433
+
1434
+ if ( isset ( $get_flag_choices['flag-mk'] ) ) {
1435
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mk\'); return false;" title="Macedonian" class="flag mk"></a>';
1436
+ }
1437
+
1438
+ if ( isset ( $get_flag_choices['flag-ms'] ) ) {
1439
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ms\'); return false;" title="Malay" class="flag ms"></a>';
1440
+ }
1441
+
1442
+ if ( isset ( $get_flag_choices['flag-mt'] ) ) {
1443
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mt\'); return false;" title="Maltese" class="flag mt"></a>';
1444
+ }
1445
+
1446
+ if ( isset ( $get_flag_choices['flag-mr'] ) ) {
1447
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mr\'); return false;" title="Marathi" class="flag mr"></a>';
1448
+ }
1449
+
1450
+ if ( isset ( $get_flag_choices['flag-no'] ) ) {
1451
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|no\'); return false;" title="Norwegian" class="flag no"></a>';
1452
+ }
1453
+
1454
+ if ( isset ( $get_flag_choices['flag-fa'] ) ) {
1455
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fa\'); return false;" title="Persian" class="flag fa"></a>';
1456
+ }
1457
+
1458
+ if ( isset ( $get_flag_choices['flag-pl'] ) ) {
1459
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pl\'); return false;" title="Polish" class="flag pl"></a>';
1460
+ }
1461
+
1462
+ if ( isset ( $get_flag_choices['flag-pt'] ) ) {
1463
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pt\'); return false;" title="Portuguese" class="flag pt"></a>';
1464
+ }
1465
+
1466
+ if ( isset ( $get_flag_choices['flag-ro'] ) ) {
1467
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ro\'); return false;" title="Romanian" class="flag ro"></a>';
1468
+ }
1469
+
1470
+ if ( isset ( $get_flag_choices['flag-ru'] ) ) {
1471
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ru\'); return false;" title="Russian" class="flag ru"></a>';
1472
+ }
1473
+
1474
+ if ( isset ( $get_flag_choices['flag-sr'] ) ) {
1475
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sr\'); return false;" title="Serbian" class="flag sr"></a>';
1476
+ }
1477
+
1478
+ if ( isset ( $get_flag_choices['flag-sk'] ) ) {
1479
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sk\'); return false;" title="Slovak" class="flag sk"></a>';
1480
+ }
1481
+
1482
+ if ( isset ( $get_flag_choices['flag-sl'] ) ) {
1483
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sl\'); return false;" title="Slovenian" class="flag sl"></a>';
1484
+ }
1485
+
1486
+ if ( isset ( $get_flag_choices['flag-es'] ) ) {
1487
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\'); return false;" title="Spanish" class="flag es"></a>';
1488
+ }
1489
+
1490
+ if ( isset ( $get_flag_choices['flag-sw'] ) ) {
1491
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sw\'); return false;" title="Swahili" class="flag sw"></a>';
1492
+ }
1493
+
1494
+ if ( isset ( $get_flag_choices['flag-sv'] ) ) {
1495
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sv\'); return false;" title="Swedish" class="flag sv"></a>';
1496
+ }
1497
+
1498
+ if ( isset ( $get_flag_choices['flag-ta'] ) ) {
1499
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ta\'); return false;" title="Tamil" class="flag ta"></a>';
1500
+ }
1501
+
1502
+ if ( isset ( $get_flag_choices['flag-te'] ) ) {
1503
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|te\'); return false;" title="Telugu" class="flag te"></a>';
1504
+ }
1505
+
1506
+ if ( isset ( $get_flag_choices['flag-th'] ) ) {
1507
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|th\'); return false;" title="haiT" class="flag th"></a>';
1508
+ }
1509
+
1510
+ if ( isset ( $get_flag_choices['flag-tr'] ) ) {
1511
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tr\'); return false;" title="Turkish" class="flag tr"></a>';
1512
+ }
1513
+
1514
+ if ( isset ( $get_flag_choices['flag-uk'] ) ) {
1515
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|uk\'); return false;" title="Ukranian" class="flag uk"></a>';
1516
+ }
1517
+
1518
+ if ( isset ( $get_flag_choices['flag-ur'] ) ) {
1519
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ur\'); return false;" title="Urdu" class="flag ur"></a>';
1520
+ }
1521
+
1522
+ if ( isset ( $get_flag_choices['flag-vi'] ) ) {
1523
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|vi\'); return false;" title="Vietnamese" class="flag vi"></a>';
1524
+ }
1525
+
1526
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1527
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
1528
+ }
1529
+
1530
+ if ( isset ( $get_flag_choices['flag-cy'] ) ) {
1531
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cy\'); return false;" title="Welsh" class="flag cy"></a>';
1532
+ }
1533
+
1534
+ if ( isset ( $get_flag_choices['flag-yi'] ) ) {
1535
+ $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|yi\'); return false;" title="Yiddish (Jewish)" class="flag yi"></a>';
1536
+ }
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+ $str.='</div>';
1543
+ $str.='<script type="text/javascript">
1544
  function GoogleLanguageTranslatorInit() {
1545
  new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.' layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,autoDisplay: false }, \'google_language_translator\'); }
1546
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
1547
+ <div id="google_language_translator"></div>';
1548
+ return $str;
1549
+ }
 
 
 
 
 
 
 
 
1550
  }
1551
  }
1552
 
1553
+
1554
  function googlelanguagetranslator_toolbar_yes(){
1555
+ if(get_option('googlelanguagetranslator_active')==1) {
1556
+ $str='<style type="text/css">';
1557
+ $str.='#google_language_translator {color: transparent;}';
1558
+ $str.='.goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}';
1559
+ $str.='.goog-tooltip {display: none !important;}';
1560
+ $str.='.goog-tooltip:hover {display: none !important;}';
1561
+ $str.='.goog-text-highlight {background-color: transparent !important; border: none !important;box-shadow: none !important;}';
1562
+ $str.='</style>';
1563
+ return $str;
1564
  }
1565
  }
1566
 
1578
  function googlelanguagetranslator_showbranding_yes() {
1579
  if(get_option('googlelanguagetranslator_active')==1) { ?>
1580
  <style type="text/css">
1581
+ #google_language_translator { width:auto !important; }
1582
+ .goog-te-gadget .goog-te-combo {margin: 4px 0px !important;}
1583
  .goog-tooltip {display: none !important;}
1584
  .goog-tooltip:hover {display: none !important;}
1585
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
1624
 
1625
  function googlelanguagetranslator_flags_display() { ?>
1626
  <style type="text/css">
1627
+ <?php if(get_option('googlelanguagetranslator_display')=='Vertical') { ?>
1628
+ p.hello { font-size:12px; color:darkgray; }
1629
+ <?php } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') { ?>
1630
+ <?php if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') { ?>
1631
+ #google_language_translator { text-align:left !important; }
1632
+ select.goog-te-combo { float:right; }
1633
+ .goog-te-gadget { padding-top:13px; }
1634
+ .goog-te-gadget .goog-te-combo { margin-top:-7px !important; }
1635
+ <?php } ?>
1636
+ .goog-te-gadget { margin-top:2px !important; }
1637
+ p.hello { font-size:12px; color:#666; }
1638
+ <?php } ?>
1639
+ <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
1640
+ #google_language_translator { clear:both; width:auto !important; text-align:right; }
1641
+ #flags { text-align:right; width:150px; float:right; clear:right; }
1642
+ p.hello { text-align:right; float:right; clear:both; color:#666; }
1643
+ .glt-clear { height:0px; clear:both; margin:0px; padding:0px; }
1644
+ <?php } ?>
1645
+ <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') { ?>
1646
+ #google_language_translator { clear:both; }
1647
+ #flags { width:150px; }
1648
+ #flags a { display:inline-block; width:16px; height:12px; margin-right:2px; }
1649
+ p.hello { font-size:12px; color:#666; }
1650
+ <?php } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
1651
+ #flags { width:150px; }
1652
+ #flags a { display:inline-block; width:16px; height:12px; margin-left:2px; } ?>
1653
+ <?php } ?>
1654
  </style>
1655
+ <?php
1656
+ $get_flag_choices = get_option ('flag_display_settings');
1657
+
1658
+ if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) { ?>
1659
  <style type="text/css">
1660
+ #flags a.zh-CN { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/china.png") 0px 0px no-repeat; }
1661
  </style>
1662
  <?php } else { ?>
1663
  <style type="text/css">
1664
+ #flags a.zh-CN { display:none; }
1665
  </style>
1666
  <?php }
1667
 
1668
+ if ( isset ( $get_flag_choices['flag-de'] ) ) { ?>
1669
+ <style type="text/css">
1670
+ #flags a.de { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/germany.png") 0px 0px no-repeat; }
1671
+ </style>
1672
+ <?php } else { ?>
1673
+ <style type="text/css">
1674
+ #flags a.de { display:none; }
1675
+ </style>
1676
+ <?php }
1677
+
1678
+ if ( isset ( $get_flag_choices['flag-da'] ) ) { ?>
1679
  <style type="text/css">
1680
+ #flags a.da { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/denmark.png") 0px 0px no-repeat; }
1681
  </style>
1682
  <?php } else { ?>
1683
  <style type="text/css">
1684
+ #flags a.da { display:none; }
1685
  </style>
1686
  <?php }
1687
 
1688
+ if ( isset ( $get_flag_choices['flag-fr'] ) ) { ?>
1689
  <style type="text/css">
1690
+ #flags a.fr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/france.png") 0px 0px no-repeat; }
1691
  </style>
1692
  <?php } else { ?>
1693
  <style type="text/css">
1694
+ #flags a.fr { display:none; }
1695
  </style>
1696
  <?php }
1697
 
1698
+ if ( isset ( $get_flag_choices['flag-en'] ) ) { ?>
1699
  <style type="text/css">
1700
+ #flags a.en { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/united-kingdom.png") 0px 0px no-repeat; }
1701
  </style>
1702
  <?php } else { ?>
1703
  <style type="text/css">
1704
+ #flags a.en { display:none; }
1705
  </style>
1706
  <?php }
1707
 
1708
+ if ( isset ( $get_flag_choices['flag-it'] ) ) { ?>
1709
  <style type="text/css">
1710
+ #flags a.it { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/italy.png") 0px 0px no-repeat; }
1711
  </style>
1712
  <?php } else { ?>
1713
  <style type="text/css">
1714
+ #flags a.it { display:none; }
1715
  </style>
1716
  <?php }
1717
 
1718
+ if ( isset ( $get_flag_choices['flag-es'] ) ) { ?>
1719
  <style type="text/css">
1720
+ #flags a.es { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/spain.png") 0px 0px no-repeat; }
1721
  </style>
1722
  <?php } else { ?>
1723
  <style type="text/css">
1724
+ #flags a.es { display:none; }
1725
  </style>
1726
  <?php }
1727
 
1728
+
1729
+
1730
+ if ( isset ( $get_flag_choices['flag-af'] ) ) { ?>
1731
+ <style type="text/css">
1732
+ #flags a.af { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/southafrica.png") 0px 0px no-repeat; }
1733
+ </style>
1734
+ <?php } else { ?>
1735
  <style type="text/css">
1736
+ #flags a.af { display:none; }
1737
  </style>
1738
+ <?php }
1739
+
1740
+ if ( isset ( $get_flag_choices['flag-sq'] ) ) { ?>
1741
+ <style type="text/css">
1742
+ #flags a.sq { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/albania.png") 0px 0px no-repeat; }
1743
+ </style>
1744
+ <?php } else { ?>
1745
  <style type="text/css">
1746
+ #flags a.sq { display:none; }
1747
  </style>
1748
  <?php }
1749
+
1750
+ if ( isset ( $get_flag_choices['flag-ar'] ) ) { ?>
1751
+ <style type="text/css">
1752
+ #flags a.ar { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/saudiarabia.png") 0px 0px no-repeat; }
1753
+ </style>
1754
+ <?php } else { ?>
1755
+ <style type="text/css">
1756
+ #flags a.ar { display:none; }
1757
+ </style>
1758
+ <?php }
1759
+
1760
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) { ?>
1761
+ <style type="text/css">
1762
+ #flags a.hy { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/armenia.png") 0px 0px no-repeat; }
1763
+ </style>
1764
+ <?php } else { ?>
1765
+ <style type="text/css">
1766
+ #flags a.hy { display:none; }
1767
+ </style>
1768
+ <?php }
1769
+
1770
+ if ( isset ( $get_flag_choices['flag-az'] ) ) { ?>
1771
+ <style type="text/css">
1772
+ #flags a.az { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/azerbaijan.png") 0px 0px no-repeat; }
1773
+ </style>
1774
+ <?php } else { ?>
1775
+ <style type="text/css">
1776
+ #flags a.az { display:none; }
1777
+ </style>
1778
+ <?php }
1779
+
1780
+ if ( isset ( $get_flag_choices['flag-eu'] ) ) { ?>
1781
+ <style type="text/css">
1782
+ #flags a.eu { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/basque.png") 0px 0px no-repeat; }
1783
+ </style>
1784
+ <?php } else { ?>
1785
+ <style type="text/css">
1786
+ #flags a.eu { display:none; }
1787
+ </style>
1788
+ <?php }
1789
+
1790
+ if ( isset ( $get_flag_choices['flag-be'] ) ) { ?>
1791
+ <style type="text/css">
1792
+ #flags a.be { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/belarus.png") 0px 0px no-repeat; }
1793
+ </style>
1794
+ <?php } else { ?>
1795
+ <style type="text/css">
1796
+ #flags a.be { display:none; }
1797
+ </style>
1798
+ <?php }
1799
+
1800
+ if ( isset ( $get_flag_choices['flag-bn'] ) ) { ?>
1801
+ <style type="text/css">
1802
+ #flags a.bn { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/bangladesh.png") 0px 0px no-repeat; }
1803
+ </style>
1804
+ <?php } else { ?>
1805
+ <style type="text/css">
1806
+ #flags a.bn { display:none; }
1807
+ </style>
1808
+ <?php }
1809
+
1810
+ if ( isset ( $get_flag_choices['flag-bs'] ) ) { ?>
1811
+ <style type="text/css">
1812
+ #flags a.bs { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/bosnia.png") 0px 0px no-repeat; }
1813
+ </style>
1814
+ <?php } else { ?>
1815
+ <style type="text/css">
1816
+ #flags a.bs { display:none; }
1817
+ </style>
1818
+ <?php }
1819
+
1820
+ if ( isset ( $get_flag_choices['flag-bg'] ) ) { ?>
1821
+ <style type="text/css">
1822
+ #flags a.bg { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/bulgaria.png") 0px 0px no-repeat; }
1823
+ </style>
1824
+ <?php } else { ?>
1825
+ <style type="text/css">
1826
+ #flags a.bg { display:none; }
1827
+ </style>
1828
+ <?php }
1829
+
1830
+ if ( isset ( $get_flag_choices['flag-ca'] ) ) { ?>
1831
+ <style type="text/css">
1832
+ #flags a.ca { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/spain.png") 0px 0px no-repeat; }
1833
+ </style>
1834
+ <?php } else { ?>
1835
+ <style type="text/css">
1836
+ #flags a.ca { display:none; }
1837
+ </style>
1838
+ <?php }
1839
+
1840
+ if ( isset ( $get_flag_choices['flag-ceb'] ) ) { ?>
1841
+ <style type="text/css">
1842
+ #flags a.ceb { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/philippines.png") 0px 0px no-repeat; }
1843
+ </style>
1844
+ <?php } else { ?>
1845
+ <style type="text/css">
1846
+ #flags a.ceb { display:none; }
1847
+ </style>
1848
+ <?php }
1849
+
1850
+
1851
+
1852
+ if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) { ?>
1853
+ <style type="text/css">
1854
+ #flags a.zh-TW { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/china.png") 0px 0px no-repeat; }
1855
+ </style>
1856
+ <?php } else { ?>
1857
+ <style type="text/css">
1858
+ #flags a.zh-TW { display:none; }
1859
+ </style>
1860
+ <?php }
1861
+
1862
+ if ( isset ( $get_flag_choices['flag-cs'] ) ) { ?>
1863
+ <style type="text/css">
1864
+ #flags a.cs { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/croatia.png") 0px 0px no-repeat; }
1865
+ </style>
1866
+ <?php } else { ?>
1867
+ <style type="text/css">
1868
+ #flags a.cs { display:none; }
1869
+ </style>
1870
+ <?php }
1871
+
1872
+ if ( isset ( $get_flag_choices['flag-hr'] ) ) { ?>
1873
+ <style type="text/css">
1874
+ #flags a.hr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/czechrepublic.png") 0px 0px no-repeat; }
1875
+ </style>
1876
+ <?php } else { ?>
1877
+ <style type="text/css">
1878
+ #flags a.hr { display:none; }
1879
+ </style>
1880
+ <?php }
1881
+
1882
+ if ( isset ( $get_flag_choices['flag-nl'] ) ) { ?>
1883
+ <style type="text/css">
1884
+ #flags a.nl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/netherlands.png") 0px 0px no-repeat; }
1885
+ </style>
1886
+ <?php } else { ?>
1887
+ <style type="text/css">
1888
+ #flags a.nl { display:none; }
1889
+ </style>
1890
+ <?php }
1891
+
1892
+ if ( isset ( $get_flag_choices['flag-eo'] ) ) { ?>
1893
+ <style type="text/css">
1894
+ #flags a.eo { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/esperanto.png") 0px 0px no-repeat; }
1895
+ </style>
1896
+ <?php } else { ?>
1897
+ <style type="text/css">
1898
+ #flags a.eo { display:none; }
1899
+ </style>
1900
+ <?php }
1901
+
1902
+ if ( isset ( $get_flag_choices['flag-et'] ) ) { ?>
1903
+ <style type="text/css">
1904
+ #flags a.et { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/estonia.png") 0px 0px no-repeat; }
1905
+ </style>
1906
+ <?php } else { ?>
1907
+ <style type="text/css">
1908
+ #flags a.et { display:none; }
1909
+ </style>
1910
+ <?php }
1911
+
1912
+ if ( isset ( $get_flag_choices['flag-tl'] ) ) { ?>
1913
+ <style type="text/css">
1914
+ #flags a.tl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/philippines.png") 0px 0px no-repeat; }
1915
+ </style>
1916
+ <?php } else { ?>
1917
+ <style type="text/css">
1918
+ #flags a.tl { display:none; }
1919
+ </style>
1920
+ <?php }
1921
+
1922
+ if ( isset ( $get_flag_choices['flag-fi'] ) ) { ?>
1923
+ <style type="text/css">
1924
+ #flags a.fi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/finland.png") 0px 0px no-repeat; }
1925
+ </style>
1926
+ <?php } else { ?>
1927
+ <style type="text/css">
1928
+ #flags a.fi { display:none; }
1929
+ </style>
1930
+ <?php }
1931
+
1932
+ if ( isset ( $get_flag_choices['flag-gl'] ) ) { ?>
1933
+ <style type="text/css">
1934
+ #flags a.gl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/galicia.png") 0px 0px no-repeat; }
1935
+ </style>
1936
+ <?php } else { ?>
1937
+ <style type="text/css">
1938
+ #flags a.gl { display:none; }
1939
+ </style>
1940
+ <?php }
1941
+
1942
+ if ( isset ( $get_flag_choices['flag-ka'] ) ) { ?>
1943
+ <style type="text/css">
1944
+ #flags a.ka { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/georgia.png") 0px 0px no-repeat; }
1945
+ </style>
1946
+ <?php } else { ?>
1947
+ <style type="text/css">
1948
+ #flags a.ka { display:none; }
1949
+ </style>
1950
+ <?php }
1951
+
1952
+ if ( isset ( $get_flag_choices['flag-el'] ) ) { ?>
1953
+ <style type="text/css">
1954
+ #flags a.el { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/greece.png") 0px 0px no-repeat; }
1955
+ </style>
1956
+ <?php } else { ?>
1957
+ <style type="text/css">
1958
+ #flags a.el { display:none; }
1959
+ </style>
1960
+ <?php }
1961
+
1962
+ if ( isset ( $get_flag_choices['flag-gu'] ) ) { ?>
1963
+ <style type="text/css">
1964
+ #flags a.gu { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/india.png") 0px 0px no-repeat; }
1965
+ </style>
1966
+ <?php } else { ?>
1967
+ <style type="text/css">
1968
+ #flags a.gu { display:none; }
1969
+ </style>
1970
+ <?php }
1971
+
1972
+ if ( isset ( $get_flag_choices['flag-ht'] ) ) { ?>
1973
+ <style type="text/css">
1974
+ #flags a.ht { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/haiti.png") 0px 0px no-repeat; }
1975
+ </style>
1976
+ <?php } else { ?>
1977
+ <style type="text/css">
1978
+ #flags a.ht { display:none; }
1979
+ </style>
1980
+ <?php }
1981
+
1982
+ if ( isset ( $get_flag_choices['flag-iw'] ) ) { ?>
1983
+ <style type="text/css">
1984
+ #flags a.iw { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/israel.png") 0px 0px no-repeat; }
1985
+ </style>
1986
+ <?php } else { ?>
1987
+ <style type="text/css">
1988
+ #flags a.iw { display:none; }
1989
+ </style>
1990
+ <?php }
1991
+
1992
+ if ( isset ( $get_flag_choices['flag-hi'] ) ) { ?>
1993
+ <style type="text/css">
1994
+ #flags a.hi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/india.png") 0px 0px no-repeat; }
1995
+ </style>
1996
+ <?php } else { ?>
1997
+ <style type="text/css">
1998
+ #flags a.hi { display:none; }
1999
+ </style>
2000
+ <?php }
2001
+
2002
+ if ( isset ( $get_flag_choices['flag-hmn'] ) ) { ?>
2003
+ <style type="text/css">
2004
+ #flags a.hmn { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/hmong.png") 0px 0px no-repeat; }
2005
+ </style>
2006
+ <?php } else { ?>
2007
+ <style type="text/css">
2008
+ #flags a.hmn { display:none; }
2009
+ </style>
2010
+ <?php }
2011
+
2012
+ if ( isset ( $get_flag_choices['flag-hu'] ) ) { ?>
2013
+ <style type="text/css">
2014
+ #flags a.hu { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/hungary.png") 0px 0px no-repeat; }
2015
+ </style>
2016
+ <?php } else { ?>
2017
+ <style type="text/css">
2018
+ #flags a.hu { display:none; }
2019
+ </style>
2020
+ <?php }
2021
+
2022
+ if ( isset ( $get_flag_choices['flag-is'] ) ) { ?>
2023
+ <style type="text/css">
2024
+ #flags a.is { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/iceland.png") 0px 0px no-repeat; }
2025
+ </style>
2026
+ <?php } else { ?>
2027
+ <style type="text/css">
2028
+ #flags a.is { display:none; }
2029
+ </style>
2030
+ <?php }
2031
+
2032
+ if ( isset ( $get_flag_choices['flag-id'] ) ) { ?>
2033
+ <style type="text/css">
2034
+ #flags a.id { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/indonesia.png") 0px 0px no-repeat; }
2035
+ </style>
2036
+ <?php } else { ?>
2037
+ <style type="text/css">
2038
+ #flags a.id { display:none; }
2039
+ </style>
2040
+ <?php }
2041
+
2042
+ if ( isset ( $get_flag_choices['flag-ga'] ) ) { ?>
2043
+ <style type="text/css">
2044
+ #flags a.ga { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/ireland.png") 0px 0px no-repeat; }
2045
+ </style>
2046
+ <?php } else { ?>
2047
+ <style type="text/css">
2048
+ #flags a.ga { display:none; }
2049
+ </style>
2050
+ <?php }
2051
+
2052
+ if ( isset ( $get_flag_choices['flag-ja'] ) ) { ?>
2053
+ <style type="text/css">
2054
+ #flags a.ja { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/japan.png") 0px 0px no-repeat; }
2055
+ </style>
2056
+ <?php } else { ?>
2057
+ <style type="text/css">
2058
+ #flags a.ja { display:none; }
2059
+ </style>
2060
+ <?php }
2061
+
2062
+ if ( isset ( $get_flag_choices['flag-jw'] ) ) { ?>
2063
+ <style type="text/css">
2064
+ #flags a.jw { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/indonesia.png") 0px 0px no-repeat; }
2065
+ </style>
2066
+ <?php } else { ?>
2067
+ <style type="text/css">
2068
+ #flags a.jw { display:none; }
2069
+ </style>
2070
+ <?php }
2071
+
2072
+ if ( isset ( $get_flag_choices['flag-kn'] ) ) { ?>
2073
+ <style type="text/css">
2074
+ #flags a.kn { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/kannada.png") 0px 0px no-repeat; }
2075
+ </style>
2076
+ <?php } else { ?>
2077
+ <style type="text/css">
2078
+ #flags a.kn { display:none; }
2079
+ </style>
2080
+ <?php }
2081
+
2082
+ if ( isset ( $get_flag_choices['flag-km'] ) ) { ?>
2083
+ <style type="text/css">
2084
+ #flags a.km { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/cambodia.png") 0px 0px no-repeat; }
2085
+ </style>
2086
+ <?php } else { ?>
2087
+ <style type="text/css">
2088
+ #flags a.km { display:none; }
2089
+ </style>
2090
+ <?php }
2091
+
2092
+ if ( isset ( $get_flag_choices['flag-ko'] ) ) { ?>
2093
+ <style type="text/css">
2094
+ #flags a.ko { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/korea.png") 0px 0px no-repeat; }
2095
+ </style>
2096
+ <?php } else { ?>
2097
+ <style type="text/css">
2098
+ #flags a.ko { display:none; }
2099
+ </style>
2100
+ <?php }
2101
+
2102
+ if ( isset ( $get_flag_choices['flag-lo'] ) ) { ?>
2103
+ <style type="text/css">
2104
+ #flags a.lo { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/laos.png") 0px 0px no-repeat; }
2105
+ </style>
2106
+ <?php } else { ?>
2107
+ <style type="text/css">
2108
+ #flags a.lo { display:none; }
2109
+ </style>
2110
+ <?php }
2111
+
2112
+ if ( isset ( $get_flag_choices['flag-la'] ) ) { ?>
2113
+ <style type="text/css">
2114
+ #flags a.la { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/latin.png") 0px 0px no-repeat; }
2115
+ </style>
2116
+ <?php } else { ?>
2117
+ <style type="text/css">
2118
+ #flags a.la { display:none; }
2119
+ </style>
2120
+ <?php }
2121
+
2122
+ if ( isset ( $get_flag_choices['flag-lv'] ) ) { ?>
2123
+ <style type="text/css">
2124
+ #flags a.lv { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/latvia.png") 0px 0px no-repeat; }
2125
+ </style>
2126
+ <?php } else { ?>
2127
+ <style type="text/css">
2128
+ #flags a.lv { display:none; }
2129
+ </style>
2130
+ <?php }
2131
+
2132
+ if ( isset ( $get_flag_choices['flag-lt'] ) ) { ?>
2133
+ <style type="text/css">
2134
+ #flags a.lt { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/lithuania.png") 0px 0px no-repeat; }
2135
+ </style>
2136
+ <?php } else { ?>
2137
+ <style type="text/css">
2138
+ #flags a.lt { display:none; }
2139
+ </style>
2140
+ <?php }
2141
+
2142
+ if ( isset ( $get_flag_choices['flag-mk'] ) ) { ?>
2143
+ <style type="text/css">
2144
+ #flags a.mk { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/macedonia.png") 0px 0px no-repeat; }
2145
+ </style>
2146
+ <?php } else { ?>
2147
+ <style type="text/css">
2148
+ #flags a.mk { display:none; }
2149
+ </style>
2150
+ <?php }
2151
+
2152
+ if ( isset ( $get_flag_choices['flag-ms'] ) ) { ?>
2153
+ <style type="text/css">
2154
+ #flags a.ms { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/malaysia.png") 0px 0px no-repeat; }
2155
+ </style>
2156
+ <?php } else { ?>
2157
+ <style type="text/css">
2158
+ #flags a.ms { display:none; }
2159
+ </style>
2160
+ <?php }
2161
+
2162
+ if ( isset ( $get_flag_choices['flag-mt'] ) ) { ?>
2163
+ <style type="text/css">
2164
+ #flags a.mt { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/malta.png") 0px 0px no-repeat; }
2165
+ </style>
2166
+ <?php } else { ?>
2167
+ <style type="text/css">
2168
+ #flags a.mt { display:none; }
2169
+ </style>
2170
+ <?php }
2171
+
2172
+ if ( isset ( $get_flag_choices['flag-mr'] ) ) { ?>
2173
+ <style type="text/css">
2174
+ #flags a.mr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/marathi.png") 0px 0px no-repeat; }
2175
+ </style>
2176
+ <?php } else { ?>
2177
+ <style type="text/css">
2178
+ #flags a.mr { display:none; }
2179
+ </style>
2180
+ <?php }
2181
+
2182
+ if ( isset ( $get_flag_choices['flag-no'] ) ) { ?>
2183
+ <style type="text/css">
2184
+ #flags a.no { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/norway.png") 0px 0px no-repeat; }
2185
+ </style>
2186
+ <?php } else { ?>
2187
+ <style type="text/css">
2188
+ #flags a.no { display:none; }
2189
+ </style>
2190
+ <?php }
2191
+
2192
+ if ( isset ( $get_flag_choices['flag-fa'] ) ) { ?>
2193
+ <style type="text/css">
2194
+ #flags a.fa { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/iran.png") 0px 0px no-repeat; }
2195
+ </style>
2196
+ <?php } else { ?>
2197
+ <style type="text/css">
2198
+ #flags a.fa { display:none; }
2199
+ </style>
2200
+ <?php }
2201
+
2202
+ if ( isset ( $get_flag_choices['flag-pl'] ) ) { ?>
2203
+ <style type="text/css">
2204
+ #flags a.pl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/poland.png") 0px 0px no-repeat; }
2205
+ </style>
2206
+ <?php } else { ?>
2207
+ <style type="text/css">
2208
+ #flags a.pl { display:none; }
2209
+ </style>
2210
+ <?php }
2211
+
2212
+ if ( isset ( $get_flag_choices['flag-pt'] ) ) { ?>
2213
+ <style type="text/css">
2214
+ #flags a.pt { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/portugal.png") 0px 0px no-repeat; }
2215
+ </style>
2216
+ <?php } else { ?>
2217
+ <style type="text/css">
2218
+ #flags a.pt { display:none; }
2219
+ </style>
2220
+ <?php }
2221
+
2222
+ if ( isset ( $get_flag_choices['flag-ro'] ) ) { ?>
2223
+ <style type="text/css">
2224
+ #flags a.ro { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/romania.png") 0px 0px no-repeat; }
2225
+ </style>
2226
+ <?php } else { ?>
2227
+ <style type="text/css">
2228
+ #flags a.ro { display:none; }
2229
+ </style>
2230
+ <?php }
2231
+
2232
+ if ( isset ( $get_flag_choices['flag-ru'] ) ) { ?>
2233
+ <style type="text/css">
2234
+ #flags a.ru { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/russia.png") 0px 0px no-repeat; }
2235
+ </style>
2236
+ <?php } else { ?>
2237
+ <style type="text/css">
2238
+ #flags a.ru { display:none; }
2239
+ </style>
2240
+ <?php }
2241
+
2242
+ if ( isset ( $get_flag_choices['flag-sr'] ) ) { ?>
2243
+ <style type="text/css">
2244
+ #flags a.sr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/serbia.png") 0px 0px no-repeat; }
2245
+ </style>
2246
+ <?php } else { ?>
2247
+ <style type="text/css">
2248
+ #flags a.sr { display:none; }
2249
+ </style>
2250
+ <?php }
2251
+
2252
+ if ( isset ( $get_flag_choices['flag-sk'] ) ) { ?>
2253
+ <style type="text/css">
2254
+ #flags a.sk { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/slovakia.png") 0px 0px no-repeat; }
2255
+ </style>
2256
+ <?php } else { ?>
2257
+ <style type="text/css">
2258
+ #flags a.sk { display:none; }
2259
+ </style>
2260
+ <?php }
2261
+
2262
+ if ( isset ( $get_flag_choices['flag-sv'] ) ) { ?>
2263
+ <style type="text/css">
2264
+ #flags a.sv { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/sweden.png") 0px 0px no-repeat; }
2265
+ </style>
2266
+ <?php } else { ?>
2267
+ <style type="text/css">
2268
+ #flags a.sv { display:none; }
2269
+ </style>
2270
+ <?php }
2271
+
2272
+ if ( isset ( $get_flag_choices['flag-sw'] ) ) { ?>
2273
+ <style type="text/css">
2274
+ #flags a.sw { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/kenya.png") 0px 0px no-repeat; }
2275
+ </style>
2276
+ <?php } else { ?>
2277
+ <style type="text/css">
2278
+ #flags a.sw { display:none; }
2279
+ </style>
2280
+ <?php }
2281
+
2282
+ if ( isset ( $get_flag_choices['flag-sl'] ) ) { ?>
2283
+ <style type="text/css">
2284
+ #flags a.sl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/slovenia.png") 0px 0px no-repeat; }
2285
+ </style>
2286
+ <?php } else { ?>
2287
+ <style type="text/css">
2288
+ #flags a.sl { display:none; }
2289
+ </style>
2290
+ <?php }
2291
+
2292
+
2293
+ if ( isset ( $get_flag_choices['flag-ta'] ) ) { ?>
2294
+ <style type="text/css">
2295
+ #flags a.ta { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/tamil.png") 0px 0px no-repeat; }
2296
+ </style>
2297
+ <?php } else { ?>
2298
+ <style type="text/css">
2299
+ #flags a.ta { display:none; }
2300
+ </style>
2301
+ <?php }
2302
+
2303
+ if ( isset ( $get_flag_choices['flag-te'] ) ) { ?>
2304
+ <style type="text/css">
2305
+ #flags a.te { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/telugu.png") 0px 0px no-repeat; }
2306
+ </style>
2307
+ <?php } else { ?>
2308
+ <style type="text/css">
2309
+ #flags a.te { display:none; }
2310
+ </style>
2311
+ <?php }
2312
+
2313
+ if ( isset ( $get_flag_choices['flag-th'] ) ) { ?>
2314
+ <style type="text/css">
2315
+ #flags a.th { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/thailand.png") 0px 0px no-repeat; }
2316
+ </style>
2317
+ <?php } else { ?>
2318
+ <style type="text/css">
2319
+ #flags a.th { display:none; }
2320
+ </style>
2321
+ <?php }
2322
+
2323
+ if ( isset ( $get_flag_choices['flag-tr'] ) ) { ?>
2324
+ <style type="text/css">
2325
+ #flags a.tr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/turkey.png") 0px 0px no-repeat; }
2326
+ </style>
2327
+ <?php } else { ?>
2328
+ <style type="text/css">
2329
+ #flags a.tr { display:none; }
2330
+ </style>
2331
+ <?php }
2332
+
2333
+ if ( isset ( $get_flag_choices['flag-uk'] ) ) { ?>
2334
+ <style type="text/css">
2335
+ #flags a.uk { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/ukraine.png") 0px 0px no-repeat; }
2336
+ </style>
2337
+ <?php } else { ?>
2338
+ <style type="text/css">
2339
+ #flags a.uk { display:none; }
2340
+ </style>
2341
+ <?php }
2342
+
2343
+ if ( isset ( $get_flag_choices['flag-ur'] ) ) { ?>
2344
+ <style type="text/css">
2345
+ #flags a.ur { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/pakistan.png") 0px 0px no-repeat; }
2346
+ </style>
2347
+ <?php } else { ?>
2348
+ <style type="text/css">
2349
+ #flags a.ur { display:none; }
2350
+ </style>
2351
+ <?php }
2352
+
2353
+ if ( isset ( $get_flag_choices['flag-vi'] ) ) { ?>
2354
+ <style type="text/css">
2355
+ #flags a.vi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/vietnam.png") 0px 0px no-repeat; }
2356
+ </style>
2357
+ <?php } else { ?>
2358
+ <style type="text/css">
2359
+ #flags a.vi { display:none; }
2360
+ </style>
2361
+ <?php }
2362
+
2363
+ if ( isset ( $get_flag_choices['flag-cy'] ) ) { ?>
2364
+ <style type="text/css">
2365
+ #flags a.cy { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/wales.png") 0px 0px no-repeat; }
2366
+ </style>
2367
+ <?php } else { ?>
2368
+ <style type="text/css">
2369
+ #flags a.cy { display:none; }
2370
+ </style>
2371
+ <?php }
2372
+
2373
+ if ( isset ( $get_flag_choices['flag-yi'] ) ) { ?>
2374
+ <style type="text/css">
2375
+ #flags a.yi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/yiddish.png") 0px 0px no-repeat; }
2376
+ </style>
2377
+ <?php } else { ?>
2378
+ <style type="text/css">
2379
+ #flags a.yi { display:none; }
2380
+ </style>
2381
+ <?php }
2382
  }
2383
+ add_action('wp_head','googlelanguagetranslator_flags_display');
2384
+
2385
+ ?>
images/Jersey.png ADDED
Binary file
images/Jordan.png ADDED
Binary file
images/Togo.png ADDED
Binary file
images/albania.png ADDED
Binary file
images/armenia.png ADDED
Binary file
images/azerbaijan.png ADDED
Binary file
images/bangladesh.png ADDED
Binary file
images/basque.png ADDED
Binary file
images/belarus.png ADDED
Binary file
images/bosnia.png ADDED
Binary file
images/bulgaria.png ADDED
Binary file
images/cambodia.png ADDED
Binary file
images/croatia.png ADDED
Binary file
images/czechrepublic.png ADDED
Binary file
images/esperanto.png ADDED
Binary file
images/estonia.png ADDED
Binary file
images/finland.png ADDED
Binary file
images/galicia.png ADDED
Binary file
images/georgia.png ADDED
Binary file
images/greece.png ADDED
Binary file
images/gujarati.png ADDED
Binary file
images/haiti.png ADDED
Binary file
images/hmong.png ADDED
Binary file
images/hungary.png ADDED
Binary file
images/iceland.png ADDED
Binary file
images/india.png ADDED
Binary file
images/indonesia.png ADDED
Binary file
images/iran.png ADDED
Binary file
images/ireland.png ADDED
Binary file
images/israel.png ADDED
Binary file
images/kannada.png ADDED
Binary file
images/kenya.png ADDED
Binary file
images/korea.png ADDED
Binary file
images/laos.png ADDED
Binary file
images/latin.png ADDED
Binary file
images/latvia.png ADDED
Binary file
images/lithuania.png ADDED
Binary file
images/macedonia.png ADDED
Binary file
images/malaysia.png ADDED
Binary file
images/malta.png ADDED
Binary file
images/marathi.png ADDED
Binary file
images/netherlands.png ADDED
Binary file
images/norway.png ADDED
Binary file
images/pakistan.png ADDED
Binary file
images/philippines.png ADDED
Binary file
images/poland.png ADDED
Binary file
images/portugal.png ADDED
Binary file
images/romania.png ADDED
Binary file
images/russia.png ADDED
Binary file
images/saudiarabia.png ADDED
Binary file
images/serbia.png ADDED
Binary file
images/slovakia.png ADDED
Binary file
images/slovenia.png ADDED
Binary file
images/southafrica.png ADDED
Binary file
images/sweden.png ADDED
Binary file
images/tamil.png ADDED
Binary file
images/telugu.png ADDED
Binary file
images/thailand.png ADDED
Binary file
images/turkey.png ADDED
Binary file
images/ukraine.png ADDED
Binary file
images/united-kingdom.png CHANGED
Binary file
images/vietnam.png ADDED
Binary file
images/wales.png ADDED
Binary file
images/yiddish.png ADDED
Binary file
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=c6aycTLE
4
  Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
  Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
- Tested up to: 3.52
8
- stable tag: 2.2
9
 
10
  Welcome to Google Language Tranlator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
 
@@ -74,6 +74,16 @@ Settings include: inline or vertical layout, show/hide specific languages, hide/
74
 
75
  - Added link in the settings panel that points to Google's Attribution Policy.
76
 
 
 
 
 
 
 
 
 
 
 
77
  == Screenshots ==
78
 
79
  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.
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.6
8
+ stable tag: 2.3
9
 
10
  Welcome to Google Language Tranlator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
 
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
  == Screenshots ==
88
 
89
  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.
widget.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_action( 'widgets_init', create_function( '', 'register_widget( "Google_Language_Translator" );' ) );
4
+
5
+ class Google_Language_Translator extends WP_Widget {
6
+
7
+ public function __construct() {
8
+ parent::__construct(
9
+ 'bapi_google_translate', // Base ID
10
+ 'Google Language Translator', // Name
11
+ array( 'description' => __( 'Go to Settings >> Google Language Translator to configure this widget.', 'text_domain' ), ) // Args
12
+ );
13
+ }
14
+
15
+ public function widget( $args, $instance ) {
16
+ extract( $args );
17
+ $title = apply_filters( 'widget_title', $instance['title'] );
18
+
19
+ echo $before_widget;
20
+ echo google_translator_shortcode();
21
+ echo $after_widget;
22
+ }
23
+
24
+ } // class Google_Translate_Widget
25
+ ?>