Google Language Translator - Version 2.7

Version Description

Download this release

Release Info

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

Code changes from version 2.6 to 2.7

Files changed (148) hide show
  1. admin.js +21 -7
  2. css/style.css +175 -0
  3. flags.js +1 -1
  4. google-language-translator.php +759 -1022
  5. images/arrow_down.png +0 -0
  6. images/{Jersey.png → flags164444/Jersey.png} +0 -0
  7. images/{Jordan.png → flags164444/Jordan.png} +0 -0
  8. images/{Togo.png → flags164444/Togo.png} +0 -0
  9. images/{albania.png → flags164444/albania.png} +0 -0
  10. images/{armenia.png → flags164444/armenia.png} +0 -0
  11. images/{azerbaijan.png → flags164444/azerbaijan.png} +0 -0
  12. images/{bangladesh.png → flags164444/bangladesh.png} +0 -0
  13. images/{basque.png → flags164444/basque.png} +0 -0
  14. images/{belarus.png → flags164444/belarus.png} +0 -0
  15. images/{bosnia.png → flags164444/bosnia.png} +0 -0
  16. images/{bulgaria.png → flags164444/bulgaria.png} +0 -0
  17. images/{cambodia.png → flags164444/cambodia.png} +0 -0
  18. images/{china.png → flags164444/china.png} +0 -0
  19. images/{croatia.png → flags164444/croatia.png} +0 -0
  20. images/{czechrepublic.png → flags164444/czechrepublic.png} +0 -0
  21. images/{denmark.png → flags164444/denmark.png} +0 -0
  22. images/{esperanto.png → flags164444/esperanto.png} +0 -0
  23. images/{estonia.png → flags164444/estonia.png} +0 -0
  24. images/{finland.png → flags164444/finland.png} +0 -0
  25. images/{france.png → flags164444/france.png} +0 -0
  26. images/{galicia.png → flags164444/galicia.png} +0 -0
  27. images/{georgia.png → flags164444/georgia.png} +0 -0
  28. images/{germany.png → flags164444/germany.png} +0 -0
  29. images/{greece.png → flags164444/greece.png} +0 -0
  30. images/{gujarati.png → flags164444/gujarati.png} +0 -0
  31. images/{haiti.png → flags164444/haiti.png} +0 -0
  32. images/{hmong.png → flags164444/hmong.png} +0 -0
  33. images/{hungary.png → flags164444/hungary.png} +0 -0
  34. images/{iceland.png → flags164444/iceland.png} +0 -0
  35. images/{india.png → flags164444/india.png} +0 -0
  36. images/{indonesia.png → flags164444/indonesia.png} +0 -0
  37. images/{iran.png → flags164444/iran.png} +0 -0
  38. images/{ireland.png → flags164444/ireland.png} +0 -0
  39. images/{israel.png → flags164444/israel.png} +0 -0
  40. images/{italy.png → flags164444/italy.png} +0 -0
  41. images/{japan.png → flags164444/japan.png} +0 -0
  42. images/{kannada.png → flags164444/kannada.png} +0 -0
  43. images/{kenya.png → flags164444/kenya.png} +0 -0
  44. images/{korea.png → flags164444/korea.png} +0 -0
  45. images/{laos.png → flags164444/laos.png} +0 -0
  46. images/{latin.png → flags164444/latin.png} +0 -0
  47. images/{latvia.png → flags164444/latvia.png} +0 -0
  48. images/{lithuania.png → flags164444/lithuania.png} +0 -0
  49. images/{macedonia.png → flags164444/macedonia.png} +0 -0
  50. images/{malaysia.png → flags164444/malaysia.png} +0 -0
  51. images/{malta.png → flags164444/malta.png} +0 -0
  52. images/{marathi.png → flags164444/marathi.png} +0 -0
  53. images/{netherlands.png → flags164444/netherlands.png} +0 -0
  54. images/{norway.png → flags164444/norway.png} +0 -0
  55. images/{pakistan.png → flags164444/pakistan.png} +0 -0
  56. images/{philippines.png → flags164444/philippines.png} +0 -0
  57. images/{poland.png → flags164444/poland.png} +0 -0
  58. images/{portugal.png → flags164444/portugal.png} +0 -0
  59. images/{romania.png → flags164444/romania.png} +0 -0
  60. images/{russia.png → flags164444/russia.png} +0 -0
  61. images/{saudiarabia.png → flags164444/saudiarabia.png} +0 -0
  62. images/{serbia.png → flags164444/serbia.png} +0 -0
  63. images/{slovakia.png → flags164444/slovakia.png} +0 -0
  64. images/{slovenia.png → flags164444/slovenia.png} +0 -0
  65. images/{southafrica.png → flags164444/southafrica.png} +0 -0
  66. images/{spain.png → flags164444/spain.png} +0 -0
  67. images/{sweden.png → flags164444/sweden.png} +0 -0
  68. images/{tamil.png → flags164444/tamil.png} +0 -0
  69. images/{telugu.png → flags164444/telugu.png} +0 -0
  70. images/{thailand.png → flags164444/thailand.png} +0 -0
  71. images/{turkey.png → flags164444/turkey.png} +0 -0
  72. images/{ukraine.png → flags164444/ukraine.png} +0 -0
  73. images/{united-kingdom.png → flags164444/unitedkingdom.png} +0 -0
  74. images/{vietnam.png → flags164444/vietnam.png} +0 -0
  75. images/{wales.png → flags164444/wales.png} +0 -0
  76. images/{yiddish.png → flags164444/yiddish.png} +0 -0
  77. images/flags24/albania.png +0 -0
  78. images/flags24/armenia.png +0 -0
  79. images/flags24/azerbaijan.png +0 -0
  80. images/flags24/bangladesh.png +0 -0
  81. images/flags24/basque.png +0 -0
  82. images/flags24/belarus.png +0 -0
  83. images/flags24/bosnia.png +0 -0
  84. images/flags24/bulgaria.png +0 -0
  85. images/flags24/cambodia.png +0 -0
  86. images/flags24/catalonia.png +0 -0
  87. images/flags24/china.png +0 -0
  88. images/flags24/croatia.png +0 -0
  89. images/flags24/czechrepublic.png +0 -0
  90. images/flags24/denmark.png +0 -0
  91. images/flags24/esperanto.png +0 -0
  92. images/flags24/estonia.png +0 -0
  93. images/flags24/finland.png +0 -0
  94. images/flags24/france.png +0 -0
  95. images/flags24/galicia.png +0 -0
  96. images/flags24/georgia.png +0 -0
  97. images/flags24/germany.png +0 -0
  98. images/flags24/greece.png +0 -0
  99. images/flags24/haiti.png +0 -0
  100. images/flags24/hmong.png +0 -0
  101. images/flags24/hungary.png +0 -0
  102. images/flags24/iceland.png +0 -0
  103. images/flags24/india.png +0 -0
  104. images/flags24/indonesia.png +0 -0
  105. images/flags24/iran.png +0 -0
  106. images/flags24/ireland.png +0 -0
  107. images/flags24/israel.png +0 -0
  108. images/flags24/italy.png +0 -0
  109. images/flags24/japan.png +0 -0
  110. images/flags24/kannada.png +0 -0
  111. images/flags24/kenya.png +0 -0
  112. images/flags24/korea.png +0 -0
  113. images/flags24/laos.png +0 -0
  114. images/flags24/latin.png +0 -0
  115. images/flags24/latvia.png +0 -0
  116. images/flags24/lithuania.png +0 -0
  117. images/flags24/macedonia.png +0 -0
  118. images/flags24/malaysia.png +0 -0
  119. images/flags24/malta.png +0 -0
  120. images/flags24/marathi.png +0 -0
  121. images/flags24/netherlands.png +0 -0
  122. images/flags24/norway.png +0 -0
  123. images/flags24/pakistan.png +0 -0
  124. images/flags24/philippines.png +0 -0
  125. images/flags24/poland.png +0 -0
  126. images/flags24/portugal.png +0 -0
  127. images/flags24/romania.png +0 -0
  128. images/flags24/russia.png +0 -0
  129. images/flags24/saudiaarabia.png +0 -0
  130. images/flags24/serbia.png +0 -0
  131. images/flags24/slovakia.png +0 -0
  132. images/flags24/slovenia.png +0 -0
  133. images/flags24/southafrica.png +0 -0
  134. images/flags24/spain.png +0 -0
  135. images/flags24/sweden.png +0 -0
  136. images/flags24/tamil.png +0 -0
  137. images/flags24/telugu.png +0 -0
  138. images/flags24/thailand.png +0 -0
  139. images/flags24/turkey.png +0 -0
  140. images/flags24/ukraine.png +0 -0
  141. images/flags24/unitedkingdom.png +0 -0
  142. images/flags24/vietnam.png +0 -0
  143. images/flags24/wales.png +0 -0
  144. images/flags24/yiddish.png +0 -0
  145. images/logo_slogan.png +0 -0
  146. images/switcher.png +0 -0
  147. readme.txt +118 -106
  148. widget.php +1 -1
admin.js CHANGED
@@ -1,4 +1,7 @@
1
  jQuery(document).ready(function(){
 
 
 
2
  var language_display = jQuery('input[name=googlelanguagetranslator_language_option]:checked').val();
3
 
4
  if ( language_display == 'all') {
@@ -57,6 +60,23 @@ jQuery(document).ready(function(){
57
  }
58
  });
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
 
62
  //Prevent the translator preview from translating Dashboard text
@@ -68,10 +88,4 @@ jQuery(document).ready(function(){
68
  });
69
 
70
 
71
-
72
-
73
-
74
-
75
-
76
-
77
-
1
  jQuery(document).ready(function(){
2
+
3
+
4
+
5
  var language_display = jQuery('input[name=googlelanguagetranslator_language_option]:checked').val();
6
 
7
  if ( language_display == 'all') {
60
  }
61
  });
62
 
63
+ //FadeIn and FadeOut Google Analytics tracking settings
64
+ jQuery('input[name=googlelanguagetranslator_analytics]').change(function() {
65
+ if( jQuery(this).is(':checked')) {
66
+ jQuery('.analytics').fadeIn("slow");
67
+ } else if ( jQuery(this).not(':checked')) {
68
+ jQuery('.analytics').fadeOut("slow");
69
+ }
70
+ });
71
+
72
+ //Hide or show Google Analytics ID field upon browser refresh
73
+ var analytics = jQuery('input[name=googlelanguagetranslator_analytics]');
74
+ if ( analytics.is(':checked') ) {
75
+ jQuery ('.analytics').css('display','');
76
+ } else {
77
+ jQuery ('.analytics').css('display','none');
78
+ }
79
+
80
 
81
 
82
  //Prevent the translator preview from translating Dashboard text
88
  });
89
 
90
 
91
+
 
 
 
 
 
 
css/style.css CHANGED
@@ -34,3 +34,178 @@ select.goog-te-combo:focus {
34
  width:50%;
35
  }
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  width:50%;
35
  }
36
 
37
+ td.advanced {
38
+ padding-top:0px;
39
+ padding-bottom:0px;
40
+ }
41
+
42
+ p.hello {
43
+ font-size:12px;
44
+ color:darkgray;
45
+ }
46
+
47
+ /* Elegant Theme Translator Styles */
48
+
49
+ .flag{
50
+ font-size:16px;
51
+ padding:1px 0;
52
+ background-repeat:no-repeat;
53
+ background-image:url(/modules/mod_gtranslate/tmpl/lang/16.png);
54
+ }
55
+
56
+ .flag img,.alt_flag img{
57
+ border:0px !important;
58
+ margin-top:2px !important;
59
+ padding:0px !important;
60
+ }
61
+
62
+ .switcher{
63
+ width:150px;
64
+ margin-top:3px;
65
+ font-family:Arial;
66
+ font-size:10pt;
67
+ text-align:left;
68
+ cursor:pointer;
69
+ overflow:hidden;
70
+ /*position:absolute;*/
71
+ z-index:9999;
72
+ top:0px;
73
+ left:0px;
74
+ line-height:1.5 !important;
75
+ }
76
+
77
+ .switcher a{
78
+ text-decoration:none;
79
+ display:block;
80
+ font-size:10pt;
81
+ position:relative;
82
+ z-index:9999;
83
+ }
84
+
85
+ .switcher a span{
86
+ margin-right:3px;
87
+ padding:0;
88
+ display:block;
89
+ float:left;
90
+ position:relative;
91
+ z-index:9999;
92
+ }
93
+
94
+ .switcher .selected{
95
+ position:relative;
96
+ z-index:9999;
97
+ float:none !important;
98
+
99
+ }
100
+
101
+ .switcher .selected a {
102
+ border:1px solid #CCCCCC;
103
+ color:#666666;
104
+ padding:2px 0px 2px 5px;
105
+ position:relative;
106
+ z-index:9999;
107
+ }
108
+
109
+ .switcher .selected a:hover{
110
+ background:#F0F0F0 url(/modules/mod_gtranslate/tmpl/arrow_down.png) 146px center no-repeat;
111
+ text-decoration:none;
112
+ }
113
+
114
+ .switcher .option{
115
+ border-left:1px solid #CCCCCC;
116
+ border-right:1px solid #CCCCCC;
117
+ border-bottom:1px solid #CCCCCC;
118
+ background-color:#EEEEEE;
119
+ display:none;
120
+ position:relative;
121
+ z-index:9999;
122
+ height:400px;
123
+ overflow-y:scroll;
124
+ overflow-x:hidden;
125
+ }
126
+
127
+ .switcher .option a{
128
+ color:#000;
129
+ padding:3px 5px;
130
+ position:relative;
131
+ z-index:9999;
132
+ }
133
+
134
+ .switcher .option a:hover{
135
+ background:#FFC;
136
+ }
137
+
138
+ #language{
139
+ /*position:relative;
140
+ z-index:9999;*/
141
+ height:30px;
142
+ }
143
+
144
+ #language_inner {
145
+ width:100%;
146
+ height:100%;
147
+
148
+ }
149
+
150
+ .attribution {
151
+ width:152px;
152
+ line-height:1em;
153
+ margin-top:4px;
154
+ }
155
+
156
+ span.goog-branding {
157
+ font-size: 11px;
158
+ font-family: arial;
159
+ color: rgb(102, 102, 102);
160
+ white-space: nowrap;
161
+ padding-top: 4px;
162
+ text-align: left;
163
+ width: 150px;
164
+ margin-top: 2px;
165
+ left:170px;
166
+ z-index: 9999;
167
+ float: right;
168
+ }
169
+
170
+ .goog-logo-link, .goog-logo-link:link, .goog-logo-link:visited, .goog-logo-link:hover, .goog-logo-link:active {
171
+ font-size: 12px;
172
+ font-weight: bold;
173
+ color: rgb(68, 68, 68);
174
+ text-decoration: none;
175
+ /*float: right;*/
176
+ line-height:0.8em;
177
+ }
178
+
179
+ span.goog-branding img {
180
+ float: left;
181
+ margin:0px;
182
+ width: 37px;
183
+
184
+ }
185
+
186
+ span.vertical-translator {
187
+ position:auto;
188
+ float:none !important;
189
+ font-size: 11px;
190
+ font-family: arial;
191
+ color: rgb(102, 102, 102);
192
+ white-space: nowrap;
193
+ vertical-align: middle;
194
+ padding-top: 4px;
195
+ text-align: left;
196
+ width: 150px;
197
+ margin-top: 2px;
198
+ right: -50px;
199
+ z-index: 9999;
200
+ }
201
+
202
+
203
+
204
+ #language > div > div:first-child > div { width:100%; }
205
+
206
+ /* Force overflow content to show so that the drop-down will show */
207
+
208
+ .widget { overflow:visible !important; }
209
+
210
+ /*#sidebar { overflow:visible !important; }*/
211
+
flags.js CHANGED
@@ -7,4 +7,4 @@
7
  /* <![CDATA[ */
8
  eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 7(a,b){n{4(2.9){3 c=2.9("o");c.p(b,f,f);a.q(c)}g{3 c=2.r();a.s(\'t\'+b,c)}}u(e){}}6 h(a){4(a.8)a=a.8;4(a==\'\')v;3 b=a.w(\'|\')[1];3 c;3 d=2.x(\'y\');z(3 i=0;i<d.5;i++)4(d[i].A==\'B-C-D\')c=d[i];4(2.j(\'k\')==E||2.j(\'k\').l.5==0||c.5==0||c.l.5==0){F(6(){h(a)},G)}g{c.8=b;7(c,\'m\');7(c,\'m\')}}',43,43,'||document|var|if|length|function|GTranslateFireEvent|value|createEvent||||||true|else|doGoogleLanguageTranslator||getElementById|google_language_translator|innerHTML|change|try|HTMLEvents|initEvent|dispatchEvent|createEventObject|fireEvent|on|catch|return|split|getElementsByTagName|select|for|className|goog|te|combo|null|setTimeout|500'.split('|'),0,{}))
9
  /* ]]> */
10
-
7
  /* <![CDATA[ */
8
  eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 7(a,b){n{4(2.9){3 c=2.9("o");c.p(b,f,f);a.q(c)}g{3 c=2.r();a.s(\'t\'+b,c)}}u(e){}}6 h(a){4(a.8)a=a.8;4(a==\'\')v;3 b=a.w(\'|\')[1];3 c;3 d=2.x(\'y\');z(3 i=0;i<d.5;i++)4(d[i].A==\'B-C-D\')c=d[i];4(2.j(\'k\')==E||2.j(\'k\').l.5==0||c.5==0||c.l.5==0){F(6(){h(a)},G)}g{c.8=b;7(c,\'m\');7(c,\'m\')}}',43,43,'||document|var|if|length|function|GTranslateFireEvent|value|createEvent||||||true|else|doGoogleLanguageTranslator||getElementById|google_language_translator|innerHTML|change|try|HTMLEvents|initEvent|dispatchEvent|createEventObject|fireEvent|on|catch|return|split|getElementsByTagName|select|for|className|goog|te|combo|null|setTimeout|500'.split('|'),0,{}))
9
  /* ]]> */
10
+
google-language-translator.php CHANGED
@@ -2,12 +2,31 @@
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 2.6
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) {
@@ -27,14 +46,14 @@ function flags() {
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,8 +63,20 @@ function google_translator_shortcode() {
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');
@@ -84,14 +115,15 @@ 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>
@@ -154,6 +186,16 @@ function page_cb() { ?>
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>
@@ -169,7 +211,7 @@ function page_cb() { ?>
169
  <td></td>
170
  </tr>
171
  </table>
172
- </form>
173
  </div> <!-- .postbox -->
174
  </div> <!-- .metbox-holder -->
175
 
@@ -183,9 +225,20 @@ function page_cb() { ?>
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 />
@@ -205,7 +258,7 @@ function page_cb() { ?>
205
  <br />
206
  </div>
207
  </div>
208
- </div>
209
  </div> <!-- .wrap -->
210
  <?php
211
  }
@@ -242,6 +295,10 @@ function initialize_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
 
@@ -257,30 +314,42 @@ function initialize_settings() {
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
- add_option ('googlelanguagetranslator_active',1);
263
-
264
- if ( get_option( 'googlelanguagetranslator_active' ) !== false ) {
265
- // The option already exists, so we just update it.
266
- update_option( 'googlelanguagetranslator_active', 1);
267
- }
268
-
269
- $options = get_option( 'googlelanguagetranslator_active');
270
 
271
- $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Language Translator?';
272
- echo $html;
 
 
 
 
 
 
 
 
 
 
 
273
  }
274
 
275
  function googlelanguagetranslator_language_cb() {
276
- add_option ('googlelanguagetranslator_language','en');
 
 
277
 
278
- if ( get_option( 'googlelanguagetranslator_language' ) == false ) {
279
- // The option already exists, so we just update it.
280
- update_option( 'googlelanguagetranslator_language','en');
281
- }
282
- $options = get_option( 'googlelanguagetranslator_language' ); ?>
283
- <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
 
 
284
  <option value="af" <?php if($options=='af'){echo "selected";}?>>Afrikaans</option>
285
  <option value="sq" <?php if($options=='sq'){echo "selected";}?>>Albanian</option>
286
  <option value="ar" <?php if($options=='ar'){echo "selected";}?>>Arabic</option>
@@ -355,16 +424,21 @@ function initialize_settings() {
355
  <option value="yi" <?php if($options=='yi'){echo "selected";}?>>Yiddish</option>
356
  </select>
357
  <?php
 
358
  }
359
 
360
  function googlelanguagetranslator_language_option_cb() {
361
- add_option ('googlelanguagetranslator_language_option','all');
 
 
362
 
363
- if ( get_option( 'googlelanguagetranslator_language_option' ) == false ) {
364
- // The option already exists, so we just update it.
365
- update_option( 'googlelanguagetranslator_flags', 'all' );
366
- }
367
- $options = get_option('googlelanguagetranslator_language_option'); ?>
 
 
368
 
369
  <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
370
  <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
@@ -375,15 +449,307 @@ function initialize_settings() {
375
  function language_display_settings_cb() {
376
  $defaults = array (
377
  'en' => 1
378
- );
379
- add_option ('language_display_settings',$defaults);
 
 
 
 
380
 
381
- if ( get_option( 'language_display_settings' ) == false ) {
382
- // The option already exists, so we just update it.
383
- update_option( 'language_display_settings', $defaults );
 
 
 
 
 
384
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385
 
386
- $get_language_choices = get_option ('language_display_settings'); ?>
387
  <div class="languages" style="width:25%; float:left">
388
  <div><input type="checkbox" name="language_display_settings[af]" value="1"<?php if ( 1 == $get_language_choices['af'] ) echo 'checked="checked"'; ?> /> Afrikaans</div>
389
  <div><input type="checkbox" name="language_display_settings[sq]" value="1"<?php if ( 1 == $get_language_choices['sq'] ) echo 'checked="checked"'; ?> /> Albanian</div>
@@ -473,14 +839,16 @@ function initialize_settings() {
473
 
474
  function googlelanguagetranslator_flags_cb() {
475
 
476
- add_option ('googlelanguagetranslator_flags','hide_flags');
 
477
 
478
- if ( get_option( 'googlelanguagetranslator_flags' ) == false ) {
479
- // The option already exists, so we just update it.
480
- update_option( 'googlelanguagetranslator_flags', 'hide_flags' );
481
- }
 
482
 
483
- $options = get_option('googlelanguagetranslator_flags','hide_flags'); ?>
484
 
485
  <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
486
  <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
@@ -491,15 +859,17 @@ function initialize_settings() {
491
  $defaults = array(
492
  'flag-en' => 1
493
  );
494
- add_option ('flag_display_settings', $defaults);
495
 
 
 
496
 
497
- if ( get_option( 'flag_display_settings' ) == false ) {
498
- // The option already exists, so we just update it.
499
- update_option( 'flag_display_settings', $defaults );
500
- }
 
501
 
502
- $get_flag_choices = get_option('flag_display_settings');
503
 
504
  if (!isset ( $get_flag_choices ['flag-af'] ) ) {
505
  $get_flag_choices['flag-af'] = 0;
@@ -741,7 +1111,7 @@ function initialize_settings() {
741
  $get_flag_choices['flag-sl'] = 0;
742
  }
743
 
744
- if (!isset ( $get_flag_choices ['flag-sw'] ) ) {
745
  $get_flag_choices['flag-es'] = 0;
746
  }
747
 
@@ -875,20 +1245,22 @@ function initialize_settings() {
875
  <div><input type="checkbox" name="flag_display_settings[flag-vi]" value="1"<?php checked( 1,$get_flag_choices['flag-vi']); ?> /> Vietnamese</div>
876
  <div><input type="checkbox" name="flag_display_settings[flag-cy]" value="1"<?php checked( 1,$get_flag_choices['flag-cy']); ?> /> Welsh</div>
877
  <div><input type="checkbox" name="flag_display_settings[flag-yi]" value="1"<?php checked( 1,$get_flag_choices['flag-yi']); ?> /> Yiddish</div>
878
-
879
-
880
- </div>
881
  <div style="clear:both"></div>
882
  <?php }
883
 
884
  function googlelanguagetranslator_translatebox_cb() {
885
- add_option ('googlelanguagetranslator_translatebox','yes');
 
 
886
 
887
- if ( get_option( 'googlelanguagetranslator_translatebox' ) == false ) {
888
- // The option already exists, so we just update it.
889
- update_option( 'googlelanguagetranslator_translatebox', 'yes' );
890
- }
891
- $options = get_option('googlelanguagetranslator_translatebox'); ?>
 
 
892
 
893
  <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
894
  <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
@@ -897,27 +1269,38 @@ function initialize_settings() {
897
  <?php }
898
 
899
  function googlelanguagetranslator_display_cb() {
900
- add_option ('googlelanguagetranslator_display','Vertical');
 
 
 
 
 
 
 
 
 
 
901
 
902
- if ( get_option( 'googlelanguagetranslator_display' ) == false ) {
903
- // The option already exists, so we just update it.
904
- update_option( 'googlelanguagetranslator_display', 'Vertical' );
905
- }
906
- $options = get_option('googlelanguagetranslator_display'); ?>
907
  <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
908
  <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
909
  <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
 
910
  </select>
911
  <?php }
912
 
913
  function googlelanguagetranslator_toolbar_cb() {
914
- add_option ('googlelanguagetranslator_toolbar','Yes');
 
 
 
 
 
 
 
 
 
 
915
 
916
- if ( get_option( 'googlelanguagetranslator_toolbar' ) == false ) {
917
- // The option already exists, so we just update it.
918
- update_option( 'googlelanguagetranslator_toolbar', 'Yes' );
919
- }
920
- $options = get_option('googlelanguagetranslator_toolbar'); ?>
921
  <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
922
  <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
923
  <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
@@ -925,13 +1308,18 @@ function initialize_settings() {
925
  <?php }
926
 
927
  function googlelanguagetranslator_showbranding_cb() {
928
- add_option ('googlelanguagetranslator_showbranding','Yes');
 
 
 
 
 
 
 
 
 
 
929
 
930
- if ( get_option( 'googlelanguagetranslator_showbranding' ) == false ) {
931
- // The option already exists, so we just update it.
932
- update_option( 'googlelanguagetranslator_showbranding', 'Yes' );
933
- }
934
- $options = get_option('googlelanguagetranslator_showbranding'); ?>
935
  <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
936
  <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
937
  <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
@@ -939,22 +1327,73 @@ function initialize_settings() {
939
  <?php }
940
 
941
  function googlelanguagetranslator_flags_alignment_cb() {
942
- add_option ('googlelanguagetranslator_flags_alignment','flags_left');
 
 
943
 
944
- if ( get_option( 'googlelanguagetranslator_flags_alignment' ) == false ) {
945
- // The option already exists, so we just update it.
946
- update_option( 'googlelanguagetranslator_flags_alignment', 'flags_left' );
947
- }
 
948
 
 
 
 
 
 
 
 
 
949
 
950
- $options = get_option('googlelanguagetranslator_flags_alignment','flags_left');
951
-
952
-
 
 
 
 
 
 
 
 
 
 
 
 
 
953
 
954
- ?>
955
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="googlelanguagetranslator_flags_alignment" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
956
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="googlelanguagetranslator_flags_alignment" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
957
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
958
 
959
 
960
 
@@ -978,669 +1417,677 @@ function googlelanguagetranslator_included_languages() {
978
  $comma_separated = implode(",",array_values($items));
979
 
980
  if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
981
- $lang .= 'includedLanguages:\''.$comma_separated.'\',';
982
  return $lang;
983
  } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
984
- $lang .= 'includedLanguages:\''.$comma_separated.'\',';
985
  return $lang;
986
- }
987
- }
 
 
 
 
 
 
 
 
988
  }
989
 
990
- function googlelanguagetranslator_vertical(){
991
- $language_choices = googlelanguagetranslator_included_languages();
992
- if(get_option('googlelanguagetranslator_active')==1){
993
- $get_flag_choices = get_option ('flag_display_settings');
 
 
 
994
  foreach ($get_flag_choices as $key) {
995
  //print_r($key);
996
  }
997
 
998
-
999
-
1000
- $str='<div id="flags">';
1001
-
1002
 
1003
  if ($key == '1') {
1004
  if ( isset ( $get_flag_choices['flag-af'] ) ) {
1005
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|af\'); return false;" title="Afrikaans" class="flag af"></a>';
1006
  }
1007
 
1008
 
1009
  if ( isset ( $get_flag_choices['flag-sq'] ) ) {
1010
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sq\'); return false;" title="Albanian" class="flag sq"></a>';
1011
  }
1012
 
1013
  if ( isset ( $get_flag_choices['flag-ar'] ) ) {
1014
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ar\'); return false;" title="Arabic" class="flag ar"></a>';
1015
  }
1016
 
1017
  if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1018
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
1019
  }
1020
 
1021
  if ( isset ( $get_flag_choices['flag-az'] ) ) {
1022
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|az\'); return false;" title="Azerbaijani" class="flag az"></a>';
1023
  }
1024
 
1025
  if ( isset ( $get_flag_choices['flag-eu'] ) ) {
1026
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eu\'); return false;" title="Basque" class="flag eu"></a>';
1027
  }
1028
 
1029
  if ( isset ( $get_flag_choices['flag-be'] ) ) {
1030
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|be\'); return false;" title="Belarusian" class="flag be"></a>';
1031
  }
1032
 
1033
  if ( isset ( $get_flag_choices['flag-bn'] ) ) {
1034
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bn\'); return false;" title="Bengali" class="flag bn"></a>';
1035
  }
1036
 
1037
  if ( isset ( $get_flag_choices['flag-bs'] ) ) {
1038
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bs\'); return false;" title="Bosnian" class="flag bs"></a>';
1039
  }
1040
 
1041
  if ( isset ( $get_flag_choices['flag-bg'] ) ) {
1042
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bg\'); return false;" title="Bulgarian" class="flag bg"></a>';
1043
  }
1044
 
1045
  if ( isset ( $get_flag_choices['flag-ca'] ) ) {
1046
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ca\'); return false;" title="Catalan" class="flag ca"></a>';
1047
  }
1048
 
1049
  if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
1050
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ceb\'); return false;" title="Cebuano" class="flag ceb"></a>';
1051
  }
1052
 
1053
  if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
1054
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\'); return false;" title="Chinese (Simplified)" class="flag zh-CN"></a>';
1055
  }
1056
 
1057
  if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
1058
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-TW\'); return false;" title="Chinese (Traditional)" class="flag zh-TW"></a>';
1059
  }
1060
 
1061
  if ( isset ( $get_flag_choices['flag-cs'] ) ) {
1062
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cs\'); return false;" title="Czech Republic" class="flag cs"></a>';
1063
  }
1064
 
1065
  if ( isset ( $get_flag_choices['flag-hr'] ) ) {
1066
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hr\'); return false;" title="Croatian" class="flag hr"></a>';
1067
  }
1068
 
1069
  if ( isset ( $get_flag_choices['flag-da'] ) ) {
1070
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\'); return false;" title="Danish" class="flag da"></a>';
1071
  }
1072
 
1073
  if ( isset ( $get_flag_choices['flag-nl'] ) ) {
1074
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|nl\'); return false;" title="Netherlands" class="flag nl"></a>';
1075
  }
1076
 
1077
  if ( isset ( $get_flag_choices['flag-en'] ) ) {
1078
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\'); return false;" title="English" class="flag en"></a>';
1079
  }
1080
 
1081
  if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1082
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eo\'); return false;" title="Esperanto" class="flag eo"></a>';
1083
  }
1084
 
1085
  if ( isset ( $get_flag_choices['flag-et'] ) ) {
1086
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|et\'); return false;" title="Estonian" class="flag et"></a>';
1087
  }
1088
 
1089
  if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1090
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tl\'); return false;" title="Filipino" class="flag tl"></a>';
1091
  }
1092
 
1093
  if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1094
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fi\'); return false;" title="Finnish" class="flag fi"></a>';
1095
  }
1096
 
1097
  if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1098
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\'); return false;" title="French" class="flag fr"></a>';
1099
  }
1100
 
1101
  if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1102
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gl\'); return false;" title="Galician" class="flag gl"></a>';
1103
  }
1104
 
1105
  if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1106
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ka\'); return false;" title="Georgian" class="flag ka"></a>';
1107
  }
1108
 
1109
  if ( isset ( $get_flag_choices['flag-de'] ) ) {
1110
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\'); return false;" title="German" class="flag de"></a>';
1111
  }
1112
 
1113
  if ( isset ( $get_flag_choices['flag-el'] ) ) {
1114
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|el\'); return false;" title="Greek" class="flag el"></a>';
1115
  }
1116
 
1117
  if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1118
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gu\'); return false;" title="Gujarati" class="flag gu"></a>';
1119
  }
1120
 
1121
  if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1122
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ht\'); return false;" title="Haitian" class="flag ht"></a>';
1123
  }
1124
 
1125
  if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1126
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|iw\'); return false;" title="Hebrew" class="flag iw"></a>';
1127
  }
1128
 
1129
  if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1130
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hi\'); return false;" title="Hindi" class="flag hi"></a>';
1131
  }
1132
 
1133
  if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1134
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hmn\'); return false;" title="Hmong" class="flag hmn"></a>';
1135
  }
1136
 
1137
  if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1138
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hu\'); return false;" title="Hungarian" class="flag hu"></a>';
1139
  }
1140
 
1141
  if ( isset ( $get_flag_choices['flag-is'] ) ) {
1142
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|is\'); return false;" title="Iceland" class="flag is"></a>';
1143
  }
1144
 
1145
  if ( isset ( $get_flag_choices['flag-id'] ) ) {
1146
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|id\'); return false;" title="Indonesian" class="flag id"></a>';
1147
  }
1148
 
1149
  if ( isset ( $get_flag_choices['flag-ga'] ) ) {
1150
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ga\'); return false;" title="Irish" class="flag ga"></a>';
1151
  }
1152
 
1153
  if ( isset ( $get_flag_choices['flag-it'] ) ) {
1154
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\'); return false;" title="Italian" class="flag it"></a>';
1155
  }
1156
 
1157
  if ( isset ( $get_flag_choices['flag-ja'] ) ) {
1158
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ja\'); return false;" title="Japanese" class="flag ja"></a>';
1159
  }
1160
 
1161
  if ( isset ( $get_flag_choices['flag-jw'] ) ) {
1162
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|jw\'); return false;" title="Javanese" class="flag jw"></a>';
1163
  }
1164
 
1165
  if ( isset ( $get_flag_choices['flag-kn'] ) ) {
1166
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|kn\'); return false;" title="Kannada" class="flag kn"></a>';
1167
  }
1168
 
1169
  if ( isset ( $get_flag_choices['flag-km'] ) ) {
1170
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|km\'); return false;" title="Khmer" class="flag km"></a>';
1171
  }
1172
 
1173
  if ( isset ( $get_flag_choices['flag-ko'] ) ) {
1174
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ko\'); return false;" title="Korean" class="flag ko"></a>';
1175
  }
1176
 
1177
  if ( isset ( $get_flag_choices['flag-lo'] ) ) {
1178
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lo\'); return false;" title="Lao" class="flag lo"></a>';
1179
  }
1180
 
1181
  if ( isset ( $get_flag_choices['flag-la'] ) ) {
1182
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|la\'); return false;" title="Latin" class="flag la"></a>';
1183
  }
1184
 
1185
  if ( isset ( $get_flag_choices['flag-lv'] ) ) {
1186
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lv\'); return false;" title="Latvian" class="flag lv"></a>';
1187
  }
1188
 
1189
  if ( isset ( $get_flag_choices['flag-lt'] ) ) {
1190
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lt\'); return false;" title="Lithuanian" class="flag lt"></a>';
1191
  }
1192
 
1193
  if ( isset ( $get_flag_choices['flag-mk'] ) ) {
1194
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mk\'); return false;" title="Macedonian" class="flag mk"></a>';
1195
  }
1196
 
1197
  if ( isset ( $get_flag_choices['flag-ms'] ) ) {
1198
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ms\'); return false;" title="Malay" class="flag ms"></a>';
1199
  }
1200
 
1201
  if ( isset ( $get_flag_choices['flag-mt'] ) ) {
1202
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mt\'); return false;" title="Maltese" class="flag mt"></a>';
1203
  }
1204
 
1205
  if ( isset ( $get_flag_choices['flag-mr'] ) ) {
1206
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mr\'); return false;" title="Marathi" class="flag mr"></a>';
1207
  }
1208
 
1209
  if ( isset ( $get_flag_choices['flag-no'] ) ) {
1210
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|no\'); return false;" title="Norwegian" class="flag no"></a>';
1211
  }
1212
 
1213
  if ( isset ( $get_flag_choices['flag-fa'] ) ) {
1214
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fa\'); return false;" title="Persian" class="flag fa"></a>';
1215
  }
1216
 
1217
  if ( isset ( $get_flag_choices['flag-pl'] ) ) {
1218
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pl\'); return false;" title="Polish" class="flag pl"></a>';
1219
  }
1220
 
1221
  if ( isset ( $get_flag_choices['flag-pt'] ) ) {
1222
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pt\'); return false;" title="Portuguese" class="flag pt"></a>';
1223
  }
1224
 
1225
  if ( isset ( $get_flag_choices['flag-ro'] ) ) {
1226
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ro\'); return false;" title="Romanian" class="flag ro"></a>';
1227
  }
1228
 
1229
  if ( isset ( $get_flag_choices['flag-ru'] ) ) {
1230
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ru\'); return false;" title="Russian" class="flag ru"></a>';
1231
  }
1232
 
1233
  if ( isset ( $get_flag_choices['flag-sr'] ) ) {
1234
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sr\'); return false;" title="Serbian" class="flag sr"></a>';
1235
  }
1236
 
1237
  if ( isset ( $get_flag_choices['flag-sk'] ) ) {
1238
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sk\'); return false;" title="Slovak" class="flag sk"></a>';
1239
  }
1240
 
1241
  if ( isset ( $get_flag_choices['flag-sl'] ) ) {
1242
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sl\'); return false;" title="Slovenian" class="flag sl"></a>';
1243
  }
1244
 
1245
  if ( isset ( $get_flag_choices['flag-es'] ) ) {
1246
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\'); return false;" title="Spanish" class="flag es"></a>';
1247
  }
1248
 
1249
  if ( isset ( $get_flag_choices['flag-sw'] ) ) {
1250
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sw\'); return false;" title="Swahili" class="flag sw"></a>';
1251
  }
1252
 
1253
  if ( isset ( $get_flag_choices['flag-sv'] ) ) {
1254
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sv\'); return false;" title="Swedish" class="flag sv"></a>';
1255
  }
1256
 
1257
  if ( isset ( $get_flag_choices['flag-ta'] ) ) {
1258
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ta\'); return false;" title="Tamil" class="flag ta"></a>';
1259
  }
1260
 
1261
  if ( isset ( $get_flag_choices['flag-te'] ) ) {
1262
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|te\'); return false;" title="Telugu" class="flag te"></a>';
1263
  }
1264
 
1265
  if ( isset ( $get_flag_choices['flag-th'] ) ) {
1266
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|th\'); return false;" title="haiT" class="flag th"></a>';
1267
  }
1268
 
1269
  if ( isset ( $get_flag_choices['flag-tr'] ) ) {
1270
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tr\'); return false;" title="Turkish" class="flag tr"></a>';
1271
  }
1272
 
1273
  if ( isset ( $get_flag_choices['flag-uk'] ) ) {
1274
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|uk\'); return false;" title="Ukranian" class="flag uk"></a>';
1275
  }
1276
 
1277
  if ( isset ( $get_flag_choices['flag-ur'] ) ) {
1278
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ur\'); return false;" title="Urdu" class="flag ur"></a>';
1279
  }
1280
 
1281
  if ( isset ( $get_flag_choices['flag-vi'] ) ) {
1282
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|vi\'); return false;" title="Vietnamese" class="flag vi"></a>';
1283
- }
1284
-
1285
- if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1286
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
1287
  }
1288
 
1289
  if ( isset ( $get_flag_choices['flag-cy'] ) ) {
1290
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cy\'); return false;" title="Welsh" class="flag cy"></a>';
1291
  }
1292
 
1293
  if ( isset ( $get_flag_choices['flag-yi'] ) ) {
1294
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|yi\'); return false;" title="Yiddish (Jewish)" class="flag yi"></a>';
1295
  }
1296
 
 
 
1297
 
1298
- // }
1299
-
1300
- $str.='<div class="glt-clear"></div>';
1301
-
1302
- $str.='</div>';
1303
 
1304
  $str.='<script type="text/javascript">
1305
  function GoogleLanguageTranslatorInit() {
1306
- new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.'autoDisplay: false }, \'google_language_translator\');}
1307
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
1308
  <div id="google_language_translator"></div>';
1309
  return $str;
 
1310
  }
1311
- }
1312
  }
1313
 
1314
  function googlelanguagetranslator_horizontal(){
 
 
1315
  $language_choices = googlelanguagetranslator_included_languages();
1316
- if(get_option('googlelanguagetranslator_active')==1){
1317
- $get_flag_choices = get_option ('flag_display_settings');
 
1318
 
1319
- $str = '<div id="flags">';
1320
-
1321
  foreach ($get_flag_choices as $key) {
1322
  //print_r($key);
 
 
1323
  }
 
 
 
 
 
1324
  if ($key == '1') {
1325
  if ( isset ( $get_flag_choices['flag-af'] ) ) {
1326
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|af\'); return false;" title="Afrikaans" class="flag af"></a>';
1327
  }
1328
 
1329
 
1330
  if ( isset ( $get_flag_choices['flag-sq'] ) ) {
1331
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sq\'); return false;" title="Albanian" class="flag sq"></a>';
1332
  }
1333
 
1334
  if ( isset ( $get_flag_choices['flag-ar'] ) ) {
1335
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ar\'); return false;" title="Arabic" class="flag ar"></a>';
1336
  }
1337
 
1338
  if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1339
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
1340
  }
1341
 
1342
  if ( isset ( $get_flag_choices['flag-az'] ) ) {
1343
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|az\'); return false;" title="Azerbaijani" class="flag az"></a>';
1344
  }
1345
 
1346
  if ( isset ( $get_flag_choices['flag-eu'] ) ) {
1347
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eu\'); return false;" title="Basque" class="flag eu"></a>';
1348
  }
1349
 
1350
  if ( isset ( $get_flag_choices['flag-be'] ) ) {
1351
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|be\'); return false;" title="Belarusian" class="flag be"></a>';
1352
  }
1353
 
1354
  if ( isset ( $get_flag_choices['flag-bn'] ) ) {
1355
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bn\'); return false;" title="Bengali" class="flag bn"></a>';
1356
  }
1357
 
1358
  if ( isset ( $get_flag_choices['flag-bs'] ) ) {
1359
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bs\'); return false;" title="Bosnian" class="flag bs"></a>';
1360
  }
1361
 
1362
  if ( isset ( $get_flag_choices['flag-bg'] ) ) {
1363
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bg\'); return false;" title="Bulgarian" class="flag bg"></a>';
1364
  }
1365
 
1366
  if ( isset ( $get_flag_choices['flag-ca'] ) ) {
1367
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ca\'); return false;" title="Catalan" class="flag ca"></a>';
1368
  }
1369
 
1370
  if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
1371
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ceb\'); return false;" title="Cebuano" class="flag ceb"></a>';
1372
  }
1373
 
1374
  if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
1375
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\'); return false;" title="Chinese (Simplified)" class="flag zh-CN"></a>';
1376
  }
1377
 
1378
  if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
1379
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-TW\'); return false;" title="Chinese (Traditional)" class="flag zh-TW"></a>';
1380
  }
1381
 
1382
  if ( isset ( $get_flag_choices['flag-cs'] ) ) {
1383
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cs\'); return false;" title="Czech Republic" class="flag cs"></a>';
1384
  }
1385
 
1386
  if ( isset ( $get_flag_choices['flag-hr'] ) ) {
1387
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hr\'); return false;" title="Croatian" class="flag hr"></a>';
1388
  }
1389
 
1390
  if ( isset ( $get_flag_choices['flag-da'] ) ) {
1391
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\'); return false;" title="Danish" class="flag da"></a>';
1392
  }
1393
 
1394
  if ( isset ( $get_flag_choices['flag-nl'] ) ) {
1395
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|nl\'); return false;" title="Netherlands" class="flag nl"></a>';
1396
  }
1397
 
1398
  if ( isset ( $get_flag_choices['flag-en'] ) ) {
1399
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\'); return false;" title="English" class="flag en"></a>';
1400
  }
1401
 
1402
  if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1403
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eo\'); return false;" title="Esperanto" class="flag eo"></a>';
1404
  }
1405
 
1406
  if ( isset ( $get_flag_choices['flag-et'] ) ) {
1407
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|et\'); return false;" title="Estonian" class="flag et"></a>';
1408
  }
1409
 
1410
  if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1411
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tl\'); return false;" title="Filipino" class="flag tl"></a>';
1412
  }
1413
 
1414
  if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1415
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fi\'); return false;" title="Finnish" class="flag fi"></a>';
1416
- }
1417
 
1418
  if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1419
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\'); return false;" title="French" class="flag fr"></a>';
1420
  }
1421
 
1422
  if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1423
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gl\'); return false;" title="Galician" class="flag gl"></a>';
1424
  }
1425
 
1426
  if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1427
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ka\'); return false;" title="Georgian" class="flag ka"></a>';
1428
  }
1429
 
1430
  if ( isset ( $get_flag_choices['flag-de'] ) ) {
1431
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\'); return false;" title="German" class="flag de"></a>';
1432
  }
1433
 
1434
  if ( isset ( $get_flag_choices['flag-el'] ) ) {
1435
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|el\'); return false;" title="Greek" class="flag el"></a>';
1436
  }
1437
 
1438
  if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1439
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gu\'); return false;" title="Gujarati" class="flag gu"></a>';
1440
  }
1441
 
1442
  if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1443
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ht\'); return false;" title="Haitian" class="flag ht"></a>';
1444
  }
1445
 
1446
  if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1447
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|iw\'); return false;" title="Hebrew" class="flag iw"></a>';
1448
  }
1449
 
1450
  if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1451
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hi\'); return false;" title="Hindi" class="flag hi"></a>';
1452
  }
1453
 
1454
  if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1455
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hmn\'); return false;" title="Hmong" class="flag hmn"></a>';
1456
  }
1457
 
1458
  if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1459
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hu\'); return false;" title="Hungarian" class="flag hu"></a>';
1460
  }
1461
 
1462
  if ( isset ( $get_flag_choices['flag-is'] ) ) {
1463
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|is\'); return false;" title="Iceland" class="flag is"></a>';
1464
  }
1465
 
1466
  if ( isset ( $get_flag_choices['flag-id'] ) ) {
1467
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|id\'); return false;" title="Indonesian" class="flag id"></a>';
1468
  }
1469
 
1470
  if ( isset ( $get_flag_choices['flag-ga'] ) ) {
1471
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ga\'); return false;" title="Irish" class="flag ga"></a>';
1472
  }
1473
 
1474
  if ( isset ( $get_flag_choices['flag-it'] ) ) {
1475
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\'); return false;" title="Italian" class="flag it"></a>';
1476
  }
1477
 
1478
  if ( isset ( $get_flag_choices['flag-ja'] ) ) {
1479
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ja\'); return false;" title="Japanese" class="flag ja"></a>';
1480
  }
1481
 
1482
  if ( isset ( $get_flag_choices['flag-jw'] ) ) {
1483
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|jw\'); return false;" title="Javanese" class="flag jw"></a>';
1484
  }
1485
 
1486
  if ( isset ( $get_flag_choices['flag-kn'] ) ) {
1487
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|kn\'); return false;" title="Kannada" class="flag kn"></a>';
1488
  }
1489
 
1490
  if ( isset ( $get_flag_choices['flag-km'] ) ) {
1491
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|km\'); return false;" title="Khmer" class="flag km"></a>';
1492
  }
1493
 
1494
  if ( isset ( $get_flag_choices['flag-ko'] ) ) {
1495
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ko\'); return false;" title="Korean" class="flag ko"></a>';
1496
  }
1497
 
1498
  if ( isset ( $get_flag_choices['flag-lo'] ) ) {
1499
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lo\'); return false;" title="Lao" class="flag lo"></a>';
1500
  }
1501
 
1502
  if ( isset ( $get_flag_choices['flag-la'] ) ) {
1503
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|la\'); return false;" title="Latin" class="flag la"></a>';
1504
  }
1505
 
1506
  if ( isset ( $get_flag_choices['flag-lv'] ) ) {
1507
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lv\'); return false;" title="Latvian" class="flag lv"></a>';
1508
  }
1509
 
1510
  if ( isset ( $get_flag_choices['flag-lt'] ) ) {
1511
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lt\'); return false;" title="Lithuanian" class="flag lt"></a>';
1512
  }
1513
 
1514
  if ( isset ( $get_flag_choices['flag-mk'] ) ) {
1515
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mk\'); return false;" title="Macedonian" class="flag mk"></a>';
1516
  }
1517
 
1518
  if ( isset ( $get_flag_choices['flag-ms'] ) ) {
1519
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ms\'); return false;" title="Malay" class="flag ms"></a>';
1520
  }
1521
 
1522
  if ( isset ( $get_flag_choices['flag-mt'] ) ) {
1523
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mt\'); return false;" title="Maltese" class="flag mt"></a>';
1524
  }
1525
 
1526
  if ( isset ( $get_flag_choices['flag-mr'] ) ) {
1527
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mr\'); return false;" title="Marathi" class="flag mr"></a>';
1528
  }
1529
 
1530
  if ( isset ( $get_flag_choices['flag-no'] ) ) {
1531
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|no\'); return false;" title="Norwegian" class="flag no"></a>';
1532
  }
1533
 
1534
  if ( isset ( $get_flag_choices['flag-fa'] ) ) {
1535
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fa\'); return false;" title="Persian" class="flag fa"></a>';
1536
  }
1537
 
1538
  if ( isset ( $get_flag_choices['flag-pl'] ) ) {
1539
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pl\'); return false;" title="Polish" class="flag pl"></a>';
1540
  }
1541
 
1542
  if ( isset ( $get_flag_choices['flag-pt'] ) ) {
1543
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pt\'); return false;" title="Portuguese" class="flag pt"></a>';
1544
  }
1545
 
1546
  if ( isset ( $get_flag_choices['flag-ro'] ) ) {
1547
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ro\'); return false;" title="Romanian" class="flag ro"></a>';
1548
  }
1549
 
1550
  if ( isset ( $get_flag_choices['flag-ru'] ) ) {
1551
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ru\'); return false;" title="Russian" class="flag ru"></a>';
1552
  }
1553
 
1554
  if ( isset ( $get_flag_choices['flag-sr'] ) ) {
1555
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sr\'); return false;" title="Serbian" class="flag sr"></a>';
1556
  }
1557
 
1558
  if ( isset ( $get_flag_choices['flag-sk'] ) ) {
1559
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sk\'); return false;" title="Slovak" class="flag sk"></a>';
1560
  }
1561
 
1562
  if ( isset ( $get_flag_choices['flag-sl'] ) ) {
1563
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sl\'); return false;" title="Slovenian" class="flag sl"></a>';
1564
  }
1565
 
1566
  if ( isset ( $get_flag_choices['flag-es'] ) ) {
1567
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\'); return false;" title="Spanish" class="flag es"></a>';
1568
  }
1569
 
1570
  if ( isset ( $get_flag_choices['flag-sw'] ) ) {
1571
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sw\'); return false;" title="Swahili" class="flag sw"></a>';
1572
  }
1573
 
1574
  if ( isset ( $get_flag_choices['flag-sv'] ) ) {
1575
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sv\'); return false;" title="Swedish" class="flag sv"></a>';
1576
  }
1577
 
1578
  if ( isset ( $get_flag_choices['flag-ta'] ) ) {
1579
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ta\'); return false;" title="Tamil" class="flag ta"></a>';
1580
  }
1581
 
1582
  if ( isset ( $get_flag_choices['flag-te'] ) ) {
1583
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|te\'); return false;" title="Telugu" class="flag te"></a>';
1584
  }
1585
 
1586
  if ( isset ( $get_flag_choices['flag-th'] ) ) {
1587
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|th\'); return false;" title="haiT" class="flag th"></a>';
1588
  }
1589
 
1590
  if ( isset ( $get_flag_choices['flag-tr'] ) ) {
1591
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tr\'); return false;" title="Turkish" class="flag tr"></a>';
1592
  }
1593
 
1594
  if ( isset ( $get_flag_choices['flag-uk'] ) ) {
1595
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|uk\'); return false;" title="Ukranian" class="flag uk"></a>';
1596
  }
1597
 
1598
  if ( isset ( $get_flag_choices['flag-ur'] ) ) {
1599
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ur\'); return false;" title="Urdu" class="flag ur"></a>';
1600
  }
1601
 
1602
  if ( isset ( $get_flag_choices['flag-vi'] ) ) {
1603
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|vi\'); return false;" title="Vietnamese" class="flag vi"></a>';
1604
- }
1605
-
1606
- if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1607
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="flag hy"></a>';
1608
  }
1609
 
1610
  if ( isset ( $get_flag_choices['flag-cy'] ) ) {
1611
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cy\'); return false;" title="Welsh" class="flag cy"></a>';
1612
  }
1613
 
1614
  if ( isset ( $get_flag_choices['flag-yi'] ) ) {
1615
- $str.='<a href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|yi\'); return false;" title="Yiddish (Jewish)" class="flag yi"></a>';
1616
  }
 
 
1617
 
1618
 
1619
-
1620
-
1621
-
1622
- $str.='</div>';
1623
  $str.='<script type="text/javascript">
1624
  function GoogleLanguageTranslatorInit() {
1625
- new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.' layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,autoDisplay: false }, \'google_language_translator\'); }
1626
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
1627
  <div id="google_language_translator"></div>';
1628
  return $str;
 
1629
  }
1630
  }
1631
  }
1632
 
1633
 
 
1634
  function googlelanguagetranslator_toolbar_yes(){
1635
- if(get_option('googlelanguagetranslator_active')==1) {
1636
- $str='<style type="text/css">';
1637
- $str.='#google_language_translator {color: transparent;}';
1638
- $str.='.goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}';
1639
- $str.='.goog-tooltip {display: none !important;}';
1640
- $str.='.goog-tooltip:hover {display: none !important;}';
1641
- $str.='.goog-text-highlight {background-color: transparent !important; border: none !important;box-shadow: none !important;}';
1642
- $str.='</style>';
1643
- return $str;
1644
  }
1645
  }
1646
 
@@ -1691,19 +2138,25 @@ function googlelanguagetranslator_showbranding_no() {
1691
  <style type="text/css">
1692
  #google_language_translator a {display: none !important; }
1693
  .goog-te-gadget {color:transparent !important;}
 
 
 
1694
  .goog-te-gadget { font-size:0px !important; }
1695
  .goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
1696
  .goog-tooltip {display: none !important;}
1697
  .goog-tooltip:hover {display: none !important;}
1698
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
1699
-
1700
  </style>
1701
  <?php
1702
  }
1703
  }
1704
 
1705
- function googlelanguagetranslator_flags_display() { ?>
 
 
1706
  <style type="text/css">
 
1707
  <?php if(get_option('googlelanguagetranslator_display')=='Vertical') { ?>
1708
  <?php if (get_option('googlelanguagetranslator_language_option')=='specific') { ?>
1709
  #flags {display:none !important; }
@@ -1723,748 +2176,32 @@ function googlelanguagetranslator_flags_display() { ?>
1723
  p.hello { font-size:12px; color:#666; }
1724
  <?php } ?>
1725
  <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
1726
- #google_language_translator { clear:both; width:auto !important; text-align:right; }
1727
- #flags { text-align:right; width:150px; float:right; clear:right; }
1728
- p.hello { text-align:right; float:right; clear:both; color:#666; }
 
 
1729
  .glt-clear { height:0px; clear:both; margin:0px; padding:0px; }
1730
  <?php } ?>
1731
  <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') { ?>
1732
  #google_language_translator { clear:both; }
1733
- #flags { width:150px; }
1734
- #flags a { display:inline-block; width:16px; height:12px; margin-right:2px; }
1735
- p.hello { font-size:12px; color:#666; }
 
 
 
1736
  <?php } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
1737
- #flags { width:150px; }
1738
- #flags a { display:inline-block; width:16px; height:12px; margin-left:2px; } ?>
1739
- <?php } ?>
 
 
1740
  </style>
1741
- <?php
1742
- $get_flag_choices = get_option ('flag_display_settings');
1743
-
1744
- if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) { ?>
1745
- <style type="text/css">
1746
- #flags a.zh-CN { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/china.png") 0px 0px no-repeat; }
1747
- </style>
1748
- <?php } else { ?>
1749
- <style type="text/css">
1750
- #flags a.zh-CN { display:none; }
1751
- </style>
1752
- <?php }
1753
-
1754
- if ( isset ( $get_flag_choices['flag-de'] ) ) { ?>
1755
- <style type="text/css">
1756
- #flags a.de { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/germany.png") 0px 0px no-repeat; }
1757
- </style>
1758
- <?php } else { ?>
1759
- <style type="text/css">
1760
- #flags a.de { display:none; }
1761
- </style>
1762
- <?php }
1763
-
1764
- if ( isset ( $get_flag_choices['flag-da'] ) ) { ?>
1765
- <style type="text/css">
1766
- #flags a.da { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/denmark.png") 0px 0px no-repeat; }
1767
- </style>
1768
- <?php } else { ?>
1769
- <style type="text/css">
1770
- #flags a.da { display:none; }
1771
- </style>
1772
- <?php }
1773
-
1774
- if ( isset ( $get_flag_choices['flag-fr'] ) ) { ?>
1775
- <style type="text/css">
1776
- #flags a.fr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/france.png") 0px 0px no-repeat; }
1777
- </style>
1778
- <?php } else { ?>
1779
- <style type="text/css">
1780
- #flags a.fr { display:none; }
1781
- </style>
1782
- <?php }
1783
-
1784
- if ( isset ( $get_flag_choices['flag-en'] ) ) { ?>
1785
- <style type="text/css">
1786
- #flags a.en { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/united-kingdom.png") 0px 0px no-repeat; }
1787
- </style>
1788
- <?php } else { ?>
1789
- <style type="text/css">
1790
- #flags a.en { display:none; }
1791
- </style>
1792
- <?php }
1793
-
1794
- if ( isset ( $get_flag_choices['flag-it'] ) ) { ?>
1795
- <style type="text/css">
1796
- #flags a.it { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/italy.png") 0px 0px no-repeat; }
1797
- </style>
1798
- <?php } else { ?>
1799
- <style type="text/css">
1800
- #flags a.it { display:none; }
1801
- </style>
1802
- <?php }
1803
-
1804
- if ( isset ( $get_flag_choices['flag-es'] ) ) { ?>
1805
- <style type="text/css">
1806
- #flags a.es { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/spain.png") 0px 0px no-repeat; }
1807
- </style>
1808
- <?php } else { ?>
1809
- <style type="text/css">
1810
- #flags a.es { display:none; }
1811
- </style>
1812
- <?php }
1813
-
1814
-
1815
-
1816
- if ( isset ( $get_flag_choices['flag-af'] ) ) { ?>
1817
- <style type="text/css">
1818
- #flags a.af { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/southafrica.png") 0px 0px no-repeat; }
1819
- </style>
1820
- <?php } else { ?>
1821
- <style type="text/css">
1822
- #flags a.af { display:none; }
1823
- </style>
1824
- <?php }
1825
-
1826
- if ( isset ( $get_flag_choices['flag-sq'] ) ) { ?>
1827
- <style type="text/css">
1828
- #flags a.sq { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/albania.png") 0px 0px no-repeat; }
1829
- </style>
1830
- <?php } else { ?>
1831
- <style type="text/css">
1832
- #flags a.sq { display:none; }
1833
- </style>
1834
- <?php }
1835
-
1836
- if ( isset ( $get_flag_choices['flag-ar'] ) ) { ?>
1837
- <style type="text/css">
1838
- #flags a.ar { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/saudiarabia.png") 0px 0px no-repeat; }
1839
- </style>
1840
- <?php } else { ?>
1841
- <style type="text/css">
1842
- #flags a.ar { display:none; }
1843
- </style>
1844
- <?php }
1845
-
1846
- if ( isset ( $get_flag_choices['flag-hy'] ) ) { ?>
1847
- <style type="text/css">
1848
- #flags a.hy { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/armenia.png") 0px 0px no-repeat; }
1849
- </style>
1850
- <?php } else { ?>
1851
- <style type="text/css">
1852
- #flags a.hy { display:none; }
1853
- </style>
1854
- <?php }
1855
-
1856
- if ( isset ( $get_flag_choices['flag-az'] ) ) { ?>
1857
- <style type="text/css">
1858
- #flags a.az { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/azerbaijan.png") 0px 0px no-repeat; }
1859
- </style>
1860
- <?php } else { ?>
1861
- <style type="text/css">
1862
- #flags a.az { display:none; }
1863
- </style>
1864
- <?php }
1865
-
1866
- if ( isset ( $get_flag_choices['flag-eu'] ) ) { ?>
1867
- <style type="text/css">
1868
- #flags a.eu { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/basque.png") 0px 0px no-repeat; }
1869
- </style>
1870
- <?php } else { ?>
1871
- <style type="text/css">
1872
- #flags a.eu { display:none; }
1873
- </style>
1874
- <?php }
1875
-
1876
- if ( isset ( $get_flag_choices['flag-be'] ) ) { ?>
1877
- <style type="text/css">
1878
- #flags a.be { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/belarus.png") 0px 0px no-repeat; }
1879
- </style>
1880
- <?php } else { ?>
1881
- <style type="text/css">
1882
- #flags a.be { display:none; }
1883
- </style>
1884
- <?php }
1885
-
1886
- if ( isset ( $get_flag_choices['flag-bn'] ) ) { ?>
1887
- <style type="text/css">
1888
- #flags a.bn { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/bangladesh.png") 0px 0px no-repeat; }
1889
- </style>
1890
- <?php } else { ?>
1891
- <style type="text/css">
1892
- #flags a.bn { display:none; }
1893
- </style>
1894
- <?php }
1895
-
1896
- if ( isset ( $get_flag_choices['flag-bs'] ) ) { ?>
1897
- <style type="text/css">
1898
- #flags a.bs { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/bosnia.png") 0px 0px no-repeat; }
1899
- </style>
1900
- <?php } else { ?>
1901
- <style type="text/css">
1902
- #flags a.bs { display:none; }
1903
- </style>
1904
- <?php }
1905
-
1906
- if ( isset ( $get_flag_choices['flag-bg'] ) ) { ?>
1907
- <style type="text/css">
1908
- #flags a.bg { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/bulgaria.png") 0px 0px no-repeat; }
1909
- </style>
1910
- <?php } else { ?>
1911
- <style type="text/css">
1912
- #flags a.bg { display:none; }
1913
- </style>
1914
- <?php }
1915
-
1916
- if ( isset ( $get_flag_choices['flag-ca'] ) ) { ?>
1917
- <style type="text/css">
1918
- #flags a.ca { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/spain.png") 0px 0px no-repeat; }
1919
- </style>
1920
- <?php } else { ?>
1921
- <style type="text/css">
1922
- #flags a.ca { display:none; }
1923
- </style>
1924
- <?php }
1925
-
1926
- if ( isset ( $get_flag_choices['flag-ceb'] ) ) { ?>
1927
- <style type="text/css">
1928
- #flags a.ceb { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/philippines.png") 0px 0px no-repeat; }
1929
- </style>
1930
- <?php } else { ?>
1931
- <style type="text/css">
1932
- #flags a.ceb { display:none; }
1933
- </style>
1934
- <?php }
1935
-
1936
-
1937
-
1938
- if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) { ?>
1939
- <style type="text/css">
1940
- #flags a.zh-TW { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/china.png") 0px 0px no-repeat; }
1941
- </style>
1942
- <?php } else { ?>
1943
- <style type="text/css">
1944
- #flags a.zh-TW { display:none; }
1945
- </style>
1946
- <?php }
1947
-
1948
- if ( isset ( $get_flag_choices['flag-cs'] ) ) { ?>
1949
- <style type="text/css">
1950
- #flags a.cs { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/croatia.png") 0px 0px no-repeat; }
1951
- </style>
1952
- <?php } else { ?>
1953
- <style type="text/css">
1954
- #flags a.cs { display:none; }
1955
- </style>
1956
- <?php }
1957
-
1958
- if ( isset ( $get_flag_choices['flag-hr'] ) ) { ?>
1959
- <style type="text/css">
1960
- #flags a.hr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/czechrepublic.png") 0px 0px no-repeat; }
1961
- </style>
1962
- <?php } else { ?>
1963
- <style type="text/css">
1964
- #flags a.hr { display:none; }
1965
- </style>
1966
- <?php }
1967
-
1968
- if ( isset ( $get_flag_choices['flag-nl'] ) ) { ?>
1969
- <style type="text/css">
1970
- #flags a.nl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/netherlands.png") 0px 0px no-repeat; }
1971
- </style>
1972
- <?php } else { ?>
1973
- <style type="text/css">
1974
- #flags a.nl { display:none; }
1975
- </style>
1976
- <?php }
1977
-
1978
- if ( isset ( $get_flag_choices['flag-eo'] ) ) { ?>
1979
- <style type="text/css">
1980
- #flags a.eo { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/esperanto.png") 0px 0px no-repeat; }
1981
- </style>
1982
- <?php } else { ?>
1983
- <style type="text/css">
1984
- #flags a.eo { display:none; }
1985
- </style>
1986
- <?php }
1987
-
1988
- if ( isset ( $get_flag_choices['flag-et'] ) ) { ?>
1989
- <style type="text/css">
1990
- #flags a.et { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/estonia.png") 0px 0px no-repeat; }
1991
- </style>
1992
- <?php } else { ?>
1993
- <style type="text/css">
1994
- #flags a.et { display:none; }
1995
- </style>
1996
- <?php }
1997
-
1998
- if ( isset ( $get_flag_choices['flag-tl'] ) ) { ?>
1999
- <style type="text/css">
2000
- #flags a.tl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/philippines.png") 0px 0px no-repeat; }
2001
- </style>
2002
- <?php } else { ?>
2003
- <style type="text/css">
2004
- #flags a.tl { display:none; }
2005
- </style>
2006
- <?php }
2007
-
2008
- if ( isset ( $get_flag_choices['flag-fi'] ) ) { ?>
2009
- <style type="text/css">
2010
- #flags a.fi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/finland.png") 0px 0px no-repeat; }
2011
- </style>
2012
- <?php } else { ?>
2013
- <style type="text/css">
2014
- #flags a.fi { display:none; }
2015
- </style>
2016
- <?php }
2017
-
2018
- if ( isset ( $get_flag_choices['flag-gl'] ) ) { ?>
2019
- <style type="text/css">
2020
- #flags a.gl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/galicia.png") 0px 0px no-repeat; }
2021
- </style>
2022
- <?php } else { ?>
2023
- <style type="text/css">
2024
- #flags a.gl { display:none; }
2025
- </style>
2026
- <?php }
2027
-
2028
- if ( isset ( $get_flag_choices['flag-ka'] ) ) { ?>
2029
- <style type="text/css">
2030
- #flags a.ka { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/georgia.png") 0px 0px no-repeat; }
2031
- </style>
2032
- <?php } else { ?>
2033
- <style type="text/css">
2034
- #flags a.ka { display:none; }
2035
- </style>
2036
- <?php }
2037
-
2038
- if ( isset ( $get_flag_choices['flag-el'] ) ) { ?>
2039
- <style type="text/css">
2040
- #flags a.el { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/greece.png") 0px 0px no-repeat; }
2041
- </style>
2042
- <?php } else { ?>
2043
- <style type="text/css">
2044
- #flags a.el { display:none; }
2045
- </style>
2046
- <?php }
2047
-
2048
- if ( isset ( $get_flag_choices['flag-gu'] ) ) { ?>
2049
- <style type="text/css">
2050
- #flags a.gu { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/india.png") 0px 0px no-repeat; }
2051
- </style>
2052
- <?php } else { ?>
2053
- <style type="text/css">
2054
- #flags a.gu { display:none; }
2055
- </style>
2056
- <?php }
2057
-
2058
- if ( isset ( $get_flag_choices['flag-ht'] ) ) { ?>
2059
- <style type="text/css">
2060
- #flags a.ht { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/haiti.png") 0px 0px no-repeat; }
2061
- </style>
2062
- <?php } else { ?>
2063
- <style type="text/css">
2064
- #flags a.ht { display:none; }
2065
- </style>
2066
- <?php }
2067
-
2068
- if ( isset ( $get_flag_choices['flag-iw'] ) ) { ?>
2069
- <style type="text/css">
2070
- #flags a.iw { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/israel.png") 0px 0px no-repeat; }
2071
- </style>
2072
- <?php } else { ?>
2073
- <style type="text/css">
2074
- #flags a.iw { display:none; }
2075
- </style>
2076
- <?php }
2077
-
2078
- if ( isset ( $get_flag_choices['flag-hi'] ) ) { ?>
2079
- <style type="text/css">
2080
- #flags a.hi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/india.png") 0px 0px no-repeat; }
2081
- </style>
2082
- <?php } else { ?>
2083
- <style type="text/css">
2084
- #flags a.hi { display:none; }
2085
- </style>
2086
- <?php }
2087
-
2088
- if ( isset ( $get_flag_choices['flag-hmn'] ) ) { ?>
2089
- <style type="text/css">
2090
- #flags a.hmn { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/hmong.png") 0px 0px no-repeat; }
2091
- </style>
2092
- <?php } else { ?>
2093
- <style type="text/css">
2094
- #flags a.hmn { display:none; }
2095
- </style>
2096
- <?php }
2097
-
2098
- if ( isset ( $get_flag_choices['flag-hu'] ) ) { ?>
2099
- <style type="text/css">
2100
- #flags a.hu { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/hungary.png") 0px 0px no-repeat; }
2101
- </style>
2102
- <?php } else { ?>
2103
- <style type="text/css">
2104
- #flags a.hu { display:none; }
2105
- </style>
2106
- <?php }
2107
-
2108
- if ( isset ( $get_flag_choices['flag-is'] ) ) { ?>
2109
- <style type="text/css">
2110
- #flags a.is { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/iceland.png") 0px 0px no-repeat; }
2111
- </style>
2112
- <?php } else { ?>
2113
- <style type="text/css">
2114
- #flags a.is { display:none; }
2115
- </style>
2116
- <?php }
2117
-
2118
- if ( isset ( $get_flag_choices['flag-id'] ) ) { ?>
2119
- <style type="text/css">
2120
- #flags a.id { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/indonesia.png") 0px 0px no-repeat; }
2121
- </style>
2122
- <?php } else { ?>
2123
- <style type="text/css">
2124
- #flags a.id { display:none; }
2125
- </style>
2126
- <?php }
2127
-
2128
- if ( isset ( $get_flag_choices['flag-ga'] ) ) { ?>
2129
- <style type="text/css">
2130
- #flags a.ga { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/ireland.png") 0px 0px no-repeat; }
2131
- </style>
2132
- <?php } else { ?>
2133
- <style type="text/css">
2134
- #flags a.ga { display:none; }
2135
- </style>
2136
- <?php }
2137
-
2138
- if ( isset ( $get_flag_choices['flag-ja'] ) ) { ?>
2139
- <style type="text/css">
2140
- #flags a.ja { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/japan.png") 0px 0px no-repeat; }
2141
- </style>
2142
- <?php } else { ?>
2143
- <style type="text/css">
2144
- #flags a.ja { display:none; }
2145
- </style>
2146
- <?php }
2147
-
2148
- if ( isset ( $get_flag_choices['flag-jw'] ) ) { ?>
2149
- <style type="text/css">
2150
- #flags a.jw { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/indonesia.png") 0px 0px no-repeat; }
2151
- </style>
2152
- <?php } else { ?>
2153
- <style type="text/css">
2154
- #flags a.jw { display:none; }
2155
- </style>
2156
- <?php }
2157
-
2158
- if ( isset ( $get_flag_choices['flag-kn'] ) ) { ?>
2159
- <style type="text/css">
2160
- #flags a.kn { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/kannada.png") 0px 0px no-repeat; }
2161
- </style>
2162
- <?php } else { ?>
2163
- <style type="text/css">
2164
- #flags a.kn { display:none; }
2165
- </style>
2166
- <?php }
2167
-
2168
- if ( isset ( $get_flag_choices['flag-km'] ) ) { ?>
2169
- <style type="text/css">
2170
- #flags a.km { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/cambodia.png") 0px 0px no-repeat; }
2171
- </style>
2172
- <?php } else { ?>
2173
- <style type="text/css">
2174
- #flags a.km { display:none; }
2175
- </style>
2176
- <?php }
2177
-
2178
- if ( isset ( $get_flag_choices['flag-ko'] ) ) { ?>
2179
- <style type="text/css">
2180
- #flags a.ko { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/korea.png") 0px 0px no-repeat; }
2181
- </style>
2182
- <?php } else { ?>
2183
- <style type="text/css">
2184
- #flags a.ko { display:none; }
2185
- </style>
2186
- <?php }
2187
-
2188
- if ( isset ( $get_flag_choices['flag-lo'] ) ) { ?>
2189
- <style type="text/css">
2190
- #flags a.lo { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/laos.png") 0px 0px no-repeat; }
2191
- </style>
2192
- <?php } else { ?>
2193
- <style type="text/css">
2194
- #flags a.lo { display:none; }
2195
- </style>
2196
- <?php }
2197
-
2198
- if ( isset ( $get_flag_choices['flag-la'] ) ) { ?>
2199
- <style type="text/css">
2200
- #flags a.la { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/latin.png") 0px 0px no-repeat; }
2201
- </style>
2202
- <?php } else { ?>
2203
- <style type="text/css">
2204
- #flags a.la { display:none; }
2205
- </style>
2206
- <?php }
2207
-
2208
- if ( isset ( $get_flag_choices['flag-lv'] ) ) { ?>
2209
- <style type="text/css">
2210
- #flags a.lv { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/latvia.png") 0px 0px no-repeat; }
2211
- </style>
2212
- <?php } else { ?>
2213
- <style type="text/css">
2214
- #flags a.lv { display:none; }
2215
- </style>
2216
- <?php }
2217
-
2218
- if ( isset ( $get_flag_choices['flag-lt'] ) ) { ?>
2219
- <style type="text/css">
2220
- #flags a.lt { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/lithuania.png") 0px 0px no-repeat; }
2221
- </style>
2222
- <?php } else { ?>
2223
- <style type="text/css">
2224
- #flags a.lt { display:none; }
2225
- </style>
2226
- <?php }
2227
-
2228
- if ( isset ( $get_flag_choices['flag-mk'] ) ) { ?>
2229
- <style type="text/css">
2230
- #flags a.mk { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/macedonia.png") 0px 0px no-repeat; }
2231
- </style>
2232
- <?php } else { ?>
2233
- <style type="text/css">
2234
- #flags a.mk { display:none; }
2235
- </style>
2236
- <?php }
2237
-
2238
- if ( isset ( $get_flag_choices['flag-ms'] ) ) { ?>
2239
- <style type="text/css">
2240
- #flags a.ms { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/malaysia.png") 0px 0px no-repeat; }
2241
- </style>
2242
- <?php } else { ?>
2243
- <style type="text/css">
2244
- #flags a.ms { display:none; }
2245
- </style>
2246
- <?php }
2247
-
2248
- if ( isset ( $get_flag_choices['flag-mt'] ) ) { ?>
2249
- <style type="text/css">
2250
- #flags a.mt { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/malta.png") 0px 0px no-repeat; }
2251
- </style>
2252
- <?php } else { ?>
2253
- <style type="text/css">
2254
- #flags a.mt { display:none; }
2255
- </style>
2256
- <?php }
2257
-
2258
- if ( isset ( $get_flag_choices['flag-mr'] ) ) { ?>
2259
- <style type="text/css">
2260
- #flags a.mr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/marathi.png") 0px 0px no-repeat; }
2261
- </style>
2262
- <?php } else { ?>
2263
- <style type="text/css">
2264
- #flags a.mr { display:none; }
2265
- </style>
2266
- <?php }
2267
-
2268
- if ( isset ( $get_flag_choices['flag-no'] ) ) { ?>
2269
- <style type="text/css">
2270
- #flags a.no { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/norway.png") 0px 0px no-repeat; }
2271
- </style>
2272
- <?php } else { ?>
2273
- <style type="text/css">
2274
- #flags a.no { display:none; }
2275
- </style>
2276
- <?php }
2277
-
2278
- if ( isset ( $get_flag_choices['flag-fa'] ) ) { ?>
2279
- <style type="text/css">
2280
- #flags a.fa { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/iran.png") 0px 0px no-repeat; }
2281
- </style>
2282
- <?php } else { ?>
2283
- <style type="text/css">
2284
- #flags a.fa { display:none; }
2285
- </style>
2286
- <?php }
2287
-
2288
- if ( isset ( $get_flag_choices['flag-pl'] ) ) { ?>
2289
- <style type="text/css">
2290
- #flags a.pl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/poland.png") 0px 0px no-repeat; }
2291
- </style>
2292
- <?php } else { ?>
2293
- <style type="text/css">
2294
- #flags a.pl { display:none; }
2295
- </style>
2296
- <?php }
2297
-
2298
- if ( isset ( $get_flag_choices['flag-pt'] ) ) { ?>
2299
- <style type="text/css">
2300
- #flags a.pt { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/portugal.png") 0px 0px no-repeat; }
2301
- </style>
2302
- <?php } else { ?>
2303
- <style type="text/css">
2304
- #flags a.pt { display:none; }
2305
- </style>
2306
- <?php }
2307
-
2308
- if ( isset ( $get_flag_choices['flag-ro'] ) ) { ?>
2309
- <style type="text/css">
2310
- #flags a.ro { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/romania.png") 0px 0px no-repeat; }
2311
- </style>
2312
- <?php } else { ?>
2313
- <style type="text/css">
2314
- #flags a.ro { display:none; }
2315
- </style>
2316
- <?php }
2317
-
2318
- if ( isset ( $get_flag_choices['flag-ru'] ) ) { ?>
2319
- <style type="text/css">
2320
- #flags a.ru { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/russia.png") 0px 0px no-repeat; }
2321
- </style>
2322
- <?php } else { ?>
2323
- <style type="text/css">
2324
- #flags a.ru { display:none; }
2325
- </style>
2326
- <?php }
2327
-
2328
- if ( isset ( $get_flag_choices['flag-sr'] ) ) { ?>
2329
- <style type="text/css">
2330
- #flags a.sr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/serbia.png") 0px 0px no-repeat; }
2331
- </style>
2332
- <?php } else { ?>
2333
- <style type="text/css">
2334
- #flags a.sr { display:none; }
2335
- </style>
2336
- <?php }
2337
-
2338
- if ( isset ( $get_flag_choices['flag-sk'] ) ) { ?>
2339
- <style type="text/css">
2340
- #flags a.sk { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/slovakia.png") 0px 0px no-repeat; }
2341
- </style>
2342
- <?php } else { ?>
2343
- <style type="text/css">
2344
- #flags a.sk { display:none; }
2345
- </style>
2346
- <?php }
2347
-
2348
- if ( isset ( $get_flag_choices['flag-sv'] ) ) { ?>
2349
- <style type="text/css">
2350
- #flags a.sv { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/sweden.png") 0px 0px no-repeat; }
2351
- </style>
2352
- <?php } else { ?>
2353
- <style type="text/css">
2354
- #flags a.sv { display:none; }
2355
- </style>
2356
- <?php }
2357
-
2358
- if ( isset ( $get_flag_choices['flag-sw'] ) ) { ?>
2359
- <style type="text/css">
2360
- #flags a.sw { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/kenya.png") 0px 0px no-repeat; }
2361
- </style>
2362
- <?php } else { ?>
2363
- <style type="text/css">
2364
- #flags a.sw { display:none; }
2365
- </style>
2366
- <?php }
2367
-
2368
- if ( isset ( $get_flag_choices['flag-sl'] ) ) { ?>
2369
- <style type="text/css">
2370
- #flags a.sl { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/slovenia.png") 0px 0px no-repeat; }
2371
- </style>
2372
- <?php } else { ?>
2373
- <style type="text/css">
2374
- #flags a.sl { display:none; }
2375
- </style>
2376
- <?php }
2377
-
2378
-
2379
- if ( isset ( $get_flag_choices['flag-ta'] ) ) { ?>
2380
- <style type="text/css">
2381
- #flags a.ta { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/tamil.png") 0px 0px no-repeat; }
2382
- </style>
2383
- <?php } else { ?>
2384
- <style type="text/css">
2385
- #flags a.ta { display:none; }
2386
- </style>
2387
- <?php }
2388
-
2389
- if ( isset ( $get_flag_choices['flag-te'] ) ) { ?>
2390
- <style type="text/css">
2391
- #flags a.te { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/telugu.png") 0px 0px no-repeat; }
2392
- </style>
2393
- <?php } else { ?>
2394
- <style type="text/css">
2395
- #flags a.te { display:none; }
2396
- </style>
2397
- <?php }
2398
-
2399
- if ( isset ( $get_flag_choices['flag-th'] ) ) { ?>
2400
- <style type="text/css">
2401
- #flags a.th { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/thailand.png") 0px 0px no-repeat; }
2402
- </style>
2403
- <?php } else { ?>
2404
- <style type="text/css">
2405
- #flags a.th { display:none; }
2406
- </style>
2407
- <?php }
2408
-
2409
- if ( isset ( $get_flag_choices['flag-tr'] ) ) { ?>
2410
- <style type="text/css">
2411
- #flags a.tr { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/turkey.png") 0px 0px no-repeat; }
2412
- </style>
2413
- <?php } else { ?>
2414
- <style type="text/css">
2415
- #flags a.tr { display:none; }
2416
- </style>
2417
- <?php }
2418
-
2419
- if ( isset ( $get_flag_choices['flag-uk'] ) ) { ?>
2420
- <style type="text/css">
2421
- #flags a.uk { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/ukraine.png") 0px 0px no-repeat; }
2422
- </style>
2423
- <?php } else { ?>
2424
- <style type="text/css">
2425
- #flags a.uk { display:none; }
2426
- </style>
2427
- <?php }
2428
-
2429
- if ( isset ( $get_flag_choices['flag-ur'] ) ) { ?>
2430
- <style type="text/css">
2431
- #flags a.ur { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/pakistan.png") 0px 0px no-repeat; }
2432
- </style>
2433
- <?php } else { ?>
2434
- <style type="text/css">
2435
- #flags a.ur { display:none; }
2436
- </style>
2437
- <?php }
2438
-
2439
- if ( isset ( $get_flag_choices['flag-vi'] ) ) { ?>
2440
- <style type="text/css">
2441
- #flags a.vi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/vietnam.png") 0px 0px no-repeat; }
2442
- </style>
2443
- <?php } else { ?>
2444
- <style type="text/css">
2445
- #flags a.vi { display:none; }
2446
- </style>
2447
- <?php }
2448
-
2449
- if ( isset ( $get_flag_choices['flag-cy'] ) ) { ?>
2450
- <style type="text/css">
2451
- #flags a.cy { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/wales.png") 0px 0px no-repeat; }
2452
- </style>
2453
- <?php } else { ?>
2454
- <style type="text/css">
2455
- #flags a.cy { display:none; }
2456
- </style>
2457
- <?php }
2458
-
2459
- if ( isset ( $get_flag_choices['flag-yi'] ) ) { ?>
2460
- <style type="text/css">
2461
- #flags a.yi { background:url("<?php echo plugins_url(); ?>/google-language-translator/images/yiddish.png") 0px 0px no-repeat; }
2462
- </style>
2463
- <?php } else { ?>
2464
- <style type="text/css">
2465
- #flags a.yi { display:none; }
2466
- </style>
2467
- <?php }
2468
  }
2469
  add_action('wp_head','googlelanguagetranslator_flags_display');
2470
 
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 2.7
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: rm2773
8
  Author URI: http://www.studio88design.com/
9
  */
10
+
11
+ register_activation_hook( __FILE__, 'glt_activate' );
12
+
13
+ function glt_activate() {
14
+ add_option('googlelanguagetranslator_active', 1);
15
+ add_option('googlelanguagetranslator_language','en');
16
+ add_option('googlelanguagetranslator_language_option','all');
17
+ add_option('language_display_settings',array ('en' => 1));
18
+ add_option('googlelanguagetranslator_flags','show_flags');
19
+ add_option('flag_display_settings',array ('flag-en' => 1));
20
+ add_option('googlelanguagetranslator_translatebox','yes');
21
+ add_option('googlelanguagetranslator_display','Vertical');
22
+ add_option('googlelanguagetranslator_toolbar','Yes');
23
+ add_option('googlelanguagetranslator_showbranding','Yes');
24
+ add_option('googlelanguagetranslator_flags_alignment','flags_left');
25
+ add_option('googlelanguagetranslator_analytics',1);
26
+ add_option('googlelanguagetranslator_analytics_id','');
27
+ add_option('googlelanguagetranslator_css','');
28
+ }
29
+
30
  include( plugin_dir_path( __FILE__ ) . 'widget.php');
31
 
32
  function scripts($hook_suffix) {
46
  }
47
  add_action('wp_enqueue_scripts', 'flags');
48
 
49
+ function page_layout (){
50
  global $p;
51
 
52
  add_action( 'admin_enqueue_scripts', 'scripts');
53
 
54
+ $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', 'page_layout_cb');
55
  }
56
+ add_action('admin_menu', 'page_layout');
57
 
58
  function google_translator_shortcode() {
59
  if (get_option('googlelanguagetranslator_display')=='Vertical'){
63
  elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
64
  return googlelanguagetranslator_horizontal();
65
  }
66
+
67
+ }
68
+
69
+ function load_css_overrides() { ?>
70
+ <style type="text/css">
71
+ <?php echo get_option("googlelanguagetranslator_css"); ?>
72
+ </style>
73
+ <?php
74
  }
75
 
76
+ add_action('wp_head','load_css_overrides');
77
+ add_action('admin_head','load_css_overrides');
78
+
79
+
80
  if (get_option('googlelanguagetranslator_toolbar')=='Yes') {
81
  add_action ('wp_head','googlelanguagetranslator_toolbar_yes');
82
  add_action ('admin_head','googlelanguagetranslator_toolbar_yes');
115
 
116
  add_filter('widget_text', 'do_shortcode');
117
 
118
+ function page_layout_cb() { ?>
119
  <div class="wrap" style="width:89%">
120
  <div id="icon-options-general" class="icon32"></div>
121
  <h2><span class="notranslate">Google Language Translator</span></h2>
122
+ <form action="<?php echo admin_url('options.php'); ?>" method="post">
123
  <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
124
  <div class="postbox" style="width: 100%">
125
  <h3 class="notranslate">Settings</h3>
126
+
127
  <?php settings_fields('google_language_translator'); ?>
128
  <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
129
  <tr>
186
  <td class="flagdisplay"><?php googlelanguagetranslator_flags_alignment_cb(); ?></td>
187
  </tr>
188
 
189
+ <tr class="notranslate">
190
+ <td>Google Analytics:</td>
191
+ <td><?php googlelanguagetranslator_analytics_cb(); ?></td>
192
+ </tr>
193
+
194
+ <tr class="analytics notranslate">
195
+ <td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
196
+ <td><?php googlelanguagetranslator_analytics_id_cb(); ?></td>
197
+ </tr>
198
+
199
  <tr class="notranslate">
200
  <td>Copy/Paste this shortcode if adding to pages/posts:</td>
201
  <td>[google-translator]</td>
211
  <td></td>
212
  </tr>
213
  </table>
214
+
215
  </div> <!-- .postbox -->
216
  </div> <!-- .metbox-holder -->
217
 
225
  </table>
226
  </div> <!-- .postbox -->
227
  </div> <!-- .metabox-holder -->
228
+
229
+
230
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
231
+ <div class="postbox">
232
+ <h3>Add CSS Styles</h3>
233
+ <div class="inside">
234
+ <p>You can apply any necessary CSS styles below:</p>
235
+ <?php googlelanguagetranslator_css_cb(); ?>
236
+ </div>
237
+ </div>
238
+ </div>
239
+ </form>
240
+
241
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
242
  <div class="postbox">
243
  <h3>Please Consider A Donation</h3>
244
  <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 />
258
  <br />
259
  </div>
260
  </div>
261
+ </div>
262
  </div> <!-- .wrap -->
263
  <?php
264
  }
295
  add_settings_field( 'googlelanguagetranslator_toolbar', 'Show Toolbar','googlelanguagetranslator_toolbar_cb','google_language_translator','glt_settings');
296
  add_settings_field( 'googlelanguagetranslator_showbranding', 'Show Google Branding','googlelanguagetranslator_showbranding_cb','google_language_translator','glt_settings');
297
  add_settings_field( 'googlelanguagetranslator_flags_alignment', 'Align Flags Right or Left', 'googlelanguagetranslator_flags_alignment_cb','google_language_translator','glt_settings');
298
+ add_settings_field( 'googlelanguagetranslator_analytics','Activate Google Analytics tracking?','googlelanguagetranslator_analytics_cb','google_language_translator','glt_settings');
299
+ add_settings_field( 'googlelanguagetranslator_analytics_id','Enter your Google Analytics ID','googlelanguagetranslator_analytics_id_cb','google_language_translator','glt_settings');
300
+ add_settings_field( 'googlelanguagetranslator_css','Custom CSS Overrides','googlelanguagetranslator_css_cb','google_language_translator','glt_settings');
301
+
302
 
303
 
304
 
314
  register_setting( 'google_language_translator','googlelanguagetranslator_toolbar');
315
  register_setting( 'google_language_translator','googlelanguagetranslator_showbranding');
316
  register_setting( 'google_language_translator','googlelanguagetranslator_flags_alignment');
317
+ register_setting( 'google_language_translator','googlelanguagetranslator_disable_mootools');
318
+ register_setting( 'google_language_translator','googlelanguagetranslator_disable_modal');
319
+ register_setting( 'google_language_translator','googlelanguagetranslator_analytics');
320
+ register_setting( 'google_language_translator','googlelanguagetranslator_analytics_id');
321
+ register_setting( 'google_language_translator','googlelanguagetranslator_css');
322
 
323
  function googlelanguagetranslator_active_cb() {
 
 
 
 
 
 
 
 
324
 
325
+ $option_name = 'googlelanguagetranslator_active' ;
326
+ $new_value = 1;
327
+
328
+ if ( get_option( $option_name ) === false ) {
329
+
330
+ // The option does not exist, so we update it.
331
+ update_option( $option_name, $new_value );
332
+ }
333
+
334
+ $options = get_option (''.$option_name.'');
335
+
336
+ $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Language Translator?';
337
+ echo $html;
338
  }
339
 
340
  function googlelanguagetranslator_language_cb() {
341
+
342
+ $option_name = 'googlelanguagetranslator_language';
343
+ $new_value = 'en';
344
 
345
+ if ( get_option( $option_name ) === false ) {
346
+
347
+ // The option does not exist, so we update it.
348
+ update_option( $option_name, $new_value );
349
+ }
350
+
351
+ $options = get_option (''.$option_name.''); ?>
352
+ <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
353
  <option value="af" <?php if($options=='af'){echo "selected";}?>>Afrikaans</option>
354
  <option value="sq" <?php if($options=='sq'){echo "selected";}?>>Albanian</option>
355
  <option value="ar" <?php if($options=='ar'){echo "selected";}?>>Arabic</option>
424
  <option value="yi" <?php if($options=='yi'){echo "selected";}?>>Yiddish</option>
425
  </select>
426
  <?php
427
+
428
  }
429
 
430
  function googlelanguagetranslator_language_option_cb() {
431
+
432
+ $option_name = 'googlelanguagetranslator_language_option' ;
433
+ $new_value = 'all';
434
 
435
+ if ( get_option( $option_name ) === false ) {
436
+
437
+ // The option does not exist, so we update it.
438
+ update_option( $option_name, $new_value );
439
+ }
440
+
441
+ $options = get_option (''.$option_name.''); ?>
442
 
443
  <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
444
  <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
449
  function language_display_settings_cb() {
450
  $defaults = array (
451
  'en' => 1
452
+ );
453
+
454
+ $option_name = 'language_display_settings' ;
455
+ $new_value = $defaults;
456
+
457
+ if ( get_option( $option_name ) === false ) {
458
 
459
+ // The option does not exist, so we update it.
460
+ update_option( $option_name, $new_value );
461
+ }
462
+
463
+ $get_language_choices = get_option (''.$option_name.'');
464
+
465
+ if (!isset ( $get_language_choices ['af'] ) ) {
466
+ $get_language_choices['af'] = 0;
467
  }
468
+
469
+ if (!isset ( $get_language_choices ['sq'] ) ) {
470
+ $get_language_choices['sq'] = 0;
471
+ }
472
+
473
+ if (!isset ( $get_language_choices ['ar'] ) ) {
474
+ $get_language_choices['ar'] = 0;
475
+ }
476
+
477
+ if (!isset ( $get_language_choices ['hy'] ) ) {
478
+ $get_language_choices['hy'] = 0;
479
+ }
480
+
481
+ if (!isset ( $get_language_choices ['az'] ) ) {
482
+ $get_language_choices['az'] = 0;
483
+ }
484
+
485
+ if (!isset ( $get_language_choices ['eu'] ) ) {
486
+ $get_language_choices['eu'] = 0;
487
+ }
488
+
489
+ if (!isset ( $get_language_choices ['be'] ) ) {
490
+ $get_language_choices['be'] = 0;
491
+ }
492
+
493
+ if (!isset ( $get_language_choices ['bn'] ) ) {
494
+ $get_language_choices['bn'] = 0;
495
+ }
496
+
497
+ if (!isset ( $get_language_choices ['bs'] ) ) {
498
+ $get_language_choices['bs'] = 0;
499
+ }
500
+
501
+ if (!isset ( $get_language_choices ['bg'] ) ) {
502
+ $get_language_choices['bg'] = 0;
503
+ }
504
+
505
+ if (!isset ( $get_language_choices ['ca'] ) ) {
506
+ $get_language_choices['ca'] = 0;
507
+ }
508
+
509
+ if (!isset ( $get_language_choices ['ceb'] ) ) {
510
+ $get_language_choices['ceb'] = 0;
511
+ }
512
+
513
+ if (!isset ( $get_language_choices ['zh-CN'] ) ) {
514
+ $get_language_choices['zh-CN'] = 0;
515
+ }
516
+
517
+ if (!isset ( $get_language_choices ['zh-TW'] ) ) {
518
+ $get_language_choices['zh-TW'] = 0;
519
+ }
520
+
521
+ if (!isset ( $get_language_choices ['hr'] ) ) {
522
+ $get_language_choices['hr'] = 0;
523
+ }
524
+
525
+ if (!isset ( $get_language_choices ['cs'] ) ) {
526
+ $get_language_choices['cs'] = 0;
527
+ }
528
+
529
+ if (!isset ( $get_language_choices ['da'] ) ) {
530
+ $get_language_choices['da'] = 0;
531
+ }
532
+
533
+ if (!isset ( $get_language_choices ['nl'] ) ) {
534
+ $get_language_choices['nl'] = 0;
535
+ }
536
+
537
+ if (!isset ( $get_language_choices ['en'] ) ) {
538
+ $get_language_choices['en'] = 0;
539
+ }
540
+
541
+ if (!isset ( $get_language_choices ['eo'] ) ) {
542
+ $get_language_choices['eo'] = 0;
543
+ }
544
+
545
+ if (!isset ( $get_language_choices ['et'] ) ) {
546
+ $get_language_choices['et'] = 0;
547
+ }
548
+
549
+ if (!isset ( $get_language_choices ['tl'] ) ) {
550
+ $get_language_choices['tl'] = 0;
551
+ }
552
+
553
+ if (!isset ( $get_language_choices ['fi'] ) ) {
554
+ $get_language_choices['fi'] = 0;
555
+ }
556
+
557
+ if (!isset ( $get_language_choices ['fr'] ) ) {
558
+ $get_language_choices['fr'] = 0;
559
+ }
560
+
561
+ if (!isset ( $get_language_choices ['gl'] ) ) {
562
+ $get_language_choices['gl'] = 0;
563
+ }
564
+
565
+ if (!isset ( $get_language_choices ['ka'] ) ) {
566
+ $get_language_choices['ka'] = 0;
567
+ }
568
+
569
+ if (!isset ( $get_language_choices ['de'] ) ) {
570
+ $get_language_choices['de'] = 0;
571
+ }
572
+
573
+ if (!isset ( $get_language_choices ['el'] ) ) {
574
+ $get_language_choices['el'] = 0;
575
+ }
576
+
577
+ if (!isset ( $get_language_choices ['gu'] ) ) {
578
+ $get_language_choices['gu'] = 0;
579
+ }
580
+
581
+ if (!isset ( $get_language_choices ['ht'] ) ) {
582
+ $get_language_choices['ht'] = 0;
583
+ }
584
+
585
+ if (!isset ( $get_language_choices ['iw'] ) ) {
586
+ $get_language_choices['iw'] = 0;
587
+ }
588
+
589
+ if (!isset ( $get_language_choices ['hi'] ) ) {
590
+ $get_language_choices['hi'] = 0;
591
+ }
592
+
593
+ if (!isset ( $get_language_choices ['hmn'] ) ) {
594
+ $get_language_choices['hmn'] = 0;
595
+ }
596
+
597
+ if (!isset ( $get_language_choices ['hu'] ) ) {
598
+ $get_language_choices['hu'] = 0;
599
+ }
600
+
601
+ if (!isset ( $get_language_choices ['is'] ) ) {
602
+ $get_language_choices['is'] = 0;
603
+ }
604
+
605
+ if (!isset ( $get_language_choices ['id'] ) ) {
606
+ $get_language_choices['id'] = 0;
607
+ }
608
+
609
+ if (!isset ( $get_language_choices ['ga'] ) ) {
610
+ $get_language_choices['ga'] = 0;
611
+ }
612
+
613
+ if (!isset ( $get_language_choices ['it'] ) ) {
614
+ $get_language_choices['it'] = 0;
615
+ }
616
+
617
+ if (!isset ( $get_language_choices ['ja'] ) ) {
618
+ $get_language_choices['ja'] = 0;
619
+ }
620
+
621
+ if (!isset ( $get_language_choices ['jw'] ) ) {
622
+ $get_language_choices['jw'] = 0;
623
+ }
624
+
625
+ if (!isset ( $get_language_choices ['kn'] ) ) {
626
+ $get_language_choices['kn'] = 0;
627
+ }
628
+
629
+ if (!isset ( $get_language_choices ['km'] ) ) {
630
+ $get_language_choices['km'] = 0;
631
+ }
632
+
633
+ if (!isset ( $get_language_choices ['ko'] ) ) {
634
+ $get_language_choices['ko'] = 0;
635
+ }
636
+
637
+ if (!isset ( $get_language_choices ['lo'] ) ) {
638
+ $get_language_choices['lo'] = 0;
639
+ }
640
+
641
+ if (!isset ( $get_language_choices ['la'] ) ) {
642
+ $get_language_choices['la'] = 0;
643
+ }
644
+
645
+ if (!isset ( $get_language_choices ['lv'] ) ) {
646
+ $get_language_choices['lv'] = 0;
647
+ }
648
+
649
+ if (!isset ( $get_language_choices ['lt'] ) ) {
650
+ $get_language_choices['lt'] = 0;
651
+ }
652
+
653
+ if (!isset ( $get_language_choices ['mk'] ) ) {
654
+ $get_language_choices['mk'] = 0;
655
+ }
656
+
657
+ if (!isset ( $get_language_choices ['ms'] ) ) {
658
+ $get_language_choices['ms'] = 0;
659
+ }
660
+
661
+ if (!isset ( $get_language_choices ['mt'] ) ) {
662
+ $get_language_choices['mt'] = 0;
663
+ }
664
+
665
+ if (!isset ( $get_language_choices ['mr'] ) ) {
666
+ $get_language_choices['mr'] = 0;
667
+ }
668
+
669
+ if (!isset ( $get_language_choices ['no'] ) ) {
670
+ $get_language_choices['no'] = 0;
671
+ }
672
+
673
+ if (!isset ( $get_language_choices ['fa'] ) ) {
674
+ $get_language_choices['fa'] = 0;
675
+ }
676
+
677
+ if (!isset ( $get_language_choices ['pl'] ) ) {
678
+ $get_language_choices['pl'] = 0;
679
+ }
680
+
681
+ if (!isset ( $get_language_choices ['pt'] ) ) {
682
+ $get_language_choices['pt'] = 0;
683
+ }
684
+
685
+ if (!isset ( $get_language_choices ['ro'] ) ) {
686
+ $get_language_choices['ro'] = 0;
687
+ }
688
+
689
+ if (!isset ( $get_language_choices ['ru'] ) ) {
690
+ $get_language_choices['ru'] = 0;
691
+ }
692
+
693
+ if (!isset ( $get_language_choices ['sr'] ) ) {
694
+ $get_language_choices['sr'] = 0;
695
+ }
696
+
697
+ if (!isset ( $get_language_choices ['sk'] ) ) {
698
+ $get_language_choices['sk'] = 0;
699
+ }
700
+
701
+ if (!isset ( $get_language_choices ['sl'] ) ) {
702
+ $get_language_choices['sl'] = 0;
703
+ }
704
+
705
+ if (!isset ( $get_language_choices ['es'] ) ) {
706
+ $get_language_choices['es'] = 0;
707
+ }
708
+
709
+ if (!isset ( $get_language_choices ['sw'] ) ) {
710
+ $get_language_choices['sw'] = 0;
711
+ }
712
+
713
+ if (!isset ( $get_language_choices ['sv'] ) ) {
714
+ $get_language_choices['sv'] = 0;
715
+ }
716
+
717
+ if (!isset ( $get_language_choices ['ta'] ) ) {
718
+ $get_language_choices['ta'] = 0;
719
+ }
720
+
721
+ if (!isset ( $get_language_choices ['te'] ) ) {
722
+ $get_language_choices['te'] = 0;
723
+ }
724
+
725
+ if (!isset ( $get_language_choices ['th'] ) ) {
726
+ $get_language_choices['th'] = 0;
727
+ }
728
+
729
+ if (!isset ( $get_language_choices ['tr'] ) ) {
730
+ $get_language_choices['tr'] = 0;
731
+ }
732
+
733
+ if (!isset ( $get_language_choices ['uk'] ) ) {
734
+ $get_language_choices['uk'] = 0;
735
+ }
736
+
737
+ if (!isset ( $get_language_choices ['ur'] ) ) {
738
+ $get_language_choices['ur'] = 0;
739
+ }
740
+
741
+ if (!isset ( $get_language_choices ['vi'] ) ) {
742
+ $get_language_choices['vi'] = 0;
743
+ }
744
+
745
+ if (!isset ( $get_language_choices ['cy'] ) ) {
746
+ $get_language_choices['cy'] = 0;
747
+ }
748
+
749
+ if (!isset ( $get_language_choices ['yi'] ) ) {
750
+ $get_language_choices['yi'] = 0;
751
+ } ?>
752
 
 
753
  <div class="languages" style="width:25%; float:left">
754
  <div><input type="checkbox" name="language_display_settings[af]" value="1"<?php if ( 1 == $get_language_choices['af'] ) echo 'checked="checked"'; ?> /> Afrikaans</div>
755
  <div><input type="checkbox" name="language_display_settings[sq]" value="1"<?php if ( 1 == $get_language_choices['sq'] ) echo 'checked="checked"'; ?> /> Albanian</div>
839
 
840
  function googlelanguagetranslator_flags_cb() {
841
 
842
+ $option_name = 'googlelanguagetranslator_flags' ;
843
+ $new_value = 'show_flags';
844
 
845
+ if ( get_option( $option_name ) === false ) {
846
+
847
+ // The option does not exist, so we update it.
848
+ update_option( $option_name, $new_value );
849
+ }
850
 
851
+ $options = get_option (''.$option_name.''); ?>
852
 
853
  <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
854
  <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
859
  $defaults = array(
860
  'flag-en' => 1
861
  );
 
862
 
863
+ $option_name = 'flag_display_settings' ;
864
+ $new_value = $defaults;
865
 
866
+ if ( get_option( $option_name ) === false ) {
867
+
868
+ // The option does not exist, so we update it.
869
+ update_option( $option_name, $new_value );
870
+ }
871
 
872
+ $get_flag_choices = get_option (''.$option_name.'');
873
 
874
  if (!isset ( $get_flag_choices ['flag-af'] ) ) {
875
  $get_flag_choices['flag-af'] = 0;
1111
  $get_flag_choices['flag-sl'] = 0;
1112
  }
1113
 
1114
+ if (!isset ( $get_flag_choices ['flag-es'] ) ) {
1115
  $get_flag_choices['flag-es'] = 0;
1116
  }
1117
 
1245
  <div><input type="checkbox" name="flag_display_settings[flag-vi]" value="1"<?php checked( 1,$get_flag_choices['flag-vi']); ?> /> Vietnamese</div>
1246
  <div><input type="checkbox" name="flag_display_settings[flag-cy]" value="1"<?php checked( 1,$get_flag_choices['flag-cy']); ?> /> Welsh</div>
1247
  <div><input type="checkbox" name="flag_display_settings[flag-yi]" value="1"<?php checked( 1,$get_flag_choices['flag-yi']); ?> /> Yiddish</div>
1248
+ </div>
 
 
1249
  <div style="clear:both"></div>
1250
  <?php }
1251
 
1252
  function googlelanguagetranslator_translatebox_cb() {
1253
+
1254
+ $option_name = 'googlelanguagetranslator_translatebox' ;
1255
+ $new_value = 'yes';
1256
 
1257
+ if ( get_option( $option_name ) === false ) {
1258
+
1259
+ // The option does not exist, so we update it.
1260
+ update_option( $option_name, $new_value );
1261
+ }
1262
+
1263
+ $options = get_option (''.$option_name.''); ?>
1264
 
1265
  <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
1266
  <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
1269
  <?php }
1270
 
1271
  function googlelanguagetranslator_display_cb() {
1272
+
1273
+ $option_name = 'googlelanguagetranslator_display' ;
1274
+ $new_value = 'Vertical';
1275
+
1276
+ if ( get_option( $option_name ) === false ) {
1277
+
1278
+ // The option does not exist, so we update it.
1279
+ update_option( $option_name, $new_value );
1280
+ }
1281
+
1282
+ $options = get_option (''.$option_name.''); ?>
1283
 
 
 
 
 
 
1284
  <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
1285
  <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
1286
  <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
1287
+
1288
  </select>
1289
  <?php }
1290
 
1291
  function googlelanguagetranslator_toolbar_cb() {
1292
+
1293
+ $option_name = 'googlelanguagetranslator_toolbar' ;
1294
+ $new_value = 'Yes';
1295
+
1296
+ if ( get_option( $option_name ) === false ) {
1297
+
1298
+ // The option does not exist, so we update it.
1299
+ update_option( $option_name, $new_value );
1300
+ }
1301
+
1302
+ $options = get_option (''.$option_name.''); ?>
1303
 
 
 
 
 
 
1304
  <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
1305
  <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
1306
  <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
1308
  <?php }
1309
 
1310
  function googlelanguagetranslator_showbranding_cb() {
1311
+
1312
+ $option_name = 'googlelanguagetranslator_showbranding' ;
1313
+ $new_value = 'Yes';
1314
+
1315
+ if ( get_option( $option_name ) === false ) {
1316
+
1317
+ // The option does not exist, so we update it.
1318
+ update_option( $option_name, $new_value );
1319
+ }
1320
+
1321
+ $options = get_option (''.$option_name.''); ?>
1322
 
 
 
 
 
 
1323
  <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
1324
  <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
1325
  <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
1327
  <?php }
1328
 
1329
  function googlelanguagetranslator_flags_alignment_cb() {
1330
+
1331
+ $option_name = 'googlelanguagetranslator_flags_alignment' ;
1332
+ $new_value = 'flags_left';
1333
 
1334
+ if ( get_option( $option_name ) === false ) {
1335
+
1336
+ // The option does not exist, so we update it.
1337
+ update_option( $option_name, $new_value );
1338
+ }
1339
 
1340
+ $options = get_option (''.$option_name.''); ?>
1341
+
1342
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="googlelanguagetranslator_flags_alignment" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
1343
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="googlelanguagetranslator_flags_alignment" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
1344
+ <?php }
1345
+
1346
+
1347
+ function googlelanguagetranslator_analytics_cb() {
1348
 
1349
+ $option_name = 'googlelanguagetranslator_analytics' ;
1350
+ $new_value = 0;
1351
+
1352
+ if ( get_option( $option_name ) === false ) {
1353
+
1354
+ // The option does not exist, so we update it.
1355
+ update_option( $option_name, $new_value );
1356
+ }
1357
+
1358
+ $options = get_option (''.$option_name.'');
1359
+
1360
+ $html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Analytics tracking?';
1361
+ echo $html;
1362
+ }
1363
+
1364
+ function googlelanguagetranslator_analytics_id_cb() {
1365
 
1366
+ $option_name = 'googlelanguagetranslator_analytics_id' ;
1367
+ $new_value = '';
1368
+
1369
+ if ( get_option( $option_name ) === false ) {
1370
+
1371
+ // The option does not exist, so we update it.
1372
+ update_option( $option_name, $new_value );
1373
+ }
1374
+
1375
+ $options = get_option (''.$option_name.'');
1376
+
1377
+ $html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
1378
+ echo $html;
1379
+ }
1380
+
1381
+ function googlelanguagetranslator_css_cb() {
1382
+
1383
+ $option_name = 'googlelanguagetranslator_css' ;
1384
+ $new_value = '';
1385
+
1386
+ if ( get_option( $option_name ) === false ) {
1387
+
1388
+ // The option does not exist, so we update it.
1389
+ update_option( $option_name, $new_value );
1390
+ }
1391
+
1392
+ $options = get_option (''.$option_name.'');
1393
+
1394
+ $html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
1395
+ echo $html;
1396
+ }
1397
 
1398
 
1399
 
1417
  $comma_separated = implode(",",array_values($items));
1418
 
1419
  if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
1420
+ $lang = 'includedLanguages:\''.$comma_separated.'\',';
1421
  return $lang;
1422
  } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
1423
+ $lang = 'includedLanguages:\''.$comma_separated.'\',';
1424
  return $lang;
1425
+ }
1426
+ }
1427
+ }
1428
+
1429
+ function analytics() {
1430
+ if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
1431
+ $analytics_id = get_option('googlelanguagetranslator_analytics_id');
1432
+ $analytics = 'gaTrack: true, gaId: \''.$analytics_id.'\'';
1433
+ return $analytics;
1434
+ }
1435
  }
1436
 
1437
+ function googlelanguagetranslator_vertical(){
1438
+ $is_active = get_option ( 'googlelanguagetranslator_active' );
1439
+ $get_flag_choices = get_option ('flag_display_settings');
1440
+ $language_choices = googlelanguagetranslator_included_languages();
1441
+
1442
+ if( $is_active == 1){
1443
+
1444
  foreach ($get_flag_choices as $key) {
1445
  //print_r($key);
1446
  }
1447
 
1448
+ $str='<div id="flags">';
1449
+
1450
+
 
1451
 
1452
  if ($key == '1') {
1453
  if ( isset ( $get_flag_choices['flag-af'] ) ) {
1454
+ $str.='<a id="Afrikaans" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|af\'); return false;" title="Afrikaans" class="notranslate flag af"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/southafrica.png" height="18" width="18" alt="Afrikaans"/></a>';
1455
  }
1456
 
1457
 
1458
  if ( isset ( $get_flag_choices['flag-sq'] ) ) {
1459
+ $str.='<a id="Albanian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sq\'); return false;" title="Albanian" class="notranslate flag sq"><img class="notranslate flag flag flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/albania.png" height="18" width="18" alt="Albanian"/></a>';
1460
  }
1461
 
1462
  if ( isset ( $get_flag_choices['flag-ar'] ) ) {
1463
+ $str.='<a id="Arabic" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ar\'); return false;" title="Arabic" class="notranslate flag ar"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/saudiaarabia.png" height="18" width="18" alt="Arabic"/></a>';
1464
  }
1465
 
1466
  if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1467
+ $str.='<a id="Armenian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="notranslate flag hy"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/armenia.png" height="18" width="18" alt="Armenian"/></a>';
1468
  }
1469
 
1470
  if ( isset ( $get_flag_choices['flag-az'] ) ) {
1471
+ $str.='<a id="Azerbaijani" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|az\'); return false;" title="Azerbaijani" class="notranslate flag az"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/azerbaijan.png" height="18" width="18" alt="Azerbaijani"/></a>';
1472
  }
1473
 
1474
  if ( isset ( $get_flag_choices['flag-eu'] ) ) {
1475
+ $str.='<a id="Basque" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eu\'); return false;" title="Basque" class="notranslate flag eu"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/basque.png" height="18" width="18" alt="Basque"/></a>';
1476
  }
1477
 
1478
  if ( isset ( $get_flag_choices['flag-be'] ) ) {
1479
+ $str.='<a id="Belarusian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|be\'); return false;" title="Belarusian" class="notranslate flag be"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/belarus.png" height="18" width="18" alt="Belarus"/></a>';
1480
  }
1481
 
1482
  if ( isset ( $get_flag_choices['flag-bn'] ) ) {
1483
+ $str.='<a id="Bengali" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bn\'); return false;" title="Bengali" class="notranslate flag bn"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/bangladesh.png" height="18" width="18" alt="Bengali"/></a>';
1484
  }
1485
 
1486
  if ( isset ( $get_flag_choices['flag-bs'] ) ) {
1487
+ $str.='<a id="Bosnian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bs\'); return false;" title="Bosnian" class="notranslate flag bs"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/bosnia.png" height="18" width="18" alt="Bosnian"/></a>';
1488
  }
1489
 
1490
  if ( isset ( $get_flag_choices['flag-bg'] ) ) {
1491
+ $str.='<a id="Bulgarian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bg\'); return false;" title="Bulgarian" class="notranslate flag bg"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/bulgaria.png" height="18" width="18" alt="Bulgarian"/></a>';
1492
  }
1493
 
1494
  if ( isset ( $get_flag_choices['flag-ca'] ) ) {
1495
+ $str.='<a id="Catalan" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ca\'); return false;" title="Catalan" class="notranslate flag ca"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/catalonia.png" height="18" width="18" alt="Catalan"/></a>';
1496
  }
1497
 
1498
  if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
1499
+ $str.='<a id="Cebuano" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ceb\'); return false;" title="Cebuano" class="notranslate flag ceb"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/philippines.png" height="18" width="18" alt="Afrikaans"/></a>';
1500
  }
1501
 
1502
  if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
1503
+ $str.='<a id="Chinese (Simplified)" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\'); return false;" title="Chinese (Simplified)" class="notranslate flag zh-CN"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/china.png" height="18" width="18" alt="Chinese (Simplified)"/></a>';
1504
  }
1505
 
1506
  if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
1507
+ $str.='<a id="Chinese (Traditional)" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-TW\'); return false;" title="Chinese (Traditional)" class="notranslate flag zh-TW"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/china.png" height="18" width="18" alt="Chinese (Traditional)"/></a>';
1508
  }
1509
 
1510
  if ( isset ( $get_flag_choices['flag-cs'] ) ) {
1511
+ $str.='<a id="Czech" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cs\'); return false;" title="Czech" class="notranslate flag cs"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/czechrepublic.png" height="18" width="18" alt="Czech"/></a>';
1512
  }
1513
 
1514
  if ( isset ( $get_flag_choices['flag-hr'] ) ) {
1515
+ $str.='<a id="Croatian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hr\'); return false;" title="Croatian" class="notranslate flag hr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/croatia.png" height="18" width="18" alt="Croatian"/></a>';
1516
  }
1517
 
1518
  if ( isset ( $get_flag_choices['flag-da'] ) ) {
1519
+ $str.='<a id="Danish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\'); return false;" title="Danish" class="notranslate flag da"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/denmark.png" height="18" width="18" alt="Danish"/></a>';
1520
  }
1521
 
1522
  if ( isset ( $get_flag_choices['flag-nl'] ) ) {
1523
+ $str.='<a id="Dutch" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|nl\'); return false;" title="Dutch" class="notranslate flag nl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/netherlands.png" height="18" width="18" alt="Dutch"/></a>';
1524
  }
1525
 
1526
  if ( isset ( $get_flag_choices['flag-en'] ) ) {
1527
+ $str.='<a id="English" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\'); return false;" title="English" class="notranslate flag en"><img class="flagimg" title="English" src="'.plugins_url().'/google-language-translator/images/flags24/unitedkingdom.png" height="18" width="18" alt="English"/></a>';
1528
  }
1529
 
1530
  if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1531
+ $str.='<a id="Esperanto" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eo\'); return false;" title="Esperanto" class="notranslate flag eo"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/esperanto.png" height="18" width="18" alt="Esperanto"/></a>';
1532
  }
1533
 
1534
  if ( isset ( $get_flag_choices['flag-et'] ) ) {
1535
+ $str.='<a id="Estonian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|et\'); return false;" title="Estonian" class="notranslate flag et"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/estonia.png" height="18" width="18" alt="Estonian"/></a>';
1536
  }
1537
 
1538
  if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1539
+ $str.='<a id="Filipino" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tl\'); return false;" title="Filipino" class="notranslate flag tl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/philippines.png" height="18" width="18" alt="Filipino"/></a>';
1540
  }
1541
 
1542
  if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1543
+ $str.='<a id="Finnish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fi\'); return false;" title="Finnish" class="notranslate flag fi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/finland.png" height="18" width="18" alt="Finnish"/></a>';
1544
  }
1545
 
1546
  if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1547
+ $str.='<a id="French" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\'); return false;" title="French" class="notranslate flag fr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/france.png" height="18" width="18" alt="French"/></a>';
1548
  }
1549
 
1550
  if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1551
+ $str.='<a id="Galician" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gl\'); return false;" title="Galician" class="notranslate flag gl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/galicia.png" height="18" width="18" alt="Galician"/></a>';
1552
  }
1553
 
1554
  if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1555
+ $str.='<a id="Georgian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ka\'); return false;" title="Georgian" class="notranslate flag ka"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/georgia.png" height="18" width="18" alt="Georgian"/></a>';
1556
  }
1557
 
1558
  if ( isset ( $get_flag_choices['flag-de'] ) ) {
1559
+ $str.='<a id="German" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\'); return false;" title="German" class="notranslate flag de"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/germany.png" height="18" width="18" alt="German"/></a>';
1560
  }
1561
 
1562
  if ( isset ( $get_flag_choices['flag-el'] ) ) {
1563
+ $str.='<a id="Greek" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|el\'); return false;" title="Greek" class="notranslate flag el"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/greece.png" height="18" width="18" alt="Greek"/></a>';
1564
  }
1565
 
1566
  if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1567
+ $str.='<a id="Gujarati" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gu\'); return false;" title="Gujarati" class="notranslate flag gu"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/india.png" height="18" width="18" alt="Gujarati"/></a>';
1568
  }
1569
 
1570
  if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1571
+ $str.='<a id="Haitian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ht\'); return false;" title="Haitian" class="notranslate flag ht"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/haiti.png" height="18" width="18" alt="Haitian"/></a>';
1572
  }
1573
 
1574
  if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1575
+ $str.='<a id="Hebrew" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|iw\'); return false;" title="Hebrew" class="notranslate flag iw"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/israel.png" height="18" width="18" alt="Hebrew"/></a>';
1576
  }
1577
 
1578
  if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1579
+ $str.='<a id="Hindi" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hi\'); return false;" title="Hindi" class="notranslate flag hi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/india.png" height="18" width="18" alt="Hindi"/></a>';
1580
  }
1581
 
1582
  if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1583
+ $str.='<a id="Hmong" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hmn\'); return false;" title="Hmong" class="notranslate flag hmn"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/hmong.png" height="18" width="18" alt="Hmong"/></a>';
1584
  }
1585
 
1586
  if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1587
+ $str.='<a id="Hungarian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hu\'); return false;" title="Hungarian" class="notranslate flag hu"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/hungary.png" height="18" width="18" alt="Hungarian"/></a>';
1588
  }
1589
 
1590
  if ( isset ( $get_flag_choices['flag-is'] ) ) {
1591
+ $str.='<a id="Icelandic" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|is\'); return false;" title="Icelandic" class="notranslate flag is"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/iceland.png" height="18" width="18" alt="Icelandic"/></a>';
1592
  }
1593
 
1594
  if ( isset ( $get_flag_choices['flag-id'] ) ) {
1595
+ $str.='<a id="Indonesian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|id\'); return false;" title="Indonesian" class="notranslate flag id"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/indonesia.png" height="18" width="18" alt="Indonesian"/></a>';
1596
  }
1597
 
1598
  if ( isset ( $get_flag_choices['flag-ga'] ) ) {
1599
+ $str.='<a id="Irish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ga\'); return false;" title="Irish" class="notranslate flag ga"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/ireland.png" height="18" width="18" alt="Irish"/></a>';
1600
  }
1601
 
1602
  if ( isset ( $get_flag_choices['flag-it'] ) ) {
1603
+ $str.='<a id="Italian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\'); return false;" title="Italian" class="notranslate flag it"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/italy.png" height="18" width="18" alt="Italian"/></a>';
1604
  }
1605
 
1606
  if ( isset ( $get_flag_choices['flag-ja'] ) ) {
1607
+ $str.='<a id="Japanese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ja\'); return false;" title="Japanese" class="notranslate flag ja"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/japan.png" height="18" width="18" alt="Japanese"/></a>';
1608
  }
1609
 
1610
  if ( isset ( $get_flag_choices['flag-jw'] ) ) {
1611
+ $str.='<a id="Javanese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|jw\'); return false;" title="Javanese" class="notranslate flag jw"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/indonesia.png" height="18" width="18" alt="Javanese"/></a>';
1612
  }
1613
 
1614
  if ( isset ( $get_flag_choices['flag-kn'] ) ) {
1615
+ $str.='<a id="Kannada" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|kn\'); return false;" title="Kannada" class="notranslate flag kn"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/kannada.png" height="18" width="18" alt="Kannada"/></a>';
1616
  }
1617
 
1618
  if ( isset ( $get_flag_choices['flag-km'] ) ) {
1619
+ $str.='<a id="Khmer" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|km\'); return false;" title="Khmer" class="notranslate flag km"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/cambodia.png" height="18" width="18" alt="Khmer"/></a>';
1620
  }
1621
 
1622
  if ( isset ( $get_flag_choices['flag-ko'] ) ) {
1623
+ $str.='<a id="Korean" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ko\'); return false;" title="Korean" class="notranslate flag ko"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/korea.png" height="18" width="18" alt="Korea"/></a>';
1624
  }
1625
 
1626
  if ( isset ( $get_flag_choices['flag-lo'] ) ) {
1627
+ $str.='<a id="Lao" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lo\'); return false;" title="Lao" class="notranslate flag lo"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/laos.png" height="18" width="18" alt="Laos"/></a>';
1628
  }
1629
 
1630
  if ( isset ( $get_flag_choices['flag-la'] ) ) {
1631
+ $str.='<a id="Latin" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|la\'); return false;" title="Latin" class="notranslate flag la"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/latin.png" height="18" width="18" alt="Latin"/></a>';
1632
  }
1633
 
1634
  if ( isset ( $get_flag_choices['flag-lv'] ) ) {
1635
+ $str.='<a id="Latvian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lv\'); return false;" title="Latvian" class="notranslate flag lv"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/latvia.png" height="18" width="18" alt="Latvian"/></a>';
1636
  }
1637
 
1638
  if ( isset ( $get_flag_choices['flag-lt'] ) ) {
1639
+ $str.='<a id="Lithuanian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lt\'); return false;" title="Lithuanian" class="notranslate flag lt"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/lithuania.png" height="18" width="18" alt="Lithuanian"/></a>';
1640
  }
1641
 
1642
  if ( isset ( $get_flag_choices['flag-mk'] ) ) {
1643
+ $str.='<a id="Macedonian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mk\'); return false;" title="Macedonian" class="notranslate flag mk"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/macedonia.png" height="18" width="18" alt="Macedonian"/></a>';
1644
  }
1645
 
1646
  if ( isset ( $get_flag_choices['flag-ms'] ) ) {
1647
+ $str.='<a id="Malay" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ms\'); return false;" title="Malay" class="notranslate flag ms"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/malaysia.png" height="18" width="18" alt="Malay"/></a>';
1648
  }
1649
 
1650
  if ( isset ( $get_flag_choices['flag-mt'] ) ) {
1651
+ $str.='<a id="Maltese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mt\'); return false;" title="Maltese" class="notranslate flag mt"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/malta.png" height="18" width="18" alt="Malta"/></a>';
1652
  }
1653
 
1654
  if ( isset ( $get_flag_choices['flag-mr'] ) ) {
1655
+ $str.='<a id="Marathi" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mr\'); return false;" title="Marathi" class="notranslate flag mr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/marathi.png" height="18" width="18" alt="Marathi"/></a>';
1656
  }
1657
 
1658
  if ( isset ( $get_flag_choices['flag-no'] ) ) {
1659
+ $str.='<a id="Norwegian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|no\'); return false;" title="Norwegian" class="notranslate flag no"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/norway.png" height="18" width="18" alt="Norwegian"/></a>';
1660
  }
1661
 
1662
  if ( isset ( $get_flag_choices['flag-fa'] ) ) {
1663
+ $str.='<a id="Persian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fa\'); return false;" title="Persian" class="notranslate flag fa"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/iran.png" height="18" width="18" alt="Persian"/></a>';
1664
  }
1665
 
1666
  if ( isset ( $get_flag_choices['flag-pl'] ) ) {
1667
+ $str.='<a id="Polish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pl\'); return false;" title="Polish" class="notranslate flag pl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/poland.png" height="18" width="18" alt="Polish"/></a>';
1668
  }
1669
 
1670
  if ( isset ( $get_flag_choices['flag-pt'] ) ) {
1671
+ $str.='<a id="Portuguese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pt\'); return false;" title="Portuguese" class="notranslate flag pt"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/portugal.png" height="18" width="18" alt="Portuguese"/></a>';
1672
  }
1673
 
1674
  if ( isset ( $get_flag_choices['flag-ro'] ) ) {
1675
+ $str.='<a id="Romanian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ro\'); return false;" title="Romanian" class="notranslate flag ro"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/romania.png" height="18" width="18" alt="Romanian"/></a>';
1676
  }
1677
 
1678
  if ( isset ( $get_flag_choices['flag-ru'] ) ) {
1679
+ $str.='<a id="Russian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ru\'); return false;" title="Russian" class="notranslate flag ru"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/russia.png" height="18" width="18" alt="Russian"/></a>';
1680
  }
1681
 
1682
  if ( isset ( $get_flag_choices['flag-sr'] ) ) {
1683
+ $str.='<a id="Serbian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sr\'); return false;" title="Serbian" class="notranslate flag sr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/serbia.png" height="18" width="18" alt="Serbian"/></a>';
1684
  }
1685
 
1686
  if ( isset ( $get_flag_choices['flag-sk'] ) ) {
1687
+ $str.='<a id="Slovak" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sk\'); return false;" title="Slovak" class="notranslate flag sk"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/slovakia.png" height="18" width="18" alt="Slovak"/></a>';
1688
  }
1689
 
1690
  if ( isset ( $get_flag_choices['flag-sl'] ) ) {
1691
+ $str.='<a id="Slovenian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sl\'); return false;" title="Slovenian" class="notranslate flag sl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/slovenia.png" height="18" width="18" alt="Slovenian"/></a>';
1692
  }
1693
 
1694
  if ( isset ( $get_flag_choices['flag-es'] ) ) {
1695
+ $str.='<a id="Spanish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\'); return false;" title="Spanish" class="notranslate flag es"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/spain.png" height="18" width="18" alt="Spanish"/></a>';
1696
  }
1697
 
1698
  if ( isset ( $get_flag_choices['flag-sw'] ) ) {
1699
+ $str.='<a id="Swahili" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sw\'); return false;" title="Swahili" class="notranslate flag sw"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/kenya.png" height="18" width="18" alt="Swahili"/></a>';
1700
  }
1701
 
1702
  if ( isset ( $get_flag_choices['flag-sv'] ) ) {
1703
+ $str.='<a id="Swedish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sv\'); return false;" title="Swedish" class="notranslate flag sv"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/sweden.png" height="18" width="18" alt="Swedish"/></a>';
1704
  }
1705
 
1706
  if ( isset ( $get_flag_choices['flag-ta'] ) ) {
1707
+ $str.='<a id="Tamil" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ta\'); return false;" title="Tamil" class="notranslate flag ta"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/tamil.png" height="18" width="18" alt="Tamil"/></a>';
1708
  }
1709
 
1710
  if ( isset ( $get_flag_choices['flag-te'] ) ) {
1711
+ $str.='<a id="Telugu" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|te\'); return false;" title="Telugu" class="notranslate flag te"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/telugu.png" height="18" width="18" alt="Telugu"/></a>';
1712
  }
1713
 
1714
  if ( isset ( $get_flag_choices['flag-th'] ) ) {
1715
+ $str.='<a id="Thai" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|th\'); return false;" title="Thai" class="notranslate flag th"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/thailand.png" height="18" width="18" alt="Thai"/></a>';
1716
  }
1717
 
1718
  if ( isset ( $get_flag_choices['flag-tr'] ) ) {
1719
+ $str.='<a id="Turkish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tr\'); return false;" title="Turkish" class="notranslate flag tr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/turkey.png" height="18" width="18" alt="Turkish"/></a>';
1720
  }
1721
 
1722
  if ( isset ( $get_flag_choices['flag-uk'] ) ) {
1723
+ $str.='<a id="Ukranian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|uk\'); return false;" title="Ukranian" class="notranslate flag uk"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/ukraine.png" height="18" width="18" alt="Ukranian"/></a>';
1724
  }
1725
 
1726
  if ( isset ( $get_flag_choices['flag-ur'] ) ) {
1727
+ $str.='<a id="Urdu" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ur\'); return false;" title="Urdu" class="notranslate flag ur"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/pakistan.png" height="18" width="18" alt="Urdu"/></a>';
1728
  }
1729
 
1730
  if ( isset ( $get_flag_choices['flag-vi'] ) ) {
1731
+ $str.='<a id="Vietnamese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|vi\'); return false;" title="Vietnamese" class="notranslate flag vi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/vietnam.png" height="18" width="18" alt="vietnamese"/></a>';
 
 
 
 
1732
  }
1733
 
1734
  if ( isset ( $get_flag_choices['flag-cy'] ) ) {
1735
+ $str.='<a id="Welsh" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cy\'); return false;" title="Welsh" class="notranslate flag cy"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/wales.png" height="18" width="18" alt="Welsh"/></a>';
1736
  }
1737
 
1738
  if ( isset ( $get_flag_choices['flag-yi'] ) ) {
1739
+ $str.='<a id="Yiddish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|yi\'); return false;" title="Yiddish (Jewish)" class="notranslate flag yi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/yiddish.png" height="18" width="18" alt="Yiddish"/></a>';
1740
  }
1741
 
1742
+
1743
+ $str.='</div>';
1744
 
 
 
 
 
 
1745
 
1746
  $str.='<script type="text/javascript">
1747
  function GoogleLanguageTranslatorInit() {
1748
+ new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', multilanguagePage: true, '.$language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
1749
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
1750
  <div id="google_language_translator"></div>';
1751
  return $str;
1752
+
1753
  }
1754
+ }
1755
  }
1756
 
1757
  function googlelanguagetranslator_horizontal(){
1758
+ $is_active = get_option ( 'googlelanguagetranslator_active' );
1759
+ $get_flag_choices = get_option ('flag_display_settings');
1760
  $language_choices = googlelanguagetranslator_included_languages();
1761
+
1762
+
1763
+ if( $is_active == 1){
1764
 
 
 
1765
  foreach ($get_flag_choices as $key) {
1766
  //print_r($key);
1767
+
1768
+
1769
  }
1770
+
1771
+ $str.='<div id="flags">';
1772
+
1773
+
1774
+
1775
  if ($key == '1') {
1776
  if ( isset ( $get_flag_choices['flag-af'] ) ) {
1777
+ $str.='<a id="Afrikaans" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|af\'); return false;" title="Afrikaans" class="notranslate flag af"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/southafrica.png" height="18" width="18" alt="Afrikaans"/></a>';
1778
  }
1779
 
1780
 
1781
  if ( isset ( $get_flag_choices['flag-sq'] ) ) {
1782
+ $str.='<a id="Albanian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sq\'); return false;" title="Albanian" class="notranslate flag sq"><img class="notranslate flag flag flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/albania.png" height="18" width="18" alt="Albanian"/></a>';
1783
  }
1784
 
1785
  if ( isset ( $get_flag_choices['flag-ar'] ) ) {
1786
+ $str.='<a id="Arabic" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ar\'); return false;" title="Arabic" class="notranslate flag ar"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/saudiaarabia.png" height="18" width="18" alt="Arabic"/></a>';
1787
  }
1788
 
1789
  if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1790
+ $str.='<a id="Armenian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hy\'); return false;" title="Armenian" class="notranslate flag hy"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/armenia.png" height="18" width="18" alt="Armenian"/></a>';
1791
  }
1792
 
1793
  if ( isset ( $get_flag_choices['flag-az'] ) ) {
1794
+ $str.='<a id="Azerbaijani" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|az\'); return false;" title="Azerbaijani" class="notranslate flag az"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/azerbaijan.png" height="18" width="18" alt="Azerbaijani"/></a>';
1795
  }
1796
 
1797
  if ( isset ( $get_flag_choices['flag-eu'] ) ) {
1798
+ $str.='<a id="Basque" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eu\'); return false;" title="Basque" class="notranslate flag eu"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/basque.png" height="18" width="18" alt="Basque"/></a>';
1799
  }
1800
 
1801
  if ( isset ( $get_flag_choices['flag-be'] ) ) {
1802
+ $str.='<a id="Belarusian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|be\'); return false;" title="Belarusian" class="notranslate flag be"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/belarus.png" height="18" width="18" alt="Belarus"/></a>';
1803
  }
1804
 
1805
  if ( isset ( $get_flag_choices['flag-bn'] ) ) {
1806
+ $str.='<a id="Bengali" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bn\'); return false;" title="Bengali" class="notranslate flag bn"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/bangladesh.png" height="18" width="18" alt="Bengali"/></a>';
1807
  }
1808
 
1809
  if ( isset ( $get_flag_choices['flag-bs'] ) ) {
1810
+ $str.='<a id="Bosnian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bs\'); return false;" title="Bosnian" class="notranslate flag bs"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/bosnia.png" height="18" width="18" alt="Bosnian"/></a>';
1811
  }
1812
 
1813
  if ( isset ( $get_flag_choices['flag-bg'] ) ) {
1814
+ $str.='<a id="Bulgarian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|bg\'); return false;" title="Bulgarian" class="notranslate flag bg"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/bulgaria.png" height="18" width="18" alt="Bulgarian"/></a>';
1815
  }
1816
 
1817
  if ( isset ( $get_flag_choices['flag-ca'] ) ) {
1818
+ $str.='<a id="Catalan" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ca\'); return false;" title="Catalan" class="notranslate flag ca"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/catalonia.png" height="18" width="18" alt="Catalan"/></a>';
1819
  }
1820
 
1821
  if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
1822
+ $str.='<a id="Cebuano" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ceb\'); return false;" title="Cebuano" class="notranslate flag ceb"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/philippines.png" height="18" width="18" alt="Afrikaans"/></a>';
1823
  }
1824
 
1825
  if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
1826
+ $str.='<a id="Chinese (Simplified)" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-CN\'); return false;" title="Chinese (Simplified)" class="notranslate flag zh-CN"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/china.png" height="18" width="18" alt="Chinese (Simplified)"/></a>';
1827
  }
1828
 
1829
  if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
1830
+ $str.='<a id="Chinese (Traditional)" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|zh-TW\'); return false;" title="Chinese (Traditional)" class="notranslate flag zh-TW"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/china.png" height="18" width="18" alt="Chinese (Traditional)"/></a>';
1831
  }
1832
 
1833
  if ( isset ( $get_flag_choices['flag-cs'] ) ) {
1834
+ $str.='<a id="Czech" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cs\'); return false;" title="Czech" class="notranslate flag cs"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/czechrepublic.png" height="18" width="18" alt="Czech"/></a>';
1835
  }
1836
 
1837
  if ( isset ( $get_flag_choices['flag-hr'] ) ) {
1838
+ $str.='<a id="Croatian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hr\'); return false;" title="Croatian" class="notranslate flag hr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/croatia.png" height="18" width="18" alt="Croatian"/></a>';
1839
  }
1840
 
1841
  if ( isset ( $get_flag_choices['flag-da'] ) ) {
1842
+ $str.='<a id="Danish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|da\'); return false;" title="Danish" class="notranslate flag da"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/denmark.png" height="18" width="18" alt="Danish"/></a>';
1843
  }
1844
 
1845
  if ( isset ( $get_flag_choices['flag-nl'] ) ) {
1846
+ $str.='<a id="Dutch" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|nl\'); return false;" title="Dutch" class="notranslate flag nl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/netherlands.png" height="18" width="18" alt="Dutch"/></a>';
1847
  }
1848
 
1849
  if ( isset ( $get_flag_choices['flag-en'] ) ) {
1850
+ $str.='<a id="English" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|en\'); return false;" title="English" class="notranslate flag en"><img class="flagimg" title="English" src="'.plugins_url().'/google-language-translator/images/flags24/unitedkingdom.png" height="18" width="18" alt="English"/></a>';
1851
  }
1852
 
1853
  if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1854
+ $str.='<a id="Esperanto" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|eo\'); return false;" title="Esperanto" class="notranslate flag eo"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/esperanto.png" height="18" width="18" alt="Esperanto"/></a>';
1855
  }
1856
 
1857
  if ( isset ( $get_flag_choices['flag-et'] ) ) {
1858
+ $str.='<a id="Estonian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|et\'); return false;" title="Estonian" class="notranslate flag et"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/estonia.png" height="18" width="18" alt="Estonian"/></a>';
1859
  }
1860
 
1861
  if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1862
+ $str.='<a id="Filipino" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tl\'); return false;" title="Filipino" class="notranslate flag tl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/philippines.png" height="18" width="18" alt="Filipino"/></a>';
1863
  }
1864
 
1865
  if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1866
+ $str.='<a id="Finnish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fi\'); return false;" title="Finnish" class="notranslate flag fi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/finland.png" height="18" width="18" alt="Finnish"/></a>';
1867
+ }
1868
 
1869
  if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1870
+ $str.='<a id="French" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fr\'); return false;" title="French" class="notranslate flag fr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/france.png" height="18" width="18" alt="French"/></a>';
1871
  }
1872
 
1873
  if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1874
+ $str.='<a id="Galician" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gl\'); return false;" title="Galician" class="notranslate flag gl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/galicia.png" height="18" width="18" alt="Galician"/></a>';
1875
  }
1876
 
1877
  if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1878
+ $str.='<a id="Georgian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ka\'); return false;" title="Georgian" class="notranslate flag ka"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/georgia.png" height="18" width="18" alt="Georgian"/></a>';
1879
  }
1880
 
1881
  if ( isset ( $get_flag_choices['flag-de'] ) ) {
1882
+ $str.='<a id="German" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|de\'); return false;" title="German" class="notranslate flag de"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/germany.png" height="18" width="18" alt="German"/></a>';
1883
  }
1884
 
1885
  if ( isset ( $get_flag_choices['flag-el'] ) ) {
1886
+ $str.='<a id="Greek" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|el\'); return false;" title="Greek" class="notranslate flag el"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/greece.png" height="18" width="18" alt="Greek"/></a>';
1887
  }
1888
 
1889
  if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1890
+ $str.='<a id="Gujarati" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|gu\'); return false;" title="Gujarati" class="notranslate flag gu"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/india.png" height="18" width="18" alt="Gujarati"/></a>';
1891
  }
1892
 
1893
  if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1894
+ $str.='<a id="Haitian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ht\'); return false;" title="Haitian" class="notranslate flag ht"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/haiti.png" height="18" width="18" alt="Haitian"/></a>';
1895
  }
1896
 
1897
  if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1898
+ $str.='<a id="Hebrew" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|iw\'); return false;" title="Hebrew" class="notranslate flag iw"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/israel.png" height="18" width="18" alt="Hebrew"/></a>';
1899
  }
1900
 
1901
  if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1902
+ $str.='<a id="Hindi" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hi\'); return false;" title="Hindi" class="notranslate flag hi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/india.png" height="18" width="18" alt="Hindi"/></a>';
1903
  }
1904
 
1905
  if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1906
+ $str.='<a id="Hmong" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hmn\'); return false;" title="Hmong" class="notranslate flag hmn"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/hmong.png" height="18" width="18" alt="Hmong"/></a>';
1907
  }
1908
 
1909
  if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1910
+ $str.='<a id="Hungarian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|hu\'); return false;" title="Hungarian" class="notranslate flag hu"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/hungary.png" height="18" width="18" alt="Hungarian"/></a>';
1911
  }
1912
 
1913
  if ( isset ( $get_flag_choices['flag-is'] ) ) {
1914
+ $str.='<a id="Icelandic" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|is\'); return false;" title="Icelandic" class="notranslate flag is"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/iceland.png" height="18" width="18" alt="Icelandic"/></a>';
1915
  }
1916
 
1917
  if ( isset ( $get_flag_choices['flag-id'] ) ) {
1918
+ $str.='<a id="Indonesian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|id\'); return false;" title="Indonesian" class="notranslate flag id"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/indonesia.png" height="18" width="18" alt="Indonesian"/></a>';
1919
  }
1920
 
1921
  if ( isset ( $get_flag_choices['flag-ga'] ) ) {
1922
+ $str.='<a id="Irish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ga\'); return false;" title="Irish" class="notranslate flag ga"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/ireland.png" height="18" width="18" alt="Irish"/></a>';
1923
  }
1924
 
1925
  if ( isset ( $get_flag_choices['flag-it'] ) ) {
1926
+ $str.='<a id="Italian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|it\'); return false;" title="Italian" class="notranslate flag it"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/italy.png" height="18" width="18" alt="Italian"/></a>';
1927
  }
1928
 
1929
  if ( isset ( $get_flag_choices['flag-ja'] ) ) {
1930
+ $str.='<a id="Japanese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ja\'); return false;" title="Japanese" class="notranslate flag ja"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/japan.png" height="18" width="18" alt="Japanese"/></a>';
1931
  }
1932
 
1933
  if ( isset ( $get_flag_choices['flag-jw'] ) ) {
1934
+ $str.='<a id="Javanese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|jw\'); return false;" title="Javanese" class="notranslate flag jw"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/indonesia.png" height="18" width="18" alt="Javanese"/></a>';
1935
  }
1936
 
1937
  if ( isset ( $get_flag_choices['flag-kn'] ) ) {
1938
+ $str.='<a id="Kannada" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|kn\'); return false;" title="Kannada" class="notranslate flag kn"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/kannada.png" height="18" width="18" alt="Kannada"/></a>';
1939
  }
1940
 
1941
  if ( isset ( $get_flag_choices['flag-km'] ) ) {
1942
+ $str.='<a id="Khmer" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|km\'); return false;" title="Khmer" class="notranslate flag km"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/cambodia.png" height="18" width="18" alt="Khmer"/></a>';
1943
  }
1944
 
1945
  if ( isset ( $get_flag_choices['flag-ko'] ) ) {
1946
+ $str.='<a id="Korean" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ko\'); return false;" title="Korean" class="notranslate flag ko"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/korea.png" height="18" width="18" alt="Korea"/></a>';
1947
  }
1948
 
1949
  if ( isset ( $get_flag_choices['flag-lo'] ) ) {
1950
+ $str.='<a id="Lao" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lo\'); return false;" title="Lao" class="notranslate flag lo"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/laos.png" height="18" width="18" alt="Laos"/></a>';
1951
  }
1952
 
1953
  if ( isset ( $get_flag_choices['flag-la'] ) ) {
1954
+ $str.='<a id="Latin" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|la\'); return false;" title="Latin" class="notranslate flag la"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/latin.png" height="18" width="18" alt="Latin"/></a>';
1955
  }
1956
 
1957
  if ( isset ( $get_flag_choices['flag-lv'] ) ) {
1958
+ $str.='<a id="Latvian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lv\'); return false;" title="Latvian" class="notranslate flag lv"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/latvia.png" height="18" width="18" alt="Latvian"/></a>';
1959
  }
1960
 
1961
  if ( isset ( $get_flag_choices['flag-lt'] ) ) {
1962
+ $str.='<a id="Lithuanian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|lt\'); return false;" title="Lithuanian" class="notranslate flag lt"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/lithuania.png" height="18" width="18" alt="Lithuanian"/></a>';
1963
  }
1964
 
1965
  if ( isset ( $get_flag_choices['flag-mk'] ) ) {
1966
+ $str.='<a id="Macedonian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mk\'); return false;" title="Macedonian" class="notranslate flag mk"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/macedonia.png" height="18" width="18" alt="Macedonian"/></a>';
1967
  }
1968
 
1969
  if ( isset ( $get_flag_choices['flag-ms'] ) ) {
1970
+ $str.='<a id="Malay" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ms\'); return false;" title="Malay" class="notranslate flag ms"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/malaysia.png" height="18" width="18" alt="Malay"/></a>';
1971
  }
1972
 
1973
  if ( isset ( $get_flag_choices['flag-mt'] ) ) {
1974
+ $str.='<a id="Maltese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mt\'); return false;" title="Maltese" class="notranslate flag mt"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/malta.png" height="18" width="18" alt="Malta"/></a>';
1975
  }
1976
 
1977
  if ( isset ( $get_flag_choices['flag-mr'] ) ) {
1978
+ $str.='<a id="Marathi" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|mr\'); return false;" title="Marathi" class="notranslate flag mr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/marathi.png" height="18" width="18" alt="Marathi"/></a>';
1979
  }
1980
 
1981
  if ( isset ( $get_flag_choices['flag-no'] ) ) {
1982
+ $str.='<a id="Norwegian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|no\'); return false;" title="Norwegian" class="notranslate flag no"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/norway.png" height="18" width="18" alt="Norwegian"/></a>';
1983
  }
1984
 
1985
  if ( isset ( $get_flag_choices['flag-fa'] ) ) {
1986
+ $str.='<a id="Persian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|fa\'); return false;" title="Persian" class="notranslate flag fa"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/iran.png" height="18" width="18" alt="Persian"/></a>';
1987
  }
1988
 
1989
  if ( isset ( $get_flag_choices['flag-pl'] ) ) {
1990
+ $str.='<a id="Polish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pl\'); return false;" title="Polish" class="notranslate flag pl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/poland.png" height="18" width="18" alt="Polish"/></a>';
1991
  }
1992
 
1993
  if ( isset ( $get_flag_choices['flag-pt'] ) ) {
1994
+ $str.='<a id="Portuguese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|pt\'); return false;" title="Portuguese" class="notranslate flag pt"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/portugal.png" height="18" width="18" alt="Portuguese"/></a>';
1995
  }
1996
 
1997
  if ( isset ( $get_flag_choices['flag-ro'] ) ) {
1998
+ $str.='<a id="Romanian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ro\'); return false;" title="Romanian" class="notranslate flag ro"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/romania.png" height="18" width="18" alt="Romanian"/></a>';
1999
  }
2000
 
2001
  if ( isset ( $get_flag_choices['flag-ru'] ) ) {
2002
+ $str.='<a id="Russian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ru\'); return false;" title="Russian" class="notranslate flag ru"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/russia.png" height="18" width="18" alt="Russian"/></a>';
2003
  }
2004
 
2005
  if ( isset ( $get_flag_choices['flag-sr'] ) ) {
2006
+ $str.='<a id="Serbian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sr\'); return false;" title="Serbian" class="notranslate flag sr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/serbia.png" height="18" width="18" alt="Serbian"/></a>';
2007
  }
2008
 
2009
  if ( isset ( $get_flag_choices['flag-sk'] ) ) {
2010
+ $str.='<a id="Slovak" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sk\'); return false;" title="Slovak" class="notranslate flag sk"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/slovakia.png" height="18" width="18" alt="Slovak"/></a>';
2011
  }
2012
 
2013
  if ( isset ( $get_flag_choices['flag-sl'] ) ) {
2014
+ $str.='<a id="Slovenian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sl\'); return false;" title="Slovenian" class="notranslate flag sl"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/slovenia.png" height="18" width="18" alt="Slovenian"/></a>';
2015
  }
2016
 
2017
  if ( isset ( $get_flag_choices['flag-es'] ) ) {
2018
+ $str.='<a id="Spanish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|es\'); return false;" title="Spanish" class="notranslate flag es"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/spain.png" height="18" width="18" alt="Spanish"/></a>';
2019
  }
2020
 
2021
  if ( isset ( $get_flag_choices['flag-sw'] ) ) {
2022
+ $str.='<a id="Swahili" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sw\'); return false;" title="Swahili" class="notranslate flag sw"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/kenya.png" height="18" width="18" alt="Swahili"/></a>';
2023
  }
2024
 
2025
  if ( isset ( $get_flag_choices['flag-sv'] ) ) {
2026
+ $str.='<a id="Swedish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|sv\'); return false;" title="Swedish" class="notranslate flag sv"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/sweden.png" height="18" width="18" alt="Swedish"/></a>';
2027
  }
2028
 
2029
  if ( isset ( $get_flag_choices['flag-ta'] ) ) {
2030
+ $str.='<a id="Tamil" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ta\'); return false;" title="Tamil" class="notranslate flag ta"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/tamil.png" height="18" width="18" alt="Tamil"/></a>';
2031
  }
2032
 
2033
  if ( isset ( $get_flag_choices['flag-te'] ) ) {
2034
+ $str.='<a id="Telugu" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|te\'); return false;" title="Telugu" class="notranslate flag te"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/telugu.png" height="18" width="18" alt="Telugu"/></a>';
2035
  }
2036
 
2037
  if ( isset ( $get_flag_choices['flag-th'] ) ) {
2038
+ $str.='<a id="Thai" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|th\'); return false;" title="Thai" class="notranslate flag th"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/thailand.png" height="18" width="18" alt="Thai"/></a>';
2039
  }
2040
 
2041
  if ( isset ( $get_flag_choices['flag-tr'] ) ) {
2042
+ $str.='<a id="Turkish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|tr\'); return false;" title="Turkish" class="notranslate flag tr"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/turkey.png" height="18" width="18" alt="Turkish"/></a>';
2043
  }
2044
 
2045
  if ( isset ( $get_flag_choices['flag-uk'] ) ) {
2046
+ $str.='<a id="Ukranian" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|uk\'); return false;" title="Ukranian" class="notranslate flag uk"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/ukraine.png" height="18" width="18" alt="Ukranian"/></a>';
2047
  }
2048
 
2049
  if ( isset ( $get_flag_choices['flag-ur'] ) ) {
2050
+ $str.='<a id="Urdu" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|ur\'); return false;" title="Urdu" class="notranslate flag ur"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/pakistan.png" height="18" width="18" alt="Urdu"/></a>';
2051
  }
2052
 
2053
  if ( isset ( $get_flag_choices['flag-vi'] ) ) {
2054
+ $str.='<a id="Vietnamese" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|vi\'); return false;" title="Vietnamese" class="notranslate flag vi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/vietnam.png" height="18" width="18" alt="vietnamese"/></a>';
 
 
 
 
2055
  }
2056
 
2057
  if ( isset ( $get_flag_choices['flag-cy'] ) ) {
2058
+ $str.='<a id="Welsh" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|cy\'); return false;" title="Welsh" class="notranslate flag cy"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/wales.png" height="18" width="18" alt="Welsh"/></a>';
2059
  }
2060
 
2061
  if ( isset ( $get_flag_choices['flag-yi'] ) ) {
2062
+ $str.='<a id="Yiddish" href="#" onclick="doGoogleLanguageTranslator(\''.get_option('googlelanguagetranslator_language').'|yi\'); return false;" title="Yiddish (Jewish)" class="notranslate flag yi"><img class="flagimg" src="'.plugins_url().'/google-language-translator/images/flags24/yiddish.png" height="18" width="18" alt="Yiddish"/></a>';
2063
  }
2064
+ $str.='</div>';
2065
+
2066
 
2067
 
 
 
 
 
2068
  $str.='<script type="text/javascript">
2069
  function GoogleLanguageTranslatorInit() {
2070
+ new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', multilanguagePage: true, '.$language_choices.' layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,autoDisplay: false }, \'google_language_translator\'); }
2071
  </script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
2072
  <div id="google_language_translator"></div>';
2073
  return $str;
2074
+
2075
  }
2076
  }
2077
  }
2078
 
2079
 
2080
+
2081
  function googlelanguagetranslator_toolbar_yes(){
2082
+ if(get_option('googlelanguagetranslator_active')==1) { ?>
2083
+ <style type="text/css">
2084
+ #google_language_translator {color: transparent;}
2085
+ .goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
2086
+ .goog-tooltip {display: none !important;}
2087
+ .goog-tooltip:hover {display: none !important;}
2088
+ .goog-text-highlight {background-color: transparent !important; border: none !important;box-shadow: none !important;}
2089
+ </style>
2090
+ <?php
2091
  }
2092
  }
2093
 
2138
  <style type="text/css">
2139
  #google_language_translator a {display: none !important; }
2140
  .goog-te-gadget {color:transparent !important;}
2141
+ <?php if (get_option('googlelanguagetranslator_theme_style')=='elegant') { ?>
2142
+ a.goog-logo-link { display:none; }
2143
+ <?php } ?>
2144
  .goog-te-gadget { font-size:0px !important; }
2145
  .goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
2146
  .goog-tooltip {display: none !important;}
2147
  .goog-tooltip:hover {display: none !important;}
2148
  .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
2149
+ .goog-branding { display:none; }
2150
  </style>
2151
  <?php
2152
  }
2153
  }
2154
 
2155
+ function googlelanguagetranslator_flags_display() {
2156
+ $options = get_option ('googlelanguagetranslator_flag_size'); ?>
2157
+
2158
  <style type="text/css">
2159
+
2160
  <?php if(get_option('googlelanguagetranslator_display')=='Vertical') { ?>
2161
  <?php if (get_option('googlelanguagetranslator_language_option')=='specific') { ?>
2162
  #flags {display:none !important; }
2176
  p.hello { font-size:12px; color:#666; }
2177
  <?php } ?>
2178
  <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
2179
+ #google_language_translator, #language { clear:both; width:auto !important; text-align:right; }
2180
+ #language { float:right; }
2181
+ .switcher { right:0px !important; left:auto; }
2182
+ #flags { text-align:right; width:165px; float:right; clear:right; }
2183
+ p.hello { text-align:right; float:right; clear:both; }
2184
  .glt-clear { height:0px; clear:both; margin:0px; padding:0px; }
2185
  <?php } ?>
2186
  <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') { ?>
2187
  #google_language_translator { clear:both; }
2188
+ #flags { width:165px; }
2189
+ #flags a { display:inline-block; margin-right:2px; }
2190
+
2191
+
2192
+
2193
+ }
2194
  <?php } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
2195
+ #flags { width:165px; }
2196
+ #flags a { display:inline-block; margin-left:2px; }
2197
+ <?php } ?>
2198
+
2199
+
2200
  </style>
2201
+
2202
+
2203
+ <?php
2204
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2205
  }
2206
  add_action('wp_head','googlelanguagetranslator_flags_display');
2207
 
images/arrow_down.png ADDED
Binary file
images/{Jersey.png → flags164444/Jersey.png} RENAMED
File without changes
images/{Jordan.png → flags164444/Jordan.png} RENAMED
File without changes
images/{Togo.png → flags164444/Togo.png} RENAMED
File without changes
images/{albania.png → flags164444/albania.png} RENAMED
File without changes
images/{armenia.png → flags164444/armenia.png} RENAMED
File without changes
images/{azerbaijan.png → flags164444/azerbaijan.png} RENAMED
File without changes
images/{bangladesh.png → flags164444/bangladesh.png} RENAMED
File without changes
images/{basque.png → flags164444/basque.png} RENAMED
File without changes
images/{belarus.png → flags164444/belarus.png} RENAMED
File without changes
images/{bosnia.png → flags164444/bosnia.png} RENAMED
File without changes
images/{bulgaria.png → flags164444/bulgaria.png} RENAMED
File without changes
images/{cambodia.png → flags164444/cambodia.png} RENAMED
File without changes
images/{china.png → flags164444/china.png} RENAMED
File without changes
images/{croatia.png → flags164444/croatia.png} RENAMED
File without changes
images/{czechrepublic.png → flags164444/czechrepublic.png} RENAMED
File without changes
images/{denmark.png → flags164444/denmark.png} RENAMED
File without changes
images/{esperanto.png → flags164444/esperanto.png} RENAMED
File without changes
images/{estonia.png → flags164444/estonia.png} RENAMED
File without changes
images/{finland.png → flags164444/finland.png} RENAMED
File without changes
images/{france.png → flags164444/france.png} RENAMED
File without changes
images/{galicia.png → flags164444/galicia.png} RENAMED
File without changes
images/{georgia.png → flags164444/georgia.png} RENAMED
File without changes
images/{germany.png → flags164444/germany.png} RENAMED
File without changes
images/{greece.png → flags164444/greece.png} RENAMED
File without changes
images/{gujarati.png → flags164444/gujarati.png} RENAMED
File without changes
images/{haiti.png → flags164444/haiti.png} RENAMED
File without changes
images/{hmong.png → flags164444/hmong.png} RENAMED
File without changes
images/{hungary.png → flags164444/hungary.png} RENAMED
File without changes
images/{iceland.png → flags164444/iceland.png} RENAMED
File without changes
images/{india.png → flags164444/india.png} RENAMED
File without changes
images/{indonesia.png → flags164444/indonesia.png} RENAMED
File without changes
images/{iran.png → flags164444/iran.png} RENAMED
File without changes
images/{ireland.png → flags164444/ireland.png} RENAMED
File without changes
images/{israel.png → flags164444/israel.png} RENAMED
File without changes
images/{italy.png → flags164444/italy.png} RENAMED
File without changes
images/{japan.png → flags164444/japan.png} RENAMED
File without changes
images/{kannada.png → flags164444/kannada.png} RENAMED
File without changes
images/{kenya.png → flags164444/kenya.png} RENAMED
File without changes
images/{korea.png → flags164444/korea.png} RENAMED
File without changes
images/{laos.png → flags164444/laos.png} RENAMED
File without changes
images/{latin.png → flags164444/latin.png} RENAMED
File without changes
images/{latvia.png → flags164444/latvia.png} RENAMED
File without changes
images/{lithuania.png → flags164444/lithuania.png} RENAMED
File without changes
images/{macedonia.png → flags164444/macedonia.png} RENAMED
File without changes
images/{malaysia.png → flags164444/malaysia.png} RENAMED
File without changes
images/{malta.png → flags164444/malta.png} RENAMED
File without changes
images/{marathi.png → flags164444/marathi.png} RENAMED
File without changes
images/{netherlands.png → flags164444/netherlands.png} RENAMED
File without changes
images/{norway.png → flags164444/norway.png} RENAMED
File without changes
images/{pakistan.png → flags164444/pakistan.png} RENAMED
File without changes
images/{philippines.png → flags164444/philippines.png} RENAMED
File without changes
images/{poland.png → flags164444/poland.png} RENAMED
File without changes
images/{portugal.png → flags164444/portugal.png} RENAMED
File without changes
images/{romania.png → flags164444/romania.png} RENAMED
File without changes
images/{russia.png → flags164444/russia.png} RENAMED
File without changes
images/{saudiarabia.png → flags164444/saudiarabia.png} RENAMED
File without changes
images/{serbia.png → flags164444/serbia.png} RENAMED
File without changes
images/{slovakia.png → flags164444/slovakia.png} RENAMED
File without changes
images/{slovenia.png → flags164444/slovenia.png} RENAMED
File without changes
images/{southafrica.png → flags164444/southafrica.png} RENAMED
File without changes
images/{spain.png → flags164444/spain.png} RENAMED
File without changes
images/{sweden.png → flags164444/sweden.png} RENAMED
File without changes
images/{tamil.png → flags164444/tamil.png} RENAMED
File without changes
images/{telugu.png → flags164444/telugu.png} RENAMED
File without changes
images/{thailand.png → flags164444/thailand.png} RENAMED
File without changes
images/{turkey.png → flags164444/turkey.png} RENAMED
File without changes
images/{ukraine.png → flags164444/ukraine.png} RENAMED
File without changes
images/{united-kingdom.png → flags164444/unitedkingdom.png} RENAMED
File without changes
images/{vietnam.png → flags164444/vietnam.png} RENAMED
File without changes
images/{wales.png → flags164444/wales.png} RENAMED
File without changes
images/{yiddish.png → flags164444/yiddish.png} RENAMED
File without changes
images/flags24/albania.png ADDED
Binary file
images/flags24/armenia.png ADDED
Binary file
images/flags24/azerbaijan.png ADDED
Binary file
images/flags24/bangladesh.png ADDED
Binary file
images/flags24/basque.png ADDED
Binary file
images/flags24/belarus.png ADDED
Binary file
images/flags24/bosnia.png ADDED
Binary file
images/flags24/bulgaria.png ADDED
Binary file
images/flags24/cambodia.png ADDED
Binary file
images/flags24/catalonia.png ADDED
Binary file
images/flags24/china.png ADDED
Binary file
images/flags24/croatia.png ADDED
Binary file
images/flags24/czechrepublic.png ADDED
Binary file
images/flags24/denmark.png ADDED
Binary file
images/flags24/esperanto.png ADDED
Binary file
images/flags24/estonia.png ADDED
Binary file
images/flags24/finland.png ADDED
Binary file
images/flags24/france.png ADDED
Binary file
images/flags24/galicia.png ADDED
Binary file
images/flags24/georgia.png ADDED
Binary file
images/flags24/germany.png ADDED
Binary file
images/flags24/greece.png ADDED
Binary file
images/flags24/haiti.png ADDED
Binary file
images/flags24/hmong.png ADDED
Binary file
images/flags24/hungary.png ADDED
Binary file
images/flags24/iceland.png ADDED
Binary file
images/flags24/india.png ADDED
Binary file
images/flags24/indonesia.png ADDED
Binary file
images/flags24/iran.png ADDED
Binary file
images/flags24/ireland.png ADDED
Binary file
images/flags24/israel.png ADDED
Binary file
images/flags24/italy.png ADDED
Binary file
images/flags24/japan.png ADDED
Binary file
images/flags24/kannada.png ADDED
Binary file
images/flags24/kenya.png ADDED
Binary file
images/flags24/korea.png ADDED
Binary file
images/flags24/laos.png ADDED
Binary file
images/flags24/latin.png ADDED
Binary file
images/flags24/latvia.png ADDED
Binary file
images/flags24/lithuania.png ADDED
Binary file
images/flags24/macedonia.png ADDED
Binary file
images/flags24/malaysia.png ADDED
Binary file
images/flags24/malta.png ADDED
Binary file
images/flags24/marathi.png ADDED
Binary file
images/flags24/netherlands.png ADDED
Binary file
images/flags24/norway.png ADDED
Binary file
images/flags24/pakistan.png ADDED
Binary file
images/flags24/philippines.png ADDED
Binary file
images/flags24/poland.png ADDED
Binary file
images/flags24/portugal.png ADDED
Binary file
images/flags24/romania.png ADDED
Binary file
images/flags24/russia.png ADDED
Binary file
images/flags24/saudiaarabia.png ADDED
Binary file
images/flags24/serbia.png ADDED
Binary file
images/flags24/slovakia.png ADDED
Binary file
images/flags24/slovenia.png ADDED
Binary file
images/flags24/southafrica.png ADDED
Binary file
images/flags24/spain.png ADDED
Binary file
images/flags24/sweden.png ADDED
Binary file
images/flags24/tamil.png ADDED
Binary file
images/flags24/telugu.png ADDED
Binary file
images/flags24/thailand.png ADDED
Binary file
images/flags24/turkey.png ADDED
Binary file
images/flags24/ukraine.png ADDED
Binary file
images/flags24/unitedkingdom.png ADDED
Binary file
images/flags24/vietnam.png ADDED
Binary file
images/flags24/wales.png ADDED
Binary file
images/flags24/yiddish.png ADDED
Binary file
images/logo_slogan.png ADDED
Binary file
images/switcher.png ADDED
Binary file
readme.txt CHANGED
@@ -1,106 +1,118 @@
1
- === Google Language Translator ===
2
- Contributors: Rob Myrick
3
- Donate link: https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=c6aycTLE8Qho4lN9-QgzmJQKxNrRLomhJQ8gEAM2t5EZc5enxqC4Dpii-1C&dispatch=5885d80a13c0db1f8e263663d3faee8d0b7e678a25d883d0fa72c947f193f8fd
4
- Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
- Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
- Requires at least: 2.9
7
- Tested up to: 3.6
8
- stable tag: 2.6
9
-
10
- Welcome to Google Language Tranlator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
-
12
- == Description ==
13
-
14
- Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
15
-
16
- == Installation ==
17
-
18
- 1. Download the zip folder named google-language-translator.zip
19
- 2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
20
- 3. Activate the plugin through the plugin window in the admin panel.
21
- 4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
22
- 5. Copy the shortcode and paste it into a page, post or widget.
23
- 6. Do not use the shortcode twice on a single page - it will not work.
24
-
25
- == Frequently Asked Questions ==
26
-
27
- == Changelog ==
28
-
29
- 1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
30
-
31
- 1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
32
-
33
- 1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
34
-
35
- 1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
36
-
37
- 1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
38
-
39
- 1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
40
-
41
- 1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
42
-
43
- 1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
44
-
45
- 1.9
46
-
47
- - Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
48
-
49
- - Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
50
-
51
- - Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
52
-
53
- - Added jQuery functionality to the settings panel to improve the user experience.
54
-
55
- - Added an option for users to display/hide the flag images.
56
-
57
- - Added an option for users to display/hide the translate box when flags are displayed.
58
-
59
- - Removed the settings.css file - I found a better way of displaying the options without CSS.
60
-
61
- 2.0 Corrected some immediate errors in the 1.9 update.
62
-
63
- 2.1
64
-
65
- - Added language "Dutch" to the Original Language drop-down option on the settings page.
66
-
67
- - Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
68
-
69
- 2.2
70
-
71
- - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
72
-
73
- - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
74
-
75
- - Added link in the settings panel that points to Google's Attribution Policy.
76
-
77
- 2.3
78
-
79
- - Added a "Preview" area on the settings page that allows you to see your settings in action.
80
-
81
- - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
82
-
83
- - Added an option that allows left/right alignment of the translation tool.
84
-
85
- - Added the "Google Language Translator" widget.
86
-
87
- - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
88
-
89
- 2.4
90
-
91
- - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
92
-
93
- 2.5
94
-
95
- - Eliminated an internal Wordpress error being generated from a coding mistake.
96
-
97
- - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
98
-
99
- 2.6
100
-
101
- - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
102
-
103
-
104
- == Screenshots ==
105
-
106
- 1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Google Language Translator ===
2
+ Contributors: rm2773
3
+ Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=47LFA33AC89S6
4
+ Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
+ Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
+ Requires at least: 2.9
7
+ Tested up to: 3.6.1
8
+ stable tag: 2.7
9
+
10
+ Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
+
12
+ == Description ==
13
+
14
+ Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
15
+
16
+ == Installation ==
17
+
18
+ 1. Download the zip folder named google-language-translator.zip
19
+ 2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
20
+ 3. Activate the plugin through the plugin window in the admin panel.
21
+ 4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
22
+ 5. Copy the shortcode and paste it into a page, post or widget.
23
+ 6. Do not use the shortcode twice on a single page - it will not work.
24
+
25
+ == Frequently Asked Questions ==
26
+
27
+ == Changelog ==
28
+
29
+ 1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
30
+
31
+ 1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
32
+
33
+ 1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
34
+
35
+ 1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
36
+
37
+ 1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
38
+
39
+ 1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
40
+
41
+ 1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
42
+
43
+ 1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
44
+
45
+ 1.9
46
+
47
+ - Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
48
+
49
+ - Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
50
+
51
+ - Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
52
+
53
+ - Added jQuery functionality to the settings panel to improve the user experience.
54
+
55
+ - Added an option for users to display/hide the flag images.
56
+
57
+ - Added an option for users to display/hide the translate box when flags are displayed.
58
+
59
+ - Removed the settings.css file - I found a better way of displaying the options without CSS.
60
+
61
+ 2.0 Corrected some immediate errors in the 1.9 update.
62
+
63
+ 2.1
64
+
65
+ - Added language "Dutch" to the Original Language drop-down option on the settings page.
66
+
67
+ - Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
68
+
69
+ 2.2
70
+
71
+ - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
72
+
73
+ - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
74
+
75
+ - Added link in the settings panel that points to Google's Attribution Policy.
76
+
77
+ 2.3
78
+
79
+ - Added a "Preview" area on the settings page that allows you to see your settings in action.
80
+
81
+ - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
82
+
83
+ - Added an option that allows left/right alignment of the translation tool.
84
+
85
+ - Added the "Google Language Translator" widget.
86
+
87
+ - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
88
+
89
+ 2.4
90
+
91
+ - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
92
+
93
+ 2.5
94
+
95
+ - Eliminated an internal Wordpress error being generated from a coding mistake.
96
+
97
+ - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
98
+
99
+ 2.6
100
+
101
+ - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
102
+
103
+ 2.7
104
+
105
+ - Added Google Analytics tracking capability to the plugin.
106
+
107
+ - Added a "CSS Styles" box in the settings panel.
108
+
109
+ - Changed the Catalonian flag to its correct flag image.
110
+
111
+ - Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
112
+
113
+ - Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
114
+
115
+
116
+ == Screenshots ==
117
+
118
+ 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 CHANGED
@@ -8,7 +8,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
 
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