Google Language Translator - Version 3.0.3

Version Description

Download this release

Release Info

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

Code changes from version 3.0.2 to 3.0.3

css/style2.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php echo 'hello'; ?>
glt_activate.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function glt_activate() {
4
+ add_option('googlelanguagetranslator_active', 1);
5
+ add_option('googlelanguagetranslator_language','en');
6
+ add_option('googlelanguagetranslator_language_option','all');
7
+ add_option('language_display_settings',array ('en' => 1));
8
+ add_option('googlelanguagetranslator_flags','show_flags');
9
+ add_option('flag_display_settings',array ('flag-en' => 1));
10
+ add_option('googlelanguagetranslator_translatebox','yes');
11
+ add_option('googlelanguagetranslator_display','Vertical');
12
+ add_option('googlelanguagetranslator_toolbar','Yes');
13
+ add_option('googlelanguagetranslator_showbranding','Yes');
14
+ add_option('googlelanguagetranslator_flags_alignment','flags_left');
15
+ add_option('googlelanguagetranslator_analytics',1);
16
+ add_option('googlelanguagetranslator_analytics_id','');
17
+ add_option('googlelanguagetranslator_css','');
18
+ add_option('googlelanguagetranslator_manage_translations',0);
19
+ add_option('googlelanguagetranslator_multilanguage',0);
20
+ }
21
+
22
+ ?>
glt_css.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style type="text/css">
2
+ <?php
3
+ $options = get_option ('googlelanguagetranslator_flag_size');
4
+ $glt_css = get_option("googlelanguagetranslator_css");
5
+ if (get_option('googlelanguagetranslator_flags') == 'show_flags') {
6
+
7
+ if(get_option('googlelanguagetranslator_display')=='Vertical') {
8
+ if (get_option('googlelanguagetranslator_language_option')=='specific') {
9
+ echo '#flags {display:none !important; }';
10
+ }
11
+
12
+ echo 'p.hello { font-size:12px; color:darkgray; }';
13
+ echo '#google_language_translator, #flags { text-align:left; }';
14
+ } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') {
15
+
16
+ if (get_option('googlelanguagetranslator_language_option')=='specific') {
17
+ echo '#flags {display:none !important; }';
18
+ }
19
+
20
+ if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') {
21
+ echo '#google_language_translator { text-align:left !important; }';
22
+ echo 'select.goog-te-combo { float:right; }';
23
+ echo '.goog-te-gadget { padding-top:13px; }';
24
+ echo '.goog-te-gadget .goog-te-combo { margin-top:-7px !important; }';
25
+ }
26
+
27
+ echo '.goog-te-gadget { margin-top:2px !important; }';
28
+ echo 'p.hello { font-size:12px; color:#666; }';
29
+ }
30
+
31
+ if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
32
+ echo '#google_language_translator, #language { clear:both; width:auto !important; text-align:right; }';
33
+ echo '#language { float:right; }';
34
+ echo '#flags { text-align:right; width:165px; float:right; clear:right; }';
35
+ echo 'p.hello { text-align:right; float:right; clear:both; }';
36
+ echo '.glt-clear { height:0px; clear:both; margin:0px; padding:0px; }';
37
+ }
38
+
39
+ if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') {
40
+ echo '#google_language_translator { clear:both; }';
41
+ echo '#flags { width:165px; }';
42
+ echo '#flags a { display:inline-block; margin-right:2px; }';
43
+ } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') {
44
+ echo '#flags { width:165px; }';
45
+ echo '#flags a { display:inline-block; margin-left:2px; }';
46
+ }
47
+ }
48
+
49
+ if (get_option('googlelanguagetranslator_manage_translations') == 0) {
50
+ if(get_option('googlelanguagetranslator_active')==1) {
51
+ echo '.goog-tooltip {display: none !important;}';
52
+ echo '.goog-tooltip:hover {display: none !important;}';
53
+ echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
54
+ }
55
+ }
56
+
57
+ if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
58
+ if(get_option('googlelanguagetranslator_active')==1) {
59
+ echo '#google_language_translator { width:auto !important; }';
60
+ }
61
+
62
+ } elseif(get_option('googlelanguagetranslator_showbranding')=='No') {
63
+ if(get_option('googlelanguagetranslator_active')==1) {
64
+ echo '#google_language_translator a {display: none !important; }';
65
+ echo '.goog-te-gadget {color:transparent !important;}';
66
+ echo '.goog-te-gadget { font-size:0px !important; }';
67
+ echo '.goog-tooltip {display: none !important;}';
68
+ echo '.goog-tooltip:hover {display: none !important;}';
69
+ echo '.goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}';
70
+ echo '.goog-branding { display:none; }';
71
+ }
72
+ }
73
+
74
+ if (get_option('googlelanguagetranslator_translatebox') == 'no') {
75
+ if(get_option('googlelanguagetranslator_active')==1) {
76
+ echo '#google_language_translator { display:none; }';
77
+ }
78
+ }
79
+
80
+ if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
81
+ if(get_option('googlelanguagetranslator_active') ==1) {
82
+ echo '#flags { display:none; }';
83
+ }
84
+ }
85
+
86
+ if(get_option('googlelanguagetranslator_toolbar')=='Yes') {
87
+ if(get_option('googlelanguagetranslator_active')==1) {
88
+ echo '#google_language_translator {color: transparent;}';
89
+ echo 'body { top:0px !important; }';
90
+ }
91
+ } elseif(get_option('googlelanguagetranslator_toolbar')=='No') {
92
+ if(get_option('googlelanguagetranslator_active')==1) {
93
+ echo '.goog-te-banner-frame{visibility:hidden !important;}';
94
+ echo 'body { top:0px !important;}';
95
+ }
96
+ }
97
+
98
+ ?>
99
+ </style>
glt_horizontal.php ADDED
@@ -0,0 +1,332 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function googlelanguagetranslator_horizontal(){
4
+ $is_active = get_option ( 'googlelanguagetranslator_active' );
5
+ $get_flag_choices = get_option ('flag_display_settings');
6
+ $language_choices = googlelanguagetranslator_included_languages();
7
+
8
+
9
+ if( $is_active == 1){
10
+
11
+ foreach ($get_flag_choices as $key) {
12
+ //print_r($key);
13
+ }
14
+
15
+ $str='<div id="flags">';
16
+
17
+
18
+
19
+ if ($key == '1') {
20
+ if ( isset ( $get_flag_choices['flag-af'] ) ) {
21
+ $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>';
22
+ }
23
+ if ( isset ( $get_flag_choices['flag-sq'] ) ) {
24
+ $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>';
25
+ }
26
+
27
+ if ( isset ( $get_flag_choices['flag-ar'] ) ) {
28
+ $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>';
29
+ }
30
+
31
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
32
+ $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>';
33
+ }
34
+
35
+ if ( isset ( $get_flag_choices['flag-az'] ) ) {
36
+ $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>';
37
+ }
38
+
39
+ if ( isset ( $get_flag_choices['flag-eu'] ) ) {
40
+ $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>';
41
+ }
42
+
43
+ if ( isset ( $get_flag_choices['flag-be'] ) ) {
44
+ $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>';
45
+ }
46
+
47
+ if ( isset ( $get_flag_choices['flag-bn'] ) ) {
48
+ $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>';
49
+ }
50
+
51
+ if ( isset ( $get_flag_choices['flag-bs'] ) ) {
52
+ $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>';
53
+ }
54
+
55
+ if ( isset ( $get_flag_choices['flag-bg'] ) ) {
56
+ $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>';
57
+ }
58
+
59
+ if ( isset ( $get_flag_choices['flag-ca'] ) ) {
60
+ $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>';
61
+ }
62
+
63
+ if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
64
+ $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>';
65
+ }
66
+
67
+ if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
68
+ $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>';
69
+ }
70
+
71
+ if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
72
+ $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>';
73
+ }
74
+
75
+ if ( isset ( $get_flag_choices['flag-cs'] ) ) {
76
+ $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>';
77
+ }
78
+
79
+ if ( isset ( $get_flag_choices['flag-hr'] ) ) {
80
+ $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>';
81
+ }
82
+
83
+ if ( isset ( $get_flag_choices['flag-da'] ) ) {
84
+ $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>';
85
+ }
86
+
87
+ if ( isset ( $get_flag_choices['flag-nl'] ) ) {
88
+ $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>';
89
+ }
90
+
91
+ if ( isset ( $get_flag_choices['flag-en'] ) ) {
92
+ $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>';
93
+ }
94
+
95
+ if ( isset ( $get_flag_choices['flag-eo'] ) ) {
96
+ $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>';
97
+ }
98
+
99
+ if ( isset ( $get_flag_choices['flag-et'] ) ) {
100
+ $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>';
101
+ }
102
+
103
+ if ( isset ( $get_flag_choices['flag-tl'] ) ) {
104
+ $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>';
105
+ }
106
+
107
+ if ( isset ( $get_flag_choices['flag-fi'] ) ) {
108
+ $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>';
109
+ }
110
+
111
+ if ( isset ( $get_flag_choices['flag-fr'] ) ) {
112
+ $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>';
113
+ }
114
+
115
+ if ( isset ( $get_flag_choices['flag-gl'] ) ) {
116
+ $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>';
117
+ }
118
+
119
+ if ( isset ( $get_flag_choices['flag-ka'] ) ) {
120
+ $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>';
121
+ }
122
+
123
+ if ( isset ( $get_flag_choices['flag-de'] ) ) {
124
+ $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>';
125
+ }
126
+
127
+ if ( isset ( $get_flag_choices['flag-el'] ) ) {
128
+ $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>';
129
+ }
130
+
131
+ if ( isset ( $get_flag_choices['flag-gu'] ) ) {
132
+ $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>';
133
+ }
134
+
135
+ if ( isset ( $get_flag_choices['flag-ht'] ) ) {
136
+ $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>';
137
+ }
138
+
139
+ if ( isset ( $get_flag_choices['flag-iw'] ) ) {
140
+ $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>';
141
+ }
142
+
143
+ if ( isset ( $get_flag_choices['flag-hi'] ) ) {
144
+ $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>';
145
+ }
146
+
147
+ if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
148
+ $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>';
149
+ }
150
+
151
+ if ( isset ( $get_flag_choices['flag-hu'] ) ) {
152
+ $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>';
153
+ }
154
+
155
+ if ( isset ( $get_flag_choices['flag-is'] ) ) {
156
+ $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>';
157
+ }
158
+
159
+ if ( isset ( $get_flag_choices['flag-id'] ) ) {
160
+ $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>';
161
+ }
162
+
163
+ if ( isset ( $get_flag_choices['flag-ga'] ) ) {
164
+ $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>';
165
+ }
166
+
167
+ if ( isset ( $get_flag_choices['flag-it'] ) ) {
168
+ $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>';
169
+ }
170
+
171
+ if ( isset ( $get_flag_choices['flag-ja'] ) ) {
172
+ $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>';
173
+ }
174
+
175
+ if ( isset ( $get_flag_choices['flag-jw'] ) ) {
176
+ $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>';
177
+ }
178
+
179
+ if ( isset ( $get_flag_choices['flag-kn'] ) ) {
180
+ $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>';
181
+ }
182
+
183
+ if ( isset ( $get_flag_choices['flag-km'] ) ) {
184
+ $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>';
185
+ }
186
+
187
+ if ( isset ( $get_flag_choices['flag-ko'] ) ) {
188
+ $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>';
189
+ }
190
+
191
+ if ( isset ( $get_flag_choices['flag-lo'] ) ) {
192
+ $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>';
193
+ }
194
+
195
+ if ( isset ( $get_flag_choices['flag-la'] ) ) {
196
+ $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>';
197
+ }
198
+
199
+ if ( isset ( $get_flag_choices['flag-lv'] ) ) {
200
+ $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>';
201
+ }
202
+
203
+ if ( isset ( $get_flag_choices['flag-lt'] ) ) {
204
+ $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>';
205
+ }
206
+
207
+ if ( isset ( $get_flag_choices['flag-mk'] ) ) {
208
+ $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>';
209
+ }
210
+
211
+ if ( isset ( $get_flag_choices['flag-ms'] ) ) {
212
+ $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>';
213
+ }
214
+
215
+ if ( isset ( $get_flag_choices['flag-mt'] ) ) {
216
+ $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>';
217
+ }
218
+
219
+ if ( isset ( $get_flag_choices['flag-mr'] ) ) {
220
+ $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>';
221
+ }
222
+
223
+ if ( isset ( $get_flag_choices['flag-no'] ) ) {
224
+ $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>';
225
+ }
226
+
227
+ if ( isset ( $get_flag_choices['flag-fa'] ) ) {
228
+ $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>';
229
+ }
230
+
231
+ if ( isset ( $get_flag_choices['flag-pl'] ) ) {
232
+ $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>';
233
+ }
234
+
235
+ if ( isset ( $get_flag_choices['flag-pt'] ) ) {
236
+ $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>';
237
+ }
238
+
239
+ if ( isset ( $get_flag_choices['flag-ro'] ) ) {
240
+ $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>';
241
+ }
242
+
243
+ if ( isset ( $get_flag_choices['flag-ru'] ) ) {
244
+ $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>';
245
+ }
246
+
247
+ if ( isset ( $get_flag_choices['flag-sr'] ) ) {
248
+ $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>';
249
+ }
250
+
251
+ if ( isset ( $get_flag_choices['flag-sk'] ) ) {
252
+ $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>';
253
+ }
254
+
255
+ if ( isset ( $get_flag_choices['flag-sl'] ) ) {
256
+ $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>';
257
+ }
258
+
259
+ if ( isset ( $get_flag_choices['flag-es'] ) ) {
260
+ $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>';
261
+ }
262
+
263
+ if ( isset ( $get_flag_choices['flag-sw'] ) ) {
264
+ $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>';
265
+ }
266
+
267
+ if ( isset ( $get_flag_choices['flag-sv'] ) ) {
268
+ $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>';
269
+ }
270
+
271
+ if ( isset ( $get_flag_choices['flag-ta'] ) ) {
272
+ $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>';
273
+ }
274
+
275
+ if ( isset ( $get_flag_choices['flag-te'] ) ) {
276
+ $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>';
277
+ }
278
+
279
+ if ( isset ( $get_flag_choices['flag-th'] ) ) {
280
+ $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>';
281
+ }
282
+
283
+ if ( isset ( $get_flag_choices['flag-tr'] ) ) {
284
+ $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>';
285
+ }
286
+
287
+ if ( isset ( $get_flag_choices['flag-uk'] ) ) {
288
+ $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>';
289
+ }
290
+
291
+ if ( isset ( $get_flag_choices['flag-ur'] ) ) {
292
+ $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>';
293
+ }
294
+
295
+ if ( isset ( $get_flag_choices['flag-vi'] ) ) {
296
+ $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>';
297
+ }
298
+
299
+ if ( isset ( $get_flag_choices['flag-cy'] ) ) {
300
+ $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>';
301
+ }
302
+
303
+ if ( isset ( $get_flag_choices['flag-yi'] ) ) {
304
+ $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>';
305
+ }
306
+ $str.='</div>';
307
+
308
+ $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
309
+
310
+ if ($is_multilanguage == 1) {
311
+ $multilanguagePage = 'multilanguagePage:true,';
312
+
313
+ $str.='<script type="text/javascript">
314
+ function GoogleLanguageTranslatorInit() {
315
+ new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,'.$multilanguagePage . $language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
316
+ </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
317
+ <div id="google_language_translator"></div>';
318
+ return $str;
319
+ } elseif ($is_multilanguage == 0) {
320
+
321
+ $str.='<script type="text/javascript">
322
+ function GoogleLanguageTranslatorInit() {
323
+ new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\',layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,'.$language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
324
+ </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
325
+ <div id="google_language_translator"></div>';
326
+ return $str;
327
+ }
328
+
329
+ }
330
+ }
331
+ }
332
+ ?>
glt_scripts.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function scripts($hook_suffix) {
4
+ global $p;
5
+ if ($p == $hook_suffix) {
6
+ wp_enqueue_script( 'my-admin-script', plugins_url('/admin.js',__FILE__), array('jquery'));
7
+ wp_enqueue_script( 'my-flag-script', plugins_url('/flags.js',__FILE__), array('jquery'));
8
+ wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
9
+ wp_enqueue_style( 'style.css' );
10
+ }
11
+ }
12
+
13
+ function flags() {
14
+ wp_enqueue_script( 'flags', plugins_url('/flags.js',__FILE__), array('jquery'));
15
+ wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
16
+ wp_enqueue_style( 'style.css' );
17
+ }
18
+ add_action('init', 'flags');
19
+
20
+ function page_layout (){
21
+ global $p;
22
+
23
+ add_action( 'admin_enqueue_scripts', 'scripts');
24
+
25
+ $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', 'page_layout_cb');
26
+ }
27
+ add_action('admin_menu', 'page_layout');
28
+
29
+ ?>
glt_vertical.php ADDED
@@ -0,0 +1,335 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function googlelanguagetranslator_vertical(){
4
+ $is_active = get_option ( 'googlelanguagetranslator_active' );
5
+ $get_flag_choices = get_option ('flag_display_settings');
6
+ $language_choices = googlelanguagetranslator_included_languages();
7
+
8
+ if( $is_active == 1){
9
+
10
+ foreach ($get_flag_choices as $key) {
11
+ //print_r($key);
12
+
13
+ }
14
+ $str='<div id="flags">';
15
+
16
+
17
+
18
+ if ($key == '1') {
19
+ if ( isset ( $get_flag_choices['flag-af'] ) ) {
20
+ $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>';
21
+ }
22
+
23
+
24
+ if ( isset ( $get_flag_choices['flag-sq'] ) ) {
25
+ $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>';
26
+ }
27
+
28
+ if ( isset ( $get_flag_choices['flag-ar'] ) ) {
29
+ $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>';
30
+ }
31
+
32
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
33
+ $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>';
34
+ }
35
+
36
+ if ( isset ( $get_flag_choices['flag-az'] ) ) {
37
+ $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>';
38
+ }
39
+
40
+ if ( isset ( $get_flag_choices['flag-eu'] ) ) {
41
+ $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>';
42
+ }
43
+
44
+ if ( isset ( $get_flag_choices['flag-be'] ) ) {
45
+ $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>';
46
+ }
47
+
48
+ if ( isset ( $get_flag_choices['flag-bn'] ) ) {
49
+ $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>';
50
+ }
51
+
52
+ if ( isset ( $get_flag_choices['flag-bs'] ) ) {
53
+ $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>';
54
+ }
55
+
56
+ if ( isset ( $get_flag_choices['flag-bg'] ) ) {
57
+ $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>';
58
+ }
59
+
60
+ if ( isset ( $get_flag_choices['flag-ca'] ) ) {
61
+ $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>';
62
+ }
63
+
64
+ if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
65
+ $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>';
66
+ }
67
+
68
+ if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
69
+ $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>';
70
+ }
71
+
72
+ if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
73
+ $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>';
74
+ }
75
+
76
+ if ( isset ( $get_flag_choices['flag-cs'] ) ) {
77
+ $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>';
78
+ }
79
+
80
+ if ( isset ( $get_flag_choices['flag-hr'] ) ) {
81
+ $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>';
82
+ }
83
+
84
+ if ( isset ( $get_flag_choices['flag-da'] ) ) {
85
+ $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>';
86
+ }
87
+
88
+ if ( isset ( $get_flag_choices['flag-nl'] ) ) {
89
+ $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>';
90
+ }
91
+
92
+ if ( isset ( $get_flag_choices['flag-en'] ) ) {
93
+ $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>';
94
+ }
95
+
96
+ if ( isset ( $get_flag_choices['flag-eo'] ) ) {
97
+ $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>';
98
+ }
99
+
100
+ if ( isset ( $get_flag_choices['flag-et'] ) ) {
101
+ $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>';
102
+ }
103
+
104
+ if ( isset ( $get_flag_choices['flag-tl'] ) ) {
105
+ $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>';
106
+ }
107
+
108
+ if ( isset ( $get_flag_choices['flag-fi'] ) ) {
109
+ $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>';
110
+ }
111
+
112
+ if ( isset ( $get_flag_choices['flag-fr'] ) ) {
113
+ $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>';
114
+ }
115
+
116
+ if ( isset ( $get_flag_choices['flag-gl'] ) ) {
117
+ $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>';
118
+ }
119
+
120
+ if ( isset ( $get_flag_choices['flag-ka'] ) ) {
121
+ $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>';
122
+ }
123
+
124
+ if ( isset ( $get_flag_choices['flag-de'] ) ) {
125
+ $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>';
126
+ }
127
+
128
+ if ( isset ( $get_flag_choices['flag-el'] ) ) {
129
+ $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>';
130
+ }
131
+
132
+ if ( isset ( $get_flag_choices['flag-gu'] ) ) {
133
+ $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>';
134
+ }
135
+
136
+ if ( isset ( $get_flag_choices['flag-ht'] ) ) {
137
+ $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>';
138
+ }
139
+
140
+ if ( isset ( $get_flag_choices['flag-iw'] ) ) {
141
+ $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>';
142
+ }
143
+
144
+ if ( isset ( $get_flag_choices['flag-hi'] ) ) {
145
+ $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>';
146
+ }
147
+
148
+ if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
149
+ $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>';
150
+ }
151
+
152
+ if ( isset ( $get_flag_choices['flag-hu'] ) ) {
153
+ $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>';
154
+ }
155
+
156
+ if ( isset ( $get_flag_choices['flag-is'] ) ) {
157
+ $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>';
158
+ }
159
+
160
+ if ( isset ( $get_flag_choices['flag-id'] ) ) {
161
+ $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>';
162
+ }
163
+
164
+ if ( isset ( $get_flag_choices['flag-ga'] ) ) {
165
+ $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>';
166
+ }
167
+
168
+ if ( isset ( $get_flag_choices['flag-it'] ) ) {
169
+ $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>';
170
+ }
171
+
172
+ if ( isset ( $get_flag_choices['flag-ja'] ) ) {
173
+ $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>';
174
+ }
175
+
176
+ if ( isset ( $get_flag_choices['flag-jw'] ) ) {
177
+ $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>';
178
+ }
179
+
180
+ if ( isset ( $get_flag_choices['flag-kn'] ) ) {
181
+ $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>';
182
+ }
183
+
184
+ if ( isset ( $get_flag_choices['flag-km'] ) ) {
185
+ $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>';
186
+ }
187
+
188
+ if ( isset ( $get_flag_choices['flag-ko'] ) ) {
189
+ $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>';
190
+ }
191
+
192
+ if ( isset ( $get_flag_choices['flag-lo'] ) ) {
193
+ $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>';
194
+ }
195
+
196
+ if ( isset ( $get_flag_choices['flag-la'] ) ) {
197
+ $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>';
198
+ }
199
+
200
+ if ( isset ( $get_flag_choices['flag-lv'] ) ) {
201
+ $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>';
202
+ }
203
+
204
+ if ( isset ( $get_flag_choices['flag-lt'] ) ) {
205
+ $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>';
206
+ }
207
+
208
+ if ( isset ( $get_flag_choices['flag-mk'] ) ) {
209
+ $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>';
210
+ }
211
+
212
+ if ( isset ( $get_flag_choices['flag-ms'] ) ) {
213
+ $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>';
214
+ }
215
+
216
+ if ( isset ( $get_flag_choices['flag-mt'] ) ) {
217
+ $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>';
218
+ }
219
+
220
+ if ( isset ( $get_flag_choices['flag-mr'] ) ) {
221
+ $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>';
222
+ }
223
+
224
+ if ( isset ( $get_flag_choices['flag-no'] ) ) {
225
+ $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>';
226
+ }
227
+
228
+ if ( isset ( $get_flag_choices['flag-fa'] ) ) {
229
+ $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>';
230
+ }
231
+
232
+ if ( isset ( $get_flag_choices['flag-pl'] ) ) {
233
+ $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>';
234
+ }
235
+
236
+ if ( isset ( $get_flag_choices['flag-pt'] ) ) {
237
+ $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>';
238
+ }
239
+
240
+ if ( isset ( $get_flag_choices['flag-ro'] ) ) {
241
+ $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>';
242
+ }
243
+
244
+ if ( isset ( $get_flag_choices['flag-ru'] ) ) {
245
+ $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>';
246
+ }
247
+
248
+ if ( isset ( $get_flag_choices['flag-sr'] ) ) {
249
+ $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>';
250
+ }
251
+
252
+ if ( isset ( $get_flag_choices['flag-sk'] ) ) {
253
+ $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>';
254
+ }
255
+
256
+ if ( isset ( $get_flag_choices['flag-sl'] ) ) {
257
+ $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>';
258
+ }
259
+
260
+ if ( isset ( $get_flag_choices['flag-es'] ) ) {
261
+ $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>';
262
+ }
263
+
264
+ if ( isset ( $get_flag_choices['flag-sw'] ) ) {
265
+ $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>';
266
+ }
267
+
268
+ if ( isset ( $get_flag_choices['flag-sv'] ) ) {
269
+ $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>';
270
+ }
271
+
272
+ if ( isset ( $get_flag_choices['flag-ta'] ) ) {
273
+ $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>';
274
+ }
275
+
276
+ if ( isset ( $get_flag_choices['flag-te'] ) ) {
277
+ $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>';
278
+ }
279
+
280
+ if ( isset ( $get_flag_choices['flag-th'] ) ) {
281
+ $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>';
282
+ }
283
+
284
+ if ( isset ( $get_flag_choices['flag-tr'] ) ) {
285
+ $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>';
286
+ }
287
+
288
+ if ( isset ( $get_flag_choices['flag-uk'] ) ) {
289
+ $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>';
290
+ }
291
+
292
+ if ( isset ( $get_flag_choices['flag-ur'] ) ) {
293
+ $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>';
294
+ }
295
+
296
+ if ( isset ( $get_flag_choices['flag-vi'] ) ) {
297
+ $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>';
298
+ }
299
+
300
+ if ( isset ( $get_flag_choices['flag-cy'] ) ) {
301
+ $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>';
302
+ }
303
+
304
+ if ( isset ( $get_flag_choices['flag-yi'] ) ) {
305
+ $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>';
306
+ }
307
+
308
+
309
+ $str.='</div>';
310
+
311
+ $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
312
+
313
+ if ($is_multilanguage == 1) {
314
+ $multilanguagePage = 'multilanguagePage:true,';
315
+
316
+ $str.='<script type="text/javascript">
317
+ function GoogleLanguageTranslatorInit() {
318
+ new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\','.$multilanguagePage . $language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
319
+ </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
320
+ <div id="google_language_translator"></div>';
321
+ return $str;
322
+ } elseif ($is_multilanguage == 0) {
323
+
324
+ $str.='<script type="text/javascript">
325
+ function GoogleLanguageTranslatorInit() {
326
+ new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\','.$language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
327
+ </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
328
+ <div id="google_language_translator"></div>';
329
+ return $str;
330
+ }
331
+
332
+ }
333
+ }
334
+ }
335
+ ?>
widget.php → glt_widget.php RENAMED
@@ -13,8 +13,13 @@ array( 'description' => __( 'Go to Settings > Google Language Translator to conf
13
  }
14
 
15
  public function widget( $args, $instance ) {
 
 
 
16
  extract( $args );
17
- $title = apply_filters( 'widget_title', $instance['title'] );
 
 
18
 
19
  echo $before_widget;
20
  echo google_translator_shortcode();
13
  }
14
 
15
  public function widget( $args, $instance ) {
16
+
17
+ $title = null;
18
+
19
  extract( $args );
20
+
21
+ if (! empty( $instance['title'] ) ) { $title = apply_filters('widget_title', $instance['title'] ); }
22
+
23
 
24
  echo $before_widget;
25
  echo google_translator_shortcode();
google-language-translator.php CHANGED
@@ -1,2304 +1,1425 @@
1
- <?php
2
- /*
3
- Plugin Name: Google Language Translator
4
- Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 3.0.2
6
- Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
- Author: Rob Myrick
8
- Author URI: http://www.studio88design.com/
9
- */
10
-
11
- 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
- add_option('googlelanguagetranslator_manage_translations',0);
29
- add_option('googlelanguagetranslator_multilanguage',0);
30
- }
31
-
32
- include( plugin_dir_path( __FILE__ ) . 'widget.php');
33
-
34
- function scripts($hook_suffix) {
35
- global $p;
36
- if ($p == $hook_suffix) {
37
- wp_enqueue_script( 'my-admin-script', plugins_url('/admin.js',__FILE__), array('jquery'));
38
- wp_enqueue_script( 'my-flag-script', plugins_url('/flags.js',__FILE__), array('jquery'));
39
- wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
40
- wp_enqueue_style( 'style.css' );
41
- }
42
- }
43
-
44
- function flags() {
45
- wp_enqueue_script( 'flags', plugins_url('/flags.js',__FILE__), array('jquery'));
46
- wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
47
- wp_enqueue_style( 'style.css' );
48
- }
49
- add_action('init', 'flags');
50
-
51
- function page_layout (){
52
- global $p;
53
-
54
- add_action( 'admin_enqueue_scripts', 'scripts');
55
-
56
- $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', 'page_layout_cb');
57
- }
58
- add_action('admin_menu', 'page_layout');
59
-
60
- function google_translator_shortcode() {
61
- if (get_option('googlelanguagetranslator_display')=='Vertical'){
62
- return googlelanguagetranslator_vertical();
63
- }
64
-
65
- elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
66
- return googlelanguagetranslator_horizontal();
67
- }
68
-
69
- }
70
-
71
- function load_css_overrides() { ?>
72
- <style type="text/css">
73
- <?php echo get_option("googlelanguagetranslator_css"); ?>
74
- </style>
75
- <?php
76
- }
77
-
78
- add_action('wp_head','load_css_overrides');
79
- add_action('admin_head','load_css_overrides');
80
-
81
-
82
- if (get_option('googlelanguagetranslator_toolbar')=='Yes') {
83
- add_action ('wp_head','googlelanguagetranslator_toolbar_yes');
84
- add_action ('admin_head','googlelanguagetranslator_toolbar_yes');
85
- }
86
-
87
- elseif(get_option('googlelanguagetranslator_toolbar')=='No'){
88
- add_action ('wp_head','googlelanguagetranslator_toolbar_no');
89
- add_action ('admin_head','googlelanguagetranslator_toolbar_no');
90
- }
91
-
92
- if (get_option('googlelanguagetranslator_showbranding')=='Yes') {
93
- add_action ('wp_head','googlelanguagetranslator_showbranding_yes');
94
- add_action ('admin_head','googlelanguagetranslator_showbranding_yes');
95
- }
96
-
97
- elseif(get_option('googlelanguagetranslator_showbranding')=='No') {
98
- add_action ('wp_head','googlelanguagetranslator_showbranding_no');
99
- add_action ('admin_head','googlelanguagetranslator_showbranding_no');
100
- }
101
-
102
- if (get_option('googlelanguagetranslator_translatebox') == 'no') {
103
- add_action ('wp_head', 'googlelanguagetranslator_translatebox');
104
- add_action ('admin_head', 'googlelanguagetranslator_translatebox');
105
- }
106
-
107
- if (get_option('googlelanguagetranslator_flags') == 'hide_flags') {
108
- add_action ('wp_head','googlelanguagetranslator_flags');
109
- add_action ('admin_head','googlelanguagetranslator_flags');
110
- }
111
-
112
- if (get_option('googlelanguagetranslator_flags') == 'show_flags') {
113
- add_action ('wp_head','googlelanguagetranslator_flags_display');
114
- add_action ('admin_head','googlelanguagetranslator_flags_display');
115
- }
116
-
117
- if (get_option('googlelanguagetranslator_manage_translations') == 0) {
118
- add_action ('wp_head','googlelanguagetranslator_manage_translations_no');
119
- add_action ('admin_head','googlelanguagetranslator_manage_translations_no');
120
- }
121
- add_shortcode( 'google-translator', 'google_translator_shortcode');
122
-
123
- add_filter('widget_text', 'do_shortcode');
124
-
125
- function page_layout_cb() { ?>
126
- <div class="wrap">
127
- <div id="icon-options-general" class="icon32"></div>
128
- <h2><span class="notranslate">Google Language Translator</span></h2>
129
- <form action="<?php echo admin_url('options.php'); ?>" method="post">
130
- <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
131
- <div class="postbox" style="width: 100%">
132
- <h3 class="notranslate">Settings</h3>
133
-
134
- <?php settings_fields('google_language_translator'); ?>
135
- <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
136
- <tr>
137
- <td style="width:60%" class="notranslate">Plugin Status:</td>
138
- <td class="notranslate"><?php googlelanguagetranslator_active_cb(); ?></td>
139
- </tr>
140
-
141
- <tr class="notranslate">
142
- <td>Choose the original language of your website</td>
143
- <td><?php googlelanguagetranslator_language_cb(); ?></td>
144
- </tr>
145
-
146
- <tr class="notranslate">
147
- <td>What translation languages will you display to website visitors?<br/>(Note: To show flags you must choose "All Languages")</td>
148
- <td><?php googlelanguagetranslator_language_option_cb(); ?></td>
149
- </tr>
150
-
151
- <tr class="notranslate">
152
- <td colspan="2"><?php language_display_settings_cb(); ?></td>
153
- </tr>
154
-
155
- <tr class="notranslate">
156
- <td class="choose_flags_intro">Show flag images?<br/>(Display up to 72 flags above the translator)</td>
157
- <td class="choose_flags_intro"><?php googlelanguagetranslator_flags_cb(); ?></td>
158
- </tr>
159
-
160
- <tr class="notranslate">
161
- <td class="choose_flags">Choose the flags you want to display:</td>
162
- <td></td>
163
- </tr>
164
-
165
- <tr class="notranslate">
166
- <td colspan="2" class="choose_flags"><?php flag_display_settings_cb(); ?></td>
167
- </tr>
168
-
169
- <tr class="notranslate">
170
- <td>Show translate box?</td>
171
- <td><?php googlelanguagetranslator_translatebox_cb(); ?></td>
172
- </tr>
173
-
174
- <tr class="notranslate">
175
- <td>Layout options:</td>
176
- <td><?php googlelanguagetranslator_display_cb(); ?></td>
177
- </tr>
178
-
179
- <tr class="notranslate">
180
- <td>Show Google Toolbar?</td>
181
- <td><?php googlelanguagetranslator_toolbar_cb(); ?></td>
182
- </tr>
183
-
184
- <tr class="notranslate">
185
- <td>Show Google Branding?<br/>
186
- <span>(<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a> about Google's Attribution Requirements.)</span>
187
- </td>
188
- <td><?php googlelanguagetranslator_showbranding_cb(); ?></td>
189
- </tr>
190
-
191
- <tr class="alignment notranslate">
192
- <td class="flagdisplay">Align the translator left or right?</td>
193
- <td class="flagdisplay"><?php googlelanguagetranslator_flags_alignment_cb(); ?></td>
194
- </tr>
195
-
196
- <tr class="manage_translations notranslate">
197
- <td>Turn on translation management?<br/>(Managed directly through your Google account. Requires <a href="http://translate.google.com/manager/website/settings" target="_blank">Google Translate</a> meta tag installed in header.)</td>
198
- <td><?php googlelanguagetranslator_manage_translations_cb(); ?></td>
199
- </tr>
200
-
201
- <tr class="multilanguage notranslate">
202
- <td>Multilanguage Page Option?: (<em>not recommended)</em><br/>(If checked, a "forced" translation of your webpage will be served when returned to the default language, instead of delivering original content.)</td>
203
- <td><?php googlelanguagetranslator_multilanguage_cb(); ?></td>
204
- </tr>
205
-
206
- <tr class="notranslate">
207
- <td>Google Analytics:</td>
208
- <td><?php googlelanguagetranslator_analytics_cb(); ?></td>
209
- </tr>
210
-
211
- <tr class="analytics notranslate">
212
- <td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
213
- <td><?php googlelanguagetranslator_analytics_id_cb(); ?></td>
214
- </tr>
215
-
216
- <tr class="notranslate">
217
- <td>Copy/Paste this shortcode if adding to pages/posts:</td>
218
- <td>[google-translator]</td>
219
- </tr>
220
- </table>
221
-
222
- <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
223
- <tr class="notranslate">
224
- <td>Copy/Paste this code if adding to header/footer:</td>
225
- <td>&lt?php echo do_shortcode('[google-translator]'); ?&gt</td>
226
- </tr>
227
-
228
- <tr class="notranslate">
229
- <td><?php submit_button(); ?></td>
230
- <td></td>
231
- </tr>
232
- </table>
233
-
234
- </div> <!-- .postbox -->
235
- </div> <!-- .metbox-holder -->
236
-
237
- <div class="metabox-holder" style="float:right; clear:right; width:33%">
238
- <div class="postbox">
239
- <h3 class="notranslate">Preview</h3>
240
- <table style="width:100%">
241
- <tr>
242
- <td style="height:80px; box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span> &nbsp; <span>Hello</span></p></td>
243
- </tr>
244
- </table>
245
- </div> <!-- .postbox -->
246
- </div> <!-- .metabox-holder -->
247
-
248
-
249
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
250
- <div class="postbox">
251
- <h3>Add CSS Styles</h3>
252
- <div class="inside">
253
- <p>You can apply any necessary CSS styles below:</p>
254
- <?php googlelanguagetranslator_css_cb(); ?>
255
- </div>
256
- </div>
257
- </div>
258
- </form>
259
-
260
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
261
- <div class="postbox">
262
- <h3>GLT Premium is Here! $12</h3>
263
- <div class="inside"><a href="http://www.wp-studio.net/" target="_blank"><img style="background:#444; border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px" src="<?php echo plugins_url('google-language-translator/images/logo.png'); ?>"></a><br />
264
- <ul id="features">
265
- <li>Get more design and functionality options</li>
266
- <li>Loads directly with page content, not afterward</li>
267
- <li>jQuery-powered "Elegant" theme to engage your visitors</li>
268
- <li>Manage your website's translations</li>
269
- <li>Show or hide any features you want</li>
270
- <li>Full access to our support forum</li>
271
- <li>Full access to future updates, for life of the plugin</li>
272
- </ul>
273
- </div>
274
- </div>
275
- </div>
276
-
277
- <div class="metabox-holder notranslate" style="float: right; width: 33%;">
278
- <div class="postbox">
279
- <h3>Please Consider A Donation</h3>
280
- <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 />
281
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
282
- <input type="hidden" name="cmd" value="_donations">
283
- <input type="hidden" name="business" value="robertmyrick@hotmail.com">
284
- <input type="hidden" name="lc" value="US">
285
- <input type="hidden" name="item_name" value="Support Studio 88 Design and help us bring you more Wordpress goodies! Any donation is kindly appreciated. Thank you!">
286
- <input type="hidden" name="no_note" value="0">
287
- <input type="hidden" name="currency_code" value="USD">
288
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
289
- <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
290
- <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
291
- </form>
292
-
293
- <br />
294
- <br />
295
- </div>
296
- </div>
297
- </div>
298
- </div> <!-- .wrap -->
299
- <?php
300
- }
301
-
302
-
303
- /* ------------------------------------------------------------------------ *
304
- * Setting Registration
305
- * ------------------------------------------------------------------------ */
306
-
307
-
308
- function initialize_settings() {
309
-
310
- // First, we register a section. This is necessary since all future options must belong to one.
311
- add_settings_section(
312
- 'glt_settings', // ID used to identify this section and with which to register options
313
- 'Settings', // Title to be displayed on the administration page
314
- '', // Callback used to render the description of the section
315
- 'google_language_translator' // Page on which to add this section of options
316
- );
317
-
318
-
319
-
320
-
321
-
322
- //Fieldset 1
323
- add_settings_field( 'googlelanguagetranslator_active','Plugin status:','googlelanguagetranslator_active_cb','google_language_translator','glt_settings');
324
- add_settings_field( 'googlelanguagetranslator_language','Choose the original language of your website','','googlelanguagetranslator_language_cb','glt_settings');
325
- add_settings_field( 'googlelanguagetranslator_language_option','What translation languages will you display to website visitors?','googlelanguagetranslator_language_option_cb','google_language_translator','glt_settings');
326
- add_settings_field( 'language_display_settings','Your language choices','language_display_settings_cb','google_language_translator','glt_settings');
327
- add_settings_field( 'googlelanguagetranslator_flags','Show Flag Images?','googlelanguagetranslator_flags_cb','google_language_translator','glt_settings');
328
- add_settings_field( 'flag_display_settings','Flag Options','flag_display_settings_cb','google_language_translator','glt_settings');
329
- add_settings_field( 'googlelanguagetranslator_translatebox','Show Translate Box?','googlelanguagetranslator_translatebox_cb','google_language_translator','glt_settings');
330
- add_settings_field( 'googlelanguagetranslator_display', 'Layout Options','googlelanguagetranslator_display_cb','google_language_translator','glt_settings');
331
- add_settings_field( 'googlelanguagetranslator_toolbar', 'Show Toolbar','googlelanguagetranslator_toolbar_cb','google_language_translator','glt_settings');
332
- add_settings_field( 'googlelanguagetranslator_showbranding', 'Show Google Branding','googlelanguagetranslator_showbranding_cb','google_language_translator','glt_settings');
333
- add_settings_field( 'googlelanguagetranslator_flags_alignment', 'Align Flags Right or Left', 'googlelanguagetranslator_flags_alignment_cb','google_language_translator','glt_settings');
334
- add_settings_field( 'googlelanguagetranslator_analytics','Activate Google Analytics tracking?','googlelanguagetranslator_analytics_cb','google_language_translator','glt_settings');
335
- add_settings_field( 'googlelanguagetranslator_analytics_id','Enter your Google Analytics ID','googlelanguagetranslator_analytics_id_cb','google_language_translator','glt_settings');
336
- add_settings_field( 'googlelanguagetranslator_css','Custom CSS Overrides','googlelanguagetranslator_css_cb','google_language_translator','glt_settings');
337
- add_settings_field( 'googlelanguagetranslator_manage_translations','Turn on translation management?','googlelanguagetranslator_manage_translations_cb','google_language_translator','glt_settings');
338
- add_settings_field( 'googlelanguagetranslator_multilanguage','Multilanguage webpages?','googlelanguagetranslator_multilanguage_cb','google_language_translator','glt_settings');
339
-
340
-
341
-
342
- //Register Fieldset 1
343
- register_setting( 'google_language_translator','googlelanguagetranslator_active');
344
- register_setting( 'google_language_translator','googlelanguagetranslator_language');
345
- register_setting( 'google_language_translator','googlelanguagetranslator_language_option');
346
- register_setting( 'google_language_translator','language_display_settings');
347
- register_setting( 'google_language_translator','googlelanguagetranslator_flags');
348
- register_setting( 'google_language_translator','flag_display_settings');
349
- register_setting( 'google_language_translator','googlelanguagetranslator_translatebox');
350
- register_setting( 'google_language_translator','googlelanguagetranslator_display');
351
- register_setting( 'google_language_translator','googlelanguagetranslator_toolbar');
352
- register_setting( 'google_language_translator','googlelanguagetranslator_showbranding');
353
- register_setting( 'google_language_translator','googlelanguagetranslator_flags_alignment');
354
- register_setting( 'google_language_translator','googlelanguagetranslator_disable_mootools');
355
- register_setting( 'google_language_translator','googlelanguagetranslator_disable_modal');
356
- register_setting( 'google_language_translator','googlelanguagetranslator_analytics');
357
- register_setting( 'google_language_translator','googlelanguagetranslator_analytics_id');
358
- register_setting( 'google_language_translator','googlelanguagetranslator_css');
359
- register_setting( 'google_language_translator','googlelanguagetranslator_manage_translations');
360
- register_setting( 'google_language_translator','googlelanguagetranslator_multilanguage');
361
-
362
- function googlelanguagetranslator_active_cb() {
363
-
364
- $option_name = 'googlelanguagetranslator_active' ;
365
- $new_value = 1;
366
-
367
- if ( get_option( $option_name ) === false ) {
368
-
369
- // The option does not exist, so we update it.
370
- update_option( $option_name, $new_value );
371
- }
372
-
373
- $options = get_option (''.$option_name.'');
374
-
375
- $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Language Translator?';
376
- echo $html;
377
- }
378
-
379
- function googlelanguagetranslator_language_cb() {
380
-
381
- $option_name = 'googlelanguagetranslator_language';
382
- $new_value = 'en';
383
-
384
- if ( get_option( $option_name ) === false ) {
385
-
386
- // The option does not exist, so we update it.
387
- update_option( $option_name, $new_value );
388
- }
389
-
390
- $options = get_option (''.$option_name.''); ?>
391
- <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
392
- <option value="af" <?php if($options=='af'){echo "selected";}?>>Afrikaans</option>
393
- <option value="sq" <?php if($options=='sq'){echo "selected";}?>>Albanian</option>
394
- <option value="ar" <?php if($options=='ar'){echo "selected";}?>>Arabic</option>
395
- <option value="hy" <?php if($options=='hy'){echo "selected";}?>>Armenian</option>
396
- <option value="az" <?php if($options=='az'){echo "selected";}?>>Azerbaijani</option>
397
- <option value="eu" <?php if($options=='eu'){echo "selected";}?>>Basque</option>
398
- <option value="be" <?php if($options=='be'){echo "selected";}?>>Belarusian</option>
399
- <option value="bn" <?php if($options=='bn'){echo "selected";}?>>Bengali</option>
400
- <option value="bs" <?php if($options=='bs'){echo "selected";}?>>Bosnian</option>
401
- <option value="bg" <?php if($options=='bg'){echo "selected";}?>>Bulgarian</option>
402
- <option value="ca" <?php if($options=='ca'){echo "selected";}?>>Catalan</option>
403
- <option value="ceb" <?php if($options=='ceb'){echo "selected";}?>>Cebuano</option>
404
- <option value="zh-CN" <?php if($options=='zh-CN'){echo "selected";}?>>Chinese</option>
405
- <option value="zh-TW" <?php if($options=='zh-TW'){echo "selected";}?>>Chinese (Han)</option>
406
- <option value="hr" <?php if($options=='hr'){echo "selected";}?>>Croatian</option>
407
- <option value="cs" <?php if($options=='cs'){echo "selected";}?>>Czech</option>
408
- <option value="da" <?php if($options=='da'){echo "selected";}?>>Danish</option>
409
- <option value="nl" <?php if($options=='nl'){echo "selected";}?>>Dutch</option>
410
- <option value="en" <?php if($options=='en'){echo "selected";}?>>English</option>
411
- <option value="eo" <?php if($options=='eo'){echo "selected";}?>>Esperanto</option>
412
- <option value="et" <?php if($options=='et'){echo "selected";}?>>Estonian</option>
413
- <option value="tl" <?php if($options=='tl'){echo "selected";}?>>Filipino</option>
414
- <option value="fi" <?php if($options=='fi'){echo "selected";}?>>Finnish</option>
415
- <option value="fr" <?php if($options=='fr'){echo "selected";}?>>French</option>
416
- <option value="gl" <?php if($options=='gl'){echo "selected";}?>>Galician</option>
417
- <option value="ka" <?php if($options=='ka'){echo "selected";}?>>Georgian</option>
418
- <option value="de" <?php if($options=='de'){echo "selected";}?>>German</option>
419
- <option value="el" <?php if($options=='el'){echo "selected";}?>>Greek</option>
420
- <option value="gu" <?php if($options=='gu'){echo "selected";}?>>Gujarati</option>
421
- <option value="ht" <?php if($options=='ht'){echo "selected";}?>>Haitian</option>
422
- <option value="iw" <?php if($options=='iw'){echo "selected";}?>>Hebrew</option>
423
- <option value="hi" <?php if($options=='hi'){echo "selected";}?>>Hindi</option>
424
- <option value="hmn" <?php if($options=='hmn'){echo "selected";}?>>Hmong</option>
425
- <option value="hu" <?php if($options=='hu'){echo "selected";}?>>Hungarian</option>
426
- <option value="is" <?php if($options=='is'){echo "selected";}?>>Icelandic</option>
427
- <option value="id" <?php if($options=='id'){echo "selected";}?>>Indonesian</option>
428
- <option value="ga" <?php if($options=='ga'){echo "selected";}?>>Irish</option>
429
- <option value="it" <?php if($options=='it'){echo "selected";}?>>Italian</option>
430
- <option value="ja" <?php if($options=='ja'){echo "selected";}?>>Japanese</option>
431
- <option value="jw" <?php if($options=='jw'){echo "selected";}?>>Javanese</option>
432
- <option value="kn" <?php if($options=='kn'){echo "selected";}?>>Kannada</option>
433
- <option value="km" <?php if($options=='km'){echo "selected";}?>>Khmer</option>
434
- <option value="ko" <?php if($options=='ko'){echo "selected";}?>>Korean</option>
435
- <option value="lo" <?php if($options=='lo'){echo "selected";}?>>Lao</option>
436
- <option value="la" <?php if($options=='la'){echo "selected";}?>>Latin</option>
437
- <option value="lv" <?php if($options=='lv'){echo "selected";}?>>Latvian</option>
438
- <option value="lt" <?php if($options=='lt'){echo "selected";}?>>Lithuanian</option>
439
- <option value="mk" <?php if($options=='mk'){echo "selected";}?>>Macedonian</option>
440
- <option value="ms" <?php if($options=='ms'){echo "selected";}?>>Malay</option>
441
- <option value="mt" <?php if($options=='mt'){echo "selected";}?>>Maltese</option>
442
- <option value="mr" <?php if($options=='mr'){echo "selected";}?>>Marathi</option>
443
- <option value="no" <?php if($options=='no'){echo "selected";}?>>Norwegian</option>
444
- <option value="fa" <?php if($options=='fa'){echo "selected";}?>>Persian</option>
445
- <option value="pl" <?php if($options=='pl'){echo "selected";}?>>Polish</option>
446
- <option value="pt" <?php if($options=='pt'){echo "selected";}?>>Portuguese</option>
447
- <option value="ro" <?php if($options=='ro'){echo "selected";}?>>Romanian</option>
448
- <option value="ru" <?php if($options=='ru'){echo "selected";}?>>Russian</option>
449
- <option value="sr" <?php if($options=='sr'){echo "selected";}?>>Serbian</option>
450
- <option value="sk" <?php if($options=='sk'){echo "selected";}?>>Slovak</option>
451
- <option value="sl" <?php if($options=='sl'){echo "selected";}?>>Slovenian</option>
452
- <option value="es" <?php if($options=='es'){echo "selected";}?>>Spanish</option>
453
- <option value="sw" <?php if($options=='sw'){echo "selected";}?>>Swahili</option>
454
- <option value="sv" <?php if($options=='sv'){echo "selected";}?>>Swedish</option>
455
- <option value="ta" <?php if($options=='ta'){echo "selected";}?>>Tamil</option>
456
- <option value="te" <?php if($options=='te'){echo "selected";}?>>Telugu</option>
457
- <option value="th" <?php if($options=='th'){echo "selected";}?>>Thai</option>
458
- <option value="tr" <?php if($options=='tr'){echo "selected";}?>>Turkish</option>
459
- <option value="uk" <?php if($options=='uk'){echo "selected";}?>>Ukranian</option>
460
- <option value="ur" <?php if($options=='ur'){echo "selected";}?>>Urdu</option>
461
- <option value="vi" <?php if($options=='vi'){echo "selected";}?>>Vietnamese</option>
462
- <option value="cy" <?php if($options=='cy'){echo "selected";}?>>Welsh</option>
463
- <option value="yi" <?php if($options=='yi'){echo "selected";}?>>Yiddish</option>
464
- </select>
465
- <?php
466
-
467
- }
468
-
469
- function googlelanguagetranslator_language_option_cb() {
470
-
471
- $option_name = 'googlelanguagetranslator_language_option' ;
472
- $new_value = 'all';
473
-
474
- if ( get_option( $option_name ) === false ) {
475
-
476
- // The option does not exist, so we update it.
477
- update_option( $option_name, $new_value );
478
- }
479
-
480
- $options = get_option (''.$option_name.''); ?>
481
-
482
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
483
- <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
484
- <?php }
485
-
486
-
487
-
488
- function language_display_settings_cb() {
489
- $defaults = array (
490
- 'en' => 1
491
- );
492
-
493
- $option_name = 'language_display_settings' ;
494
- $new_value = $defaults;
495
-
496
- if ( get_option( $option_name ) === false ) {
497
-
498
- // The option does not exist, so we update it.
499
- update_option( $option_name, $new_value );
500
- }
501
-
502
- $get_language_choices = get_option (''.$option_name.'');
503
-
504
- if (!isset ( $get_language_choices ['af'] ) ) {
505
- $get_language_choices['af'] = 0;
506
- }
507
-
508
- if (!isset ( $get_language_choices ['sq'] ) ) {
509
- $get_language_choices['sq'] = 0;
510
- }
511
-
512
- if (!isset ( $get_language_choices ['ar'] ) ) {
513
- $get_language_choices['ar'] = 0;
514
- }
515
-
516
- if (!isset ( $get_language_choices ['hy'] ) ) {
517
- $get_language_choices['hy'] = 0;
518
- }
519
-
520
- if (!isset ( $get_language_choices ['az'] ) ) {
521
- $get_language_choices['az'] = 0;
522
- }
523
-
524
- if (!isset ( $get_language_choices ['eu'] ) ) {
525
- $get_language_choices['eu'] = 0;
526
- }
527
-
528
- if (!isset ( $get_language_choices ['be'] ) ) {
529
- $get_language_choices['be'] = 0;
530
- }
531
-
532
- if (!isset ( $get_language_choices ['bn'] ) ) {
533
- $get_language_choices['bn'] = 0;
534
- }
535
-
536
- if (!isset ( $get_language_choices ['bs'] ) ) {
537
- $get_language_choices['bs'] = 0;
538
- }
539
-
540
- if (!isset ( $get_language_choices ['bg'] ) ) {
541
- $get_language_choices['bg'] = 0;
542
- }
543
-
544
- if (!isset ( $get_language_choices ['ca'] ) ) {
545
- $get_language_choices['ca'] = 0;
546
- }
547
-
548
- if (!isset ( $get_language_choices ['ceb'] ) ) {
549
- $get_language_choices['ceb'] = 0;
550
- }
551
-
552
- if (!isset ( $get_language_choices ['zh-CN'] ) ) {
553
- $get_language_choices['zh-CN'] = 0;
554
- }
555
-
556
- if (!isset ( $get_language_choices ['zh-TW'] ) ) {
557
- $get_language_choices['zh-TW'] = 0;
558
- }
559
-
560
- if (!isset ( $get_language_choices ['hr'] ) ) {
561
- $get_language_choices['hr'] = 0;
562
- }
563
-
564
- if (!isset ( $get_language_choices ['cs'] ) ) {
565
- $get_language_choices['cs'] = 0;
566
- }
567
-
568
- if (!isset ( $get_language_choices ['da'] ) ) {
569
- $get_language_choices['da'] = 0;
570
- }
571
-
572
- if (!isset ( $get_language_choices ['nl'] ) ) {
573
- $get_language_choices['nl'] = 0;
574
- }
575
-
576
- if (!isset ( $get_language_choices ['en'] ) ) {
577
- $get_language_choices['en'] = 1;
578
- }
579
-
580
- if (!isset ( $get_language_choices ['eo'] ) ) {
581
- $get_language_choices['eo'] = 0;
582
- }
583
-
584
- if (!isset ( $get_language_choices ['et'] ) ) {
585
- $get_language_choices['et'] = 0;
586
- }
587
-
588
- if (!isset ( $get_language_choices ['tl'] ) ) {
589
- $get_language_choices['tl'] = 0;
590
- }
591
-
592
- if (!isset ( $get_language_choices ['fi'] ) ) {
593
- $get_language_choices['fi'] = 0;
594
- }
595
-
596
- if (!isset ( $get_language_choices ['fr'] ) ) {
597
- $get_language_choices['fr'] = 0;
598
- }
599
-
600
- if (!isset ( $get_language_choices ['gl'] ) ) {
601
- $get_language_choices['gl'] = 0;
602
- }
603
-
604
- if (!isset ( $get_language_choices ['ka'] ) ) {
605
- $get_language_choices['ka'] = 0;
606
- }
607
-
608
- if (!isset ( $get_language_choices ['de'] ) ) {
609
- $get_language_choices['de'] = 0;
610
- }
611
-
612
- if (!isset ( $get_language_choices ['el'] ) ) {
613
- $get_language_choices['el'] = 0;
614
- }
615
-
616
- if (!isset ( $get_language_choices ['gu'] ) ) {
617
- $get_language_choices['gu'] = 0;
618
- }
619
-
620
- if (!isset ( $get_language_choices ['ht'] ) ) {
621
- $get_language_choices['ht'] = 0;
622
- }
623
-
624
- if (!isset ( $get_language_choices ['iw'] ) ) {
625
- $get_language_choices['iw'] = 0;
626
- }
627
-
628
- if (!isset ( $get_language_choices ['hi'] ) ) {
629
- $get_language_choices['hi'] = 0;
630
- }
631
-
632
- if (!isset ( $get_language_choices ['hmn'] ) ) {
633
- $get_language_choices['hmn'] = 0;
634
- }
635
-
636
- if (!isset ( $get_language_choices ['hu'] ) ) {
637
- $get_language_choices['hu'] = 0;
638
- }
639
-
640
- if (!isset ( $get_language_choices ['is'] ) ) {
641
- $get_language_choices['is'] = 0;
642
- }
643
-
644
- if (!isset ( $get_language_choices ['id'] ) ) {
645
- $get_language_choices['id'] = 0;
646
- }
647
-
648
- if (!isset ( $get_language_choices ['ga'] ) ) {
649
- $get_language_choices['ga'] = 0;
650
- }
651
-
652
- if (!isset ( $get_language_choices ['it'] ) ) {
653
- $get_language_choices['it'] = 0;
654
- }
655
-
656
- if (!isset ( $get_language_choices ['ja'] ) ) {
657
- $get_language_choices['ja'] = 0;
658
- }
659
-
660
- if (!isset ( $get_language_choices ['jw'] ) ) {
661
- $get_language_choices['jw'] = 0;
662
- }
663
-
664
- if (!isset ( $get_language_choices ['kn'] ) ) {
665
- $get_language_choices['kn'] = 0;
666
- }
667
-
668
- if (!isset ( $get_language_choices ['km'] ) ) {
669
- $get_language_choices['km'] = 0;
670
- }
671
-
672
- if (!isset ( $get_language_choices ['ko'] ) ) {
673
- $get_language_choices['ko'] = 0;
674
- }
675
-
676
- if (!isset ( $get_language_choices ['lo'] ) ) {
677
- $get_language_choices['lo'] = 0;
678
- }
679
-
680
- if (!isset ( $get_language_choices ['la'] ) ) {
681
- $get_language_choices['la'] = 0;
682
- }
683
-
684
- if (!isset ( $get_language_choices ['lv'] ) ) {
685
- $get_language_choices['lv'] = 0;
686
- }
687
-
688
- if (!isset ( $get_language_choices ['lt'] ) ) {
689
- $get_language_choices['lt'] = 0;
690
- }
691
-
692
- if (!isset ( $get_language_choices ['mk'] ) ) {
693
- $get_language_choices['mk'] = 0;
694
- }
695
-
696
- if (!isset ( $get_language_choices ['ms'] ) ) {
697
- $get_language_choices['ms'] = 0;
698
- }
699
-
700
- if (!isset ( $get_language_choices ['mt'] ) ) {
701
- $get_language_choices['mt'] = 0;
702
- }
703
-
704
- if (!isset ( $get_language_choices ['mr'] ) ) {
705
- $get_language_choices['mr'] = 0;
706
- }
707
-
708
- if (!isset ( $get_language_choices ['no'] ) ) {
709
- $get_language_choices['no'] = 0;
710
- }
711
-
712
- if (!isset ( $get_language_choices ['fa'] ) ) {
713
- $get_language_choices['fa'] = 0;
714
- }
715
-
716
- if (!isset ( $get_language_choices ['pl'] ) ) {
717
- $get_language_choices['pl'] = 0;
718
- }
719
-
720
- if (!isset ( $get_language_choices ['pt'] ) ) {
721
- $get_language_choices['pt'] = 0;
722
- }
723
-
724
- if (!isset ( $get_language_choices ['ro'] ) ) {
725
- $get_language_choices['ro'] = 0;
726
- }
727
-
728
- if (!isset ( $get_language_choices ['ru'] ) ) {
729
- $get_language_choices['ru'] = 0;
730
- }
731
-
732
- if (!isset ( $get_language_choices ['sr'] ) ) {
733
- $get_language_choices['sr'] = 0;
734
- }
735
-
736
- if (!isset ( $get_language_choices ['sk'] ) ) {
737
- $get_language_choices['sk'] = 0;
738
- }
739
-
740
- if (!isset ( $get_language_choices ['sl'] ) ) {
741
- $get_language_choices['sl'] = 0;
742
- }
743
-
744
- if (!isset ( $get_language_choices ['es'] ) ) {
745
- $get_language_choices['es'] = 0;
746
- }
747
-
748
- if (!isset ( $get_language_choices ['sw'] ) ) {
749
- $get_language_choices['sw'] = 0;
750
- }
751
-
752
- if (!isset ( $get_language_choices ['sv'] ) ) {
753
- $get_language_choices['sv'] = 0;
754
- }
755
-
756
- if (!isset ( $get_language_choices ['ta'] ) ) {
757
- $get_language_choices['ta'] = 0;
758
- }
759
-
760
- if (!isset ( $get_language_choices ['te'] ) ) {
761
- $get_language_choices['te'] = 0;
762
- }
763
-
764
- if (!isset ( $get_language_choices ['th'] ) ) {
765
- $get_language_choices['th'] = 0;
766
- }
767
-
768
- if (!isset ( $get_language_choices ['tr'] ) ) {
769
- $get_language_choices['tr'] = 0;
770
- }
771
-
772
- if (!isset ( $get_language_choices ['uk'] ) ) {
773
- $get_language_choices['uk'] = 0;
774
- }
775
-
776
- if (!isset ( $get_language_choices ['ur'] ) ) {
777
- $get_language_choices['ur'] = 0;
778
- }
779
-
780
- if (!isset ( $get_language_choices ['vi'] ) ) {
781
- $get_language_choices['vi'] = 0;
782
- }
783
-
784
- if (!isset ( $get_language_choices ['cy'] ) ) {
785
- $get_language_choices['cy'] = 0;
786
- }
787
-
788
- if (!isset ( $get_language_choices ['yi'] ) ) {
789
- $get_language_choices['yi'] = 0;
790
- } ?>
791
-
792
- <div class="languages" style="width:25%; float:left">
793
- <div><input type="checkbox" name="language_display_settings[af]" value="1" <?php if ( 1 == $get_language_choices['af'] ) echo 'checked="checked"'; ?>/> Afrikaans</div>
794
- <div><input type="checkbox" name="language_display_settings[sq]" value="1" <?php if ( 1 == $get_language_choices['sq'] ) echo 'checked="checked"'; ?>/> Albanian</div>
795
- <div><input type="checkbox" name="language_display_settings[ar]" value="1" <?php if ( 1 == $get_language_choices['ar'] ) echo 'checked="checked"'; ?>/> Arabic</div>
796
- <div><input type="checkbox" name="language_display_settings[hy]" value="1" <?php if ( 1 == $get_language_choices['hy'] ) echo 'checked="checked"'; ?>/> Armenian</div>
797
- <div><input type="checkbox" name="language_display_settings[az]" value="1" <?php if ( 1 == $get_language_choices['az'] ) echo 'checked="checked"'; ?>/> Azerbaijani</div>
798
- <div><input type="checkbox" name="language_display_settings[eu]" value="1" <?php if ( 1 == $get_language_choices['eu'] ) echo 'checked="checked"'; ?>/> Basque</div>
799
- <div><input type="checkbox" name="language_display_settings[be]" value="1" <?php if ( 1 == $get_language_choices['be'] ) echo 'checked="checked"'; ?>/> Belarusian</div>
800
- <div><input type="checkbox" name="language_display_settings[bn]" value="1" <?php if ( 1 == $get_language_choices['bn'] ) echo 'checked="checked"'; ?>/> Bengali</div>
801
- <div><input type="checkbox" name="language_display_settings[bs]" value="1" <?php if ( 1 == $get_language_choices['bs'] ) echo 'checked="checked"'; ?>/> Bosnian</div>
802
- <div><input type="checkbox" name="language_display_settings[bg]" value="1" <?php if ( 1 == $get_language_choices['bg'] ) echo 'checked="checked"'; ?>/> Bulgarian</div>
803
- <div><input type="checkbox" name="language_display_settings[ca]" value="1" <?php if ( 1 == $get_language_choices['ca'] ) echo 'checked="checked"'; ?>/> Catalan</div>
804
- <div><input type="checkbox" name="language_display_settings[ceb]" value="1" <?php if ( 1 == $get_language_choices['ceb'] ) echo 'checked="checked"'; ?>/> Cebuano</div>
805
- <div><input type="checkbox" name="language_display_settings[zh-CN]" value="1" <?php if ( 1 == $get_language_choices['zh-CN'] ) echo 'checked="checked"'; ?>/> Chinese</div>
806
- <div><input type="checkbox" name="language_display_settings[zh-TW]" value="1" <?php if ( 1 == $get_language_choices['zh-TW'] ) echo 'checked="checked"'; ?>/> Chinese (Han)</div>
807
- <div><input type="checkbox" name="language_display_settings[hr]" value="1" <?php if ( 1 == $get_language_choices['hr'] ) echo 'checked="checked"'; ?>/> Croatian</div>
808
- <div><input type="checkbox" name="language_display_settings[cs]" value="1" <?php if ( 1 == $get_language_choices['cs'] ) echo 'checked="checked"'; ?>/> Czech</div>
809
- <div><input type="checkbox" name="language_display_settings[da]" value="1" <?php if ( 1 == $get_language_choices['da'] ) echo 'checked="checked"'; ?>/> Danish</div>
810
- <div><input type="checkbox" name="language_display_settings[nl]" value="1" <?php if ( 1 == $get_language_choices['nl'] ) echo 'checked="checked"'; ?>/> Dutch</div>
811
- <div><input type="checkbox" name="language_display_settings[en]" value="1" <?php if ( 1 == $get_language_choices['en'] ) echo 'checked="checked"'; ?>/> English</div>
812
- </div>
813
-
814
- <div class="languages" style="width:25%; float:left">
815
- <div><input type="checkbox" name="language_display_settings[eo]" value="1" <?php if ( 1 == $get_language_choices['eo'] ) echo 'checked="checked"'; ?>/> Esperanto</div>
816
- <div><input type="checkbox" name="language_display_settings[et]" value="1" <?php if ( 1 == $get_language_choices['et'] ) echo 'checked="checked"'; ?>/> Estonian</div>
817
- <div><input type="checkbox" name="language_display_settings[tl]" value="1" <?php if ( 1 == $get_language_choices['tl'] ) echo 'checked="checked"'; ?>/> Filipino</div>
818
- <div><input type="checkbox" name="language_display_settings[fi]" value="1" <?php if ( 1 == $get_language_choices['fi'] ) echo 'checked="checked"'; ?>/> Finnish</div>
819
- <div><input type="checkbox" name="language_display_settings[fr]" value="1" <?php if ( 1 == $get_language_choices['fr'] ) echo 'checked="checked"'; ?>/> French</div>
820
- <div><input type="checkbox" name="language_display_settings[gl]" value="1" <?php if ( 1 == $get_language_choices['gl'] ) echo 'checked="checked"'; ?>/> Galician</div>
821
- <div><input type="checkbox" name="language_display_settings[ka]" value="1" <?php if ( 1 == $get_language_choices['ka'] ) echo 'checked="checked"'; ?>/> Georgian</div>
822
- <div><input type="checkbox" name="language_display_settings[de]" value="1" <?php if ( 1 == $get_language_choices['de'] ) echo 'checked="checked"'; ?>/> German</div>
823
- <div><input type="checkbox" name="language_display_settings[el]" value="1" <?php if ( 1 == $get_language_choices['el'] ) echo 'checked="checked"'; ?>/> Greek</div>
824
- <div><input type="checkbox" name="language_display_settings[gu]" value="1" <?php if ( 1 == $get_language_choices['gu'] ) echo 'checked="checked"'; ?>/> Gujarati</div>
825
- <div><input type="checkbox" name="language_display_settings[ht]" value="1" <?php if ( 1 == $get_language_choices['ht'] ) echo 'checked="checked"'; ?>/> Haitian</div>
826
- <div><input type="checkbox" name="language_display_settings[iw]" value="1" <?php if ( 1 == $get_language_choices['iw'] ) echo 'checked="checked"'; ?>/> Hebrew</div>
827
- <div><input type="checkbox" name="language_display_settings[hi]" value="1" <?php if ( 1 == $get_language_choices['hi'] ) echo 'checked="checked"'; ?>/> Hindi</div>
828
- <div><input type="checkbox" name="language_display_settings[hmn]" value="1" <?php if ( 1 == $get_language_choices['hmn'] ) echo 'checked="checked"'; ?>/> Hmong</div>
829
- <div><input type="checkbox" name="language_display_settings[hu]" value="1" <?php if ( 1 == $get_language_choices['hu'] ) echo 'checked="checked"'; ?>/> Hungarian</div>
830
- <div><input type="checkbox" name="language_display_settings[is]" value="1" <?php if ( 1 == $get_language_choices['is'] ) echo 'checked="checked"'; ?>/> Icelandic</div>
831
- <div><input type="checkbox" name="language_display_settings[id]" value="1" <?php if ( 1 == $get_language_choices['id'] ) echo 'checked="checked"'; ?>/> Indonesian</div>
832
- <div><input type="checkbox" name="language_display_settings[ga]" value="1" <?php if ( 1 == $get_language_choices['ga'] ) echo 'checked="checked"'; ?>/> Irish</div>
833
- <div><input type="checkbox" name="language_display_settings[it]" value="1" <?php if ( 1 == $get_language_choices['it'] ) echo 'checked="checked"'; ?>/> Italian</div>
834
- </div>
835
-
836
- <div class="languages" style="width:25%; float:left">
837
- <div><input type="checkbox" name="language_display_settings[ja]" value="1" <?php if ( 1 == $get_language_choices['ja'] ) echo 'checked="checked"'; ?>/> Japanese</div>
838
- <div><input type="checkbox" name="language_display_settings[jw]" value="1" <?php if ( 1 == $get_language_choices['jw'] ) echo 'checked="checked"'; ?>/> Javanese</div>
839
- <div><input type="checkbox" name="language_display_settings[kn]" value="1" <?php if ( 1 == $get_language_choices['kn'] ) echo 'checked="checked"'; ?>/> Kannada</div>
840
- <div><input type="checkbox" name="language_display_settings[km]" value="1" <?php if ( 1 == $get_language_choices['km'] ) echo 'checked="checked"'; ?>/> Khmer</div>
841
- <div><input type="checkbox" name="language_display_settings[ko]" value="1" <?php if ( 1 == $get_language_choices['ko'] ) echo 'checked="checked"'; ?>/> Korean</div>
842
- <div><input type="checkbox" name="language_display_settings[lo]" value="1" <?php if ( 1 == $get_language_choices['lo'] ) echo 'checked="checked"'; ?>/> Lao</div>
843
- <div><input type="checkbox" name="language_display_settings[la]" value="1" <?php if ( 1 == $get_language_choices['la'] ) echo 'checked="checked"'; ?>/> Latin</div>
844
- <div><input type="checkbox" name="language_display_settings[lv]" value="1" <?php if ( 1 == $get_language_choices['lv'] ) echo 'checked="checked"'; ?>/> Latvian</div>
845
- <div><input type="checkbox" name="language_display_settings[lt]" value="1" <?php if ( 1 == $get_language_choices['lt'] ) echo 'checked="checked"'; ?>/> Lithuanian</div>
846
- <div><input type="checkbox" name="language_display_settings[mk]" value="1" <?php if ( 1 == $get_language_choices['mk'] ) echo 'checked="checked"'; ?>/> Macedonian</div>
847
- <div><input type="checkbox" name="language_display_settings[ms]" value="1" <?php if ( 1 == $get_language_choices['ms'] ) echo 'checked="checked"'; ?>/> Malay</div>
848
- <div><input type="checkbox" name="language_display_settings[mt]" value="1" <?php if ( 1 == $get_language_choices['mt'] ) echo 'checked="checked"'; ?>/> Maltese</div>
849
- <div><input type="checkbox" name="language_display_settings[mr]" value="1" <?php if ( 1 == $get_language_choices['mr'] ) echo 'checked="checked"'; ?>/> Marathi</div>
850
- <div><input type="checkbox" name="language_display_settings[no]" value="1" <?php if ( 1 == $get_language_choices['no'] ) echo 'checked="checked"'; ?>/> Norwegian</div>
851
- <div><input type="checkbox" name="language_display_settings[fa]" value="1" <?php if ( 1 == $get_language_choices['fa'] ) echo 'checked="checked"'; ?>/> Persian</div>
852
- <div><input type="checkbox" name="language_display_settings[pl]" value="1" <?php if ( 1 == $get_language_choices['pl'] ) echo 'checked="checked"'; ?>/> Polish</div>
853
- <div><input type="checkbox" name="language_display_settings[pt]" value="1" <?php if ( 1 == $get_language_choices['pt'] ) echo 'checked="checked"'; ?>/> Portuguese</div>
854
- <div><input type="checkbox" name="language_display_settings[ro]" value="1" <?php if ( 1 == $get_language_choices['ro'] ) echo 'checked="checked"'; ?>/> Romanian</div>
855
- <div><input type="checkbox" name="language_display_settings[ru]" value="1" <?php if ( 1 == $get_language_choices['ru'] ) echo 'checked="checked"'; ?>/> Russian</div>
856
- </div>
857
-
858
- <div class="languages" style="width:25%; float:left">
859
- <div><input type="checkbox" name="language_display_settings[sr]" value="1" <?php if ( 1 == $get_language_choices['sr'] ) echo 'checked="checked"'; ?>/> Serbian</div>
860
- <div><input type="checkbox" name="language_display_settings[sk]" value="1" <?php if ( 1 == $get_language_choices['sk'] ) echo 'checked="checked"'; ?>/> Slovak</div>
861
- <div><input type="checkbox" name="language_display_settings[sl]" value="1" <?php if ( 1 == $get_language_choices['sl'] ) echo 'checked="checked"'; ?>/> Slovenian</div>
862
- <div><input type="checkbox" name="language_display_settings[es]" value="1" <?php if ( 1 == $get_language_choices['es'] ) echo 'checked="checked"'; ?>/> Spanish</div>
863
- <div><input type="checkbox" name="language_display_settings[sw]" value="1" <?php if ( 1 == $get_language_choices['sw'] ) echo 'checked="checked"'; ?>/> Swahili</div>
864
- <div><input type="checkbox" name="language_display_settings[sv]" value="1" <?php if ( 1 == $get_language_choices['sv'] ) echo 'checked="checked"'; ?>/> Swedish</div>
865
- <div><input type="checkbox" name="language_display_settings[ta]" value="1" <?php if ( 1 == $get_language_choices['ta'] ) echo 'checked="checked"'; ?>/> Tamil</div>
866
- <div><input type="checkbox" name="language_display_settings[te]" value="1" <?php if ( 1 == $get_language_choices['te'] ) echo 'checked="checked"'; ?>/> Telugu</div>
867
- <div><input type="checkbox" name="language_display_settings[th]" value="1" <?php if ( 1 == $get_language_choices['th'] ) echo 'checked="checked"'; ?>/> Thai</div>
868
- <div><input type="checkbox" name="language_display_settings[tr]" value="1" <?php if ( 1 == $get_language_choices['tr'] ) echo 'checked="checked"'; ?>/> Turkish</div>
869
- <div><input type="checkbox" name="language_display_settings[uk]" value="1" <?php if ( 1 == $get_language_choices['uk'] ) echo 'checked="checked"'; ?>/> Ukranian</div>
870
- <div><input type="checkbox" name="language_display_settings[ur]" value="1" <?php if ( 1 == $get_language_choices['ur'] ) echo 'checked="checked"'; ?>/> Urdu</div>
871
- <div><input type="checkbox" name="language_display_settings[vi]" value="1" <?php if ( 1 == $get_language_choices['vi'] ) echo 'checked="checked"'; ?>/> Vietnamese</div>
872
- <div><input type="checkbox" name="language_display_settings[cy]" value="1" <?php if ( 1 == $get_language_choices['cy'] ) echo 'checked="checked"'; ?>/> Welsh</div>
873
- <div><input type="checkbox" name="language_display_settings[yi]" value="1" <?php if ( 1 == $get_language_choices['yi'] ) echo 'checked="checked"'; ?>/> Yiddish</div>
874
- </div>
875
-
876
- <div style="clear:both"></div>
877
- <?php }
878
-
879
- function googlelanguagetranslator_flags_cb() {
880
-
881
- $option_name = 'googlelanguagetranslator_flags' ;
882
- $new_value = 'show_flags';
883
-
884
- if ( get_option( $option_name ) === false ) {
885
-
886
- // The option does not exist, so we update it.
887
- update_option( $option_name, $new_value );
888
- }
889
-
890
- $options = get_option (''.$option_name.''); ?>
891
-
892
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
893
- <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
894
- <?php }
895
-
896
-
897
- function flag_display_settings_cb() {
898
- $defaults = array(
899
- 'flag-en' => 1
900
- );
901
-
902
- $option_name = 'flag_display_settings' ;
903
- $new_value = $defaults;
904
-
905
- if ( get_option( $option_name ) === false ) {
906
-
907
- // The option does not exist, so we update it.
908
- update_option( $option_name, $new_value );
909
- }
910
-
911
- $get_flag_choices = get_option (''.$option_name.'');
912
-
913
- if (!isset ( $get_flag_choices ['flag-af'] ) ) {
914
- $get_flag_choices['flag-af'] = 0;
915
- }
916
-
917
- if (!isset ( $get_flag_choices ['flag-sq'] ) ) {
918
- $get_flag_choices['flag-sq'] = 0;
919
- }
920
-
921
- if (!isset ( $get_flag_choices ['flag-ar'] ) ) {
922
- $get_flag_choices['flag-ar'] = 0;
923
- }
924
-
925
- if (!isset ( $get_flag_choices ['flag-hy'] ) ) {
926
- $get_flag_choices['flag-hy'] = 0;
927
- }
928
-
929
- if (!isset ( $get_flag_choices ['flag-az'] ) ) {
930
- $get_flag_choices['flag-az'] = 0;
931
- }
932
-
933
- if (!isset ( $get_flag_choices ['flag-eu'] ) ) {
934
- $get_flag_choices['flag-eu'] = 0;
935
- }
936
-
937
- if (!isset ( $get_flag_choices ['flag-be'] ) ) {
938
- $get_flag_choices['flag-be'] = 0;
939
- }
940
-
941
- if (!isset ( $get_flag_choices ['flag-bn'] ) ) {
942
- $get_flag_choices['flag-bn'] = 0;
943
- }
944
-
945
- if (!isset ( $get_flag_choices ['flag-bs'] ) ) {
946
- $get_flag_choices['flag-bs'] = 0;
947
- }
948
-
949
- if (!isset ( $get_flag_choices ['flag-bg'] ) ) {
950
- $get_flag_choices['flag-bg'] = 0;
951
- }
952
-
953
- if (!isset ( $get_flag_choices ['flag-ca'] ) ) {
954
- $get_flag_choices['flag-ca'] = 0;
955
- }
956
-
957
- if (!isset ( $get_flag_choices ['flag-ceb'] ) ) {
958
- $get_flag_choices['flag-ceb'] = 0;
959
- }
960
-
961
- if (!isset ( $get_flag_choices ['flag-zh-CN'] ) ) {
962
- $get_flag_choices['flag-zh-CN'] = 0;
963
- }
964
-
965
- if (!isset ( $get_flag_choices ['flag-zh-TW'] ) ) {
966
- $get_flag_choices['flag-zh-TW'] = 0;
967
- }
968
-
969
- if (!isset ( $get_flag_choices ['flag-hr'] ) ) {
970
- $get_flag_choices['flag-hr'] = 0;
971
- }
972
-
973
- if (!isset ( $get_flag_choices ['flag-cs'] ) ) {
974
- $get_flag_choices['flag-cs'] = 0;
975
- }
976
-
977
- if (!isset ( $get_flag_choices ['flag-da'] ) ) {
978
- $get_flag_choices['flag-da'] = 0;
979
- }
980
-
981
- if (!isset ( $get_flag_choices ['flag-nl'] ) ) {
982
- $get_flag_choices['flag-nl'] = 0;
983
- }
984
-
985
- if (!isset ( $get_flag_choices ['flag-en'] ) ) {
986
- $get_flag_choices['flag-en'] = 1;
987
- }
988
-
989
- if (!isset ( $get_flag_choices ['flag-eo'] ) ) {
990
- $get_flag_choices['flag-eo'] = 0;
991
- }
992
-
993
- if (!isset ( $get_flag_choices ['flag-et'] ) ) {
994
- $get_flag_choices['flag-et'] = 0;
995
- }
996
-
997
- if (!isset ( $get_flag_choices ['flag-tl'] ) ) {
998
- $get_flag_choices['flag-tl'] = 0;
999
- }
1000
-
1001
- if (!isset ( $get_flag_choices ['flag-fi'] ) ) {
1002
- $get_flag_choices['flag-fi'] = 0;
1003
- }
1004
-
1005
- if (!isset ( $get_flag_choices ['flag-fr'] ) ) {
1006
- $get_flag_choices['flag-fr'] = 0;
1007
- }
1008
-
1009
- if (!isset ( $get_flag_choices ['flag-gl'] ) ) {
1010
- $get_flag_choices['flag-gl'] = 0;
1011
- }
1012
-
1013
- if (!isset ( $get_flag_choices ['flag-ka'] ) ) {
1014
- $get_flag_choices['flag-ka'] = 0;
1015
- }
1016
-
1017
- if (!isset ( $get_flag_choices ['flag-de'] ) ) {
1018
- $get_flag_choices['flag-de'] = 0;
1019
- }
1020
-
1021
- if (!isset ( $get_flag_choices ['flag-el'] ) ) {
1022
- $get_flag_choices['flag-el'] = 0;
1023
- }
1024
-
1025
- if (!isset ( $get_flag_choices ['flag-gu'] ) ) {
1026
- $get_flag_choices['flag-gu'] = 0;
1027
- }
1028
-
1029
- if (!isset ( $get_flag_choices ['flag-ht'] ) ) {
1030
- $get_flag_choices['flag-ht'] = 0;
1031
- }
1032
-
1033
- if (!isset ( $get_flag_choices ['flag-iw'] ) ) {
1034
- $get_flag_choices['flag-iw'] = 0;
1035
- }
1036
-
1037
- if (!isset ( $get_flag_choices ['flag-hi'] ) ) {
1038
- $get_flag_choices['flag-hi'] = 0;
1039
- }
1040
-
1041
- if (!isset ( $get_flag_choices ['flag-hmn'] ) ) {
1042
- $get_flag_choices['flag-hmn'] = 0;
1043
- }
1044
-
1045
- if (!isset ( $get_flag_choices ['flag-hu'] ) ) {
1046
- $get_flag_choices['flag-hu'] = 0;
1047
- }
1048
-
1049
- if (!isset ( $get_flag_choices ['flag-is'] ) ) {
1050
- $get_flag_choices['flag-is'] = 0;
1051
- }
1052
-
1053
- if (!isset ( $get_flag_choices ['flag-id'] ) ) {
1054
- $get_flag_choices['flag-id'] = 0;
1055
- }
1056
-
1057
- if (!isset ( $get_flag_choices ['flag-ga'] ) ) {
1058
- $get_flag_choices['flag-ga'] = 0;
1059
- }
1060
-
1061
- if (!isset ( $get_flag_choices ['flag-it'] ) ) {
1062
- $get_flag_choices['flag-it'] = 0;
1063
- }
1064
-
1065
- if (!isset ( $get_flag_choices ['flag-ja'] ) ) {
1066
- $get_flag_choices['flag-ja'] = 0;
1067
- }
1068
-
1069
- if (!isset ( $get_flag_choices ['flag-jw'] ) ) {
1070
- $get_flag_choices['flag-jw'] = 0;
1071
- }
1072
-
1073
- if (!isset ( $get_flag_choices ['flag-kn'] ) ) {
1074
- $get_flag_choices['flag-kn'] = 0;
1075
- }
1076
-
1077
- if (!isset ( $get_flag_choices ['flag-km'] ) ) {
1078
- $get_flag_choices['flag-km'] = 0;
1079
- }
1080
-
1081
- if (!isset ( $get_flag_choices ['flag-ko'] ) ) {
1082
- $get_flag_choices['flag-ko'] = 0;
1083
- }
1084
-
1085
- if (!isset ( $get_flag_choices ['flag-lo'] ) ) {
1086
- $get_flag_choices['flag-lo'] = 0;
1087
- }
1088
-
1089
- if (!isset ( $get_flag_choices ['flag-la'] ) ) {
1090
- $get_flag_choices['flag-la'] = 0;
1091
- }
1092
-
1093
- if (!isset ( $get_flag_choices ['flag-lv'] ) ) {
1094
- $get_flag_choices['flag-lv'] = 0;
1095
- }
1096
-
1097
- if (!isset ( $get_flag_choices ['flag-lt'] ) ) {
1098
- $get_flag_choices['flag-lt'] = 0;
1099
- }
1100
-
1101
- if (!isset ( $get_flag_choices ['flag-mk'] ) ) {
1102
- $get_flag_choices['flag-mk'] = 0;
1103
- }
1104
-
1105
- if (!isset ( $get_flag_choices ['flag-ms'] ) ) {
1106
- $get_flag_choices['flag-ms'] = 0;
1107
- }
1108
-
1109
- if (!isset ( $get_flag_choices ['flag-mt'] ) ) {
1110
- $get_flag_choices['flag-mt'] = 0;
1111
- }
1112
-
1113
- if (!isset ( $get_flag_choices ['flag-mr'] ) ) {
1114
- $get_flag_choices['flag-mr'] = 0;
1115
- }
1116
-
1117
- if (!isset ( $get_flag_choices ['flag-no'] ) ) {
1118
- $get_flag_choices['flag-no'] = 0;
1119
- }
1120
-
1121
- if (!isset ( $get_flag_choices ['flag-fa'] ) ) {
1122
- $get_flag_choices['flag-fa'] = 0;
1123
- }
1124
-
1125
- if (!isset ( $get_flag_choices ['flag-pl'] ) ) {
1126
- $get_flag_choices['flag-pl'] = 0;
1127
- }
1128
-
1129
- if (!isset ( $get_flag_choices ['flag-pt'] ) ) {
1130
- $get_flag_choices['flag-pt'] = 0;
1131
- }
1132
-
1133
- if (!isset ( $get_flag_choices ['flag-ro'] ) ) {
1134
- $get_flag_choices['flag-ro'] = 0;
1135
- }
1136
-
1137
- if (!isset ( $get_flag_choices ['flag-ru'] ) ) {
1138
- $get_flag_choices['flag-ru'] = 0;
1139
- }
1140
-
1141
- if (!isset ( $get_flag_choices ['flag-sr'] ) ) {
1142
- $get_flag_choices['flag-sr'] = 0;
1143
- }
1144
-
1145
- if (!isset ( $get_flag_choices ['flag-sk'] ) ) {
1146
- $get_flag_choices['flag-sk'] = 0;
1147
- }
1148
-
1149
- if (!isset ( $get_flag_choices ['flag-sl'] ) ) {
1150
- $get_flag_choices['flag-sl'] = 0;
1151
- }
1152
-
1153
- if (!isset ( $get_flag_choices ['flag-es'] ) ) {
1154
- $get_flag_choices['flag-es'] = 0;
1155
- }
1156
-
1157
- if (!isset ( $get_flag_choices ['flag-sw'] ) ) {
1158
- $get_flag_choices['flag-sw'] = 0;
1159
- }
1160
-
1161
- if (!isset ( $get_flag_choices ['flag-sv'] ) ) {
1162
- $get_flag_choices['flag-sv'] = 0;
1163
- }
1164
-
1165
- if (!isset ( $get_flag_choices ['flag-ta'] ) ) {
1166
- $get_flag_choices['flag-ta'] = 0;
1167
- }
1168
-
1169
- if (!isset ( $get_flag_choices ['flag-te'] ) ) {
1170
- $get_flag_choices['flag-te'] = 0;
1171
- }
1172
-
1173
- if (!isset ( $get_flag_choices ['flag-th'] ) ) {
1174
- $get_flag_choices['flag-th'] = 0;
1175
- }
1176
-
1177
- if (!isset ( $get_flag_choices ['flag-tr'] ) ) {
1178
- $get_flag_choices['flag-tr'] = 0;
1179
- }
1180
-
1181
- if (!isset ( $get_flag_choices ['flag-uk'] ) ) {
1182
- $get_flag_choices['flag-uk'] = 0;
1183
- }
1184
-
1185
- if (!isset ( $get_flag_choices ['flag-ur'] ) ) {
1186
- $get_flag_choices['flag-ur'] = 0;
1187
- }
1188
-
1189
- if (!isset ( $get_flag_choices ['flag-vi'] ) ) {
1190
- $get_flag_choices['flag-vi'] = 0;
1191
- }
1192
-
1193
- if (!isset ( $get_flag_choices ['flag-cy'] ) ) {
1194
- $get_flag_choices['flag-cy'] = 0;
1195
- }
1196
-
1197
- if (!isset ( $get_flag_choices ['flag-yi'] ) ) {
1198
- $get_flag_choices['flag-yi'] = 0;
1199
- }
1200
-
1201
- ?>
1202
- <div class="flagdisplay" style="width:25%; float:left">
1203
- <div><input type="checkbox" name="flag_display_settings[flag-af]" value="1" <?php checked( 1,$get_flag_choices['flag-af']); ?>/> Afrikaans</div>
1204
- <div><input type="checkbox" name="flag_display_settings[flag-sq]" value="1" <?php checked( 1,$get_flag_choices['flag-sq']); ?>/> Albanian</div>
1205
- <div><input type="checkbox" name="flag_display_settings[flag-ar]" value="1" <?php checked( 1,$get_flag_choices['flag-ar']); ?>/> Arabic</div>
1206
- <div><input type="checkbox" name="flag_display_settings[flag-hy]" value="1" <?php checked( 1,$get_flag_choices['flag-hy']); ?>/> Armenian</div>
1207
- <div><input type="checkbox" name="flag_display_settings[flag-az]" value="1" <?php checked( 1,$get_flag_choices['flag-az']); ?>/> Azerbaijani</div>
1208
- <div><input type="checkbox" name="flag_display_settings[flag-eu]" value="1" <?php checked( 1,$get_flag_choices['flag-eu']); ?>/> Basque</div>
1209
- <div><input type="checkbox" name="flag_display_settings[flag-be]" value="1" <?php checked( 1,$get_flag_choices['flag-be']); ?>/> Belarusian</div>
1210
- <div><input type="checkbox" name="flag_display_settings[flag-bn]" value="1" <?php checked( 1,$get_flag_choices['flag-bn']); ?>/> Bengali</div>
1211
- <div><input type="checkbox" name="flag_display_settings[flag-bs]" value="1" <?php checked( 1,$get_flag_choices['flag-bs']); ?>/> Bosnian</div>
1212
- <div><input type="checkbox" name="flag_display_settings[flag-bg]" value="1" <?php checked( 1,$get_flag_choices['flag-bg']); ?>/> Bulgarian</div>
1213
- <div><input type="checkbox" name="flag_display_settings[flag-ca]" value="1" <?php checked( 1,$get_flag_choices['flag-ca']); ?>/> Catalan</div>
1214
- <div><input type="checkbox" name="flag_display_settings[flag-ceb]" value="1" <?php checked( 1,$get_flag_choices['flag-ceb']); ?>/> Cebuano</div>
1215
- <div><input type="checkbox" name="flag_display_settings[flag-zh-CN]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-CN']); ?>/> Chinese</div>
1216
- <div><input type="checkbox" name="flag_display_settings[flag-zh-TW]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-TW']); ?>/> Chinese (Han)</div>
1217
- <div><input type="checkbox" name="flag_display_settings[flag-hr]" value="1" <?php checked( 1,$get_flag_choices['flag-hr']); ?>/> Croatian</div>
1218
- <div><input type="checkbox" name="flag_display_settings[flag-cs]" value="1" <?php checked( 1,$get_flag_choices['flag-cs']); ?>/> Czech</div>
1219
- <div><input type="checkbox" name="flag_display_settings[flag-da]" value="1" <?php checked( 1,$get_flag_choices['flag-da']); ?>/> Danish</div>
1220
- <div><input type="checkbox" name="flag_display_settings[flag-nl]" value="1" <?php checked( 1,$get_flag_choices['flag-nl']); ?>/> Dutch</div>
1221
- <div><input type="checkbox" name="flag_display_settings[flag-en]" value="1" <?php checked(1,$get_flag_choices['flag-en']); ?>/> English</div>
1222
- </div>
1223
-
1224
- <div class="flagdisplay" style="width:25%; float:left">
1225
- <div><input type="checkbox" name="flag_display_settings[flag-eo]" value="1" <?php checked( 1,$get_flag_choices['flag-eo']); ?>/> Esperanto</div>
1226
- <div><input type="checkbox" name="flag_display_settings[flag-et]" value="1" <?php checked( 1,$get_flag_choices['flag-et']); ?>/> Estonian</div>
1227
- <div><input type="checkbox" name="flag_display_settings[flag-tl]" value="1" <?php checked( 1,$get_flag_choices['flag-tl']); ?>/> Filipino</div>
1228
- <div><input type="checkbox" name="flag_display_settings[flag-fi]" value="1" <?php checked( 1,$get_flag_choices['flag-fi']); ?>/> Finnish</div>
1229
- <div><input type="checkbox" name="flag_display_settings[flag-fr]" value="1" <?php checked( 1,$get_flag_choices['flag-fr']); ?>/> French</div>
1230
- <div><input type="checkbox" name="flag_display_settings[flag-gl]" value="1" <?php checked( 1,$get_flag_choices['flag-gl']); ?>/> Galician</div>
1231
- <div><input type="checkbox" name="flag_display_settings[flag-ka]" value="1" <?php checked( 1,$get_flag_choices['flag-ka']); ?>/> Georgian</div>
1232
- <div><input type="checkbox" name="flag_display_settings[flag-de]" value="1" <?php checked( 1,$get_flag_choices['flag-de']); ?>/> German</div>
1233
- <div><input type="checkbox" name="flag_display_settings[flag-el]" value="1" <?php checked( 1,$get_flag_choices['flag-el']); ?>/> Greek</div>
1234
- <div><input type="checkbox" name="flag_display_settings[flag-gu]" value="1" <?php checked( 1,$get_flag_choices['flag-gu']); ?>/> Gujarati</div>
1235
- <div><input type="checkbox" name="flag_display_settings[flag-ht]" value="1" <?php checked( 1,$get_flag_choices['flag-ht']); ?>/> Haitian</div>
1236
- <div><input type="checkbox" name="flag_display_settings[flag-iw]" value="1" <?php checked( 1,$get_flag_choices['flag-iw']); ?>/> Hebrew</div>
1237
- <div><input type="checkbox" name="flag_display_settings[flag-hi]" value="1" <?php checked( 1,$get_flag_choices['flag-hi']); ?>/> Hindi</div>
1238
- <div><input type="checkbox" name="flag_display_settings[flag-hmn]" value="1" <?php checked( 1,$get_flag_choices['flag-hmn']); ?>/> Hmong</div>
1239
- <div><input type="checkbox" name="flag_display_settings[flag-hu]" value="1" <?php checked( 1,$get_flag_choices['flag-hu']); ?>/> Hungarian</div>
1240
- <div><input type="checkbox" name="flag_display_settings[flag-is]" value="1" <?php checked( 1,$get_flag_choices['flag-is']); ?>/> Icelandic</div>
1241
- <div><input type="checkbox" name="flag_display_settings[flag-id]" value="1" <?php checked( 1,$get_flag_choices['flag-id']); ?>/> Indonesian</div>
1242
- <div><input type="checkbox" name="flag_display_settings[flag-ga]" value="1" <?php checked( 1,$get_flag_choices['flag-ga']); ?>/> Irish</div>
1243
- <div><input type="checkbox" name="flag_display_settings[flag-it]" value="1" <?php checked( 1,$get_flag_choices['flag-it']); ?>/> Italian</div>
1244
- </div>
1245
-
1246
- <div class="flagdisplay" style="width:25%; float:left">
1247
- <div><input type="checkbox" name="flag_display_settings[flag-ja]" value="1" <?php checked( 1,$get_flag_choices['flag-ja']); ?>/> Japanese</div>
1248
- <div><input type="checkbox" name="flag_display_settings[flag-jw]" value="1" <?php checked( 1,$get_flag_choices['flag-jw']); ?>/> Javanese</div>
1249
- <div><input type="checkbox" name="flag_display_settings[flag-kn]" value="1" <?php checked( 1,$get_flag_choices['flag-kn']); ?>/> Kannada</div>
1250
- <div><input type="checkbox" name="flag_display_settings[flag-km]" value="1" <?php checked( 1,$get_flag_choices['flag-km']); ?>/> Khmer</div>
1251
- <div><input type="checkbox" name="flag_display_settings[flag-ko]" value="1" <?php checked( 1,$get_flag_choices['flag-ko']); ?>/> Korean</div>
1252
- <div><input type="checkbox" name="flag_display_settings[flag-lo]" value="1" <?php checked( 1,$get_flag_choices['flag-lo']); ?>/> Lao</div>
1253
- <div><input type="checkbox" name="flag_display_settings[flag-la]" value="1" <?php checked( 1,$get_flag_choices['flag-la']); ?>/> Latin</div>
1254
- <div><input type="checkbox" name="flag_display_settings[flag-lv]" value="1" <?php checked( 1,$get_flag_choices['flag-lv']); ?>/> Latvian</div>
1255
- <div><input type="checkbox" name="flag_display_settings[flag-lt]" value="1" <?php checked( 1,$get_flag_choices['flag-lt']); ?>/> Lithuanian</div>
1256
- <div><input type="checkbox" name="flag_display_settings[flag-mk]" value="1" <?php checked( 1,$get_flag_choices['flag-mk']); ?>/> Macedonian</div>
1257
- <div><input type="checkbox" name="flag_display_settings[flag-ms]" value="1" <?php checked( 1,$get_flag_choices['flag-ms']); ?>/> Malay</div>
1258
- <div><input type="checkbox" name="flag_display_settings[flag-mt]" value="1" <?php checked( 1,$get_flag_choices['flag-mt']); ?>/> Maltese</div>
1259
- <div><input type="checkbox" name="flag_display_settings[flag-mr]" value="1" <?php checked( 1,$get_flag_choices['flag-mr']); ?>/> Marathi</div>
1260
- <div><input type="checkbox" name="flag_display_settings[flag-no]" value="1" <?php checked( 1,$get_flag_choices['flag-no']); ?>/> Norwegian</div>
1261
- <div><input type="checkbox" name="flag_display_settings[flag-fa]" value="1" <?php checked( 1,$get_flag_choices['flag-fa']); ?>/> Persian</div>
1262
- <div><input type="checkbox" name="flag_display_settings[flag-pl]" value="1" <?php checked( 1,$get_flag_choices['flag-pl']); ?>/> Polish</div>
1263
- <div><input type="checkbox" name="flag_display_settings[flag-pt]" value="1" <?php checked( 1,$get_flag_choices['flag-pt']); ?>/> Portuguese</div>
1264
- <div><input type="checkbox" name="flag_display_settings[flag-ro]" value="1" <?php checked( 1,$get_flag_choices['flag-ro']); ?>/> Romanian</div>
1265
- <div><input type="checkbox" name="flag_display_settings[flag-ru]" value="1" <?php checked( 1,$get_flag_choices['flag-ru']); ?>/> Russian</div>
1266
- </div>
1267
-
1268
- <div class="flagdisplay" style="width:25%; float:left">
1269
- <div><input type="checkbox" name="flag_display_settings[flag-sr]" value="1" <?php checked( 1,$get_flag_choices['flag-sr']); ?>/> Serbian</div>
1270
- <div><input type="checkbox" name="flag_display_settings[flag-sk]" value="1" <?php checked( 1,$get_flag_choices['flag-sk']); ?>/> Slovak</div>
1271
- <div><input type="checkbox" name="flag_display_settings[flag-sl]" value="1" <?php checked( 1,$get_flag_choices['flag-sl']); ?>/> Slovenian</div>
1272
- <div><input type="checkbox" name="flag_display_settings[flag-es]" value="1" <?php checked( 1,$get_flag_choices['flag-es']); ?>/> Spanish</div>
1273
- <div><input type="checkbox" name="flag_display_settings[flag-sw]" value="1" <?php checked( 1,$get_flag_choices['flag-sw']); ?>/> Swahili</div>
1274
- <div><input type="checkbox" name="flag_display_settings[flag-sv]" value="1" <?php checked( 1,$get_flag_choices['flag-sv']); ?>/> Swedish</div>
1275
- <div><input type="checkbox" name="flag_display_settings[flag-ta]" value="1" <?php checked( 1,$get_flag_choices['flag-ta']); ?>/> Tamil</div>
1276
- <div><input type="checkbox" name="flag_display_settings[flag-te]" value="1" <?php checked( 1,$get_flag_choices['flag-te']); ?>/> Telugu</div>
1277
- <div><input type="checkbox" name="flag_display_settings[flag-th]" value="1" <?php checked( 1,$get_flag_choices['flag-th']); ?>/> Thai</div>
1278
- <div><input type="checkbox" name="flag_display_settings[flag-tr]" value="1" <?php checked( 1,$get_flag_choices['flag-tr']); ?>/> Turkish</div>
1279
- <div><input type="checkbox" name="flag_display_settings[flag-uk]" value="1" <?php checked( 1,$get_flag_choices['flag-uk']); ?>/> Ukranian</div>
1280
- <div><input type="checkbox" name="flag_display_settings[flag-ur]" value="1" <?php checked( 1,$get_flag_choices['flag-ur']); ?>/> Urdu</div>
1281
- <div><input type="checkbox" name="flag_display_settings[flag-vi]" value="1" <?php checked( 1,$get_flag_choices['flag-vi']); ?>/> Vietnamese</div>
1282
- <div><input type="checkbox" name="flag_display_settings[flag-cy]" value="1" <?php checked( 1,$get_flag_choices['flag-cy']); ?>/> Welsh</div>
1283
- <div><input type="checkbox" name="flag_display_settings[flag-yi]" value="1" <?php checked( 1,$get_flag_choices['flag-yi']); ?>/> Yiddish</div>
1284
- </div>
1285
- <div style="clear:both"></div>
1286
- <?php }
1287
-
1288
- function googlelanguagetranslator_translatebox_cb() {
1289
-
1290
- $option_name = 'googlelanguagetranslator_translatebox' ;
1291
- $new_value = 'yes';
1292
-
1293
- if ( get_option( $option_name ) === false ) {
1294
-
1295
- // The option does not exist, so we update it.
1296
- update_option( $option_name, $new_value );
1297
- }
1298
-
1299
- $options = get_option (''.$option_name.''); ?>
1300
-
1301
- <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
1302
- <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
1303
- <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
1304
- </select>
1305
- <?php }
1306
-
1307
- function googlelanguagetranslator_display_cb() {
1308
-
1309
- $option_name = 'googlelanguagetranslator_display' ;
1310
- $new_value = 'Vertical';
1311
-
1312
- if ( get_option( $option_name ) === false ) {
1313
-
1314
- // The option does not exist, so we update it.
1315
- update_option( $option_name, $new_value );
1316
- }
1317
-
1318
- $options = get_option (''.$option_name.''); ?>
1319
-
1320
- <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
1321
- <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
1322
- <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
1323
-
1324
- </select>
1325
- <?php }
1326
-
1327
- function googlelanguagetranslator_toolbar_cb() {
1328
-
1329
- $option_name = 'googlelanguagetranslator_toolbar' ;
1330
- $new_value = 'Yes';
1331
-
1332
- if ( get_option( $option_name ) === false ) {
1333
-
1334
- // The option does not exist, so we update it.
1335
- update_option( $option_name, $new_value );
1336
- }
1337
-
1338
- $options = get_option (''.$option_name.''); ?>
1339
-
1340
- <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
1341
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
1342
- <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
1343
- </select>
1344
- <?php }
1345
-
1346
- function googlelanguagetranslator_showbranding_cb() {
1347
-
1348
- $option_name = 'googlelanguagetranslator_showbranding' ;
1349
- $new_value = 'Yes';
1350
-
1351
- if ( get_option( $option_name ) === false ) {
1352
-
1353
- // The option does not exist, so we update it.
1354
- update_option( $option_name, $new_value );
1355
- }
1356
-
1357
- $options = get_option (''.$option_name.''); ?>
1358
-
1359
- <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
1360
- <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
1361
- <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
1362
- </select>
1363
- <?php }
1364
-
1365
- function googlelanguagetranslator_flags_alignment_cb() {
1366
-
1367
- $option_name = 'googlelanguagetranslator_flags_alignment' ;
1368
- $new_value = 'flags_left';
1369
-
1370
- if ( get_option( $option_name ) === false ) {
1371
-
1372
- // The option does not exist, so we update it.
1373
- update_option( $option_name, 'flags_left' );
1374
- }
1375
-
1376
- $options = get_option (''.$option_name.''); ?>
1377
-
1378
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_left" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
1379
- <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_right" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
1380
- <?php }
1381
-
1382
-
1383
- function googlelanguagetranslator_analytics_cb() {
1384
-
1385
- $option_name = 'googlelanguagetranslator_analytics' ;
1386
- $new_value = 0;
1387
-
1388
- if ( get_option( $option_name ) === false ) {
1389
-
1390
- // The option does not exist, so we update it.
1391
- update_option( $option_name, $new_value );
1392
- }
1393
-
1394
- $options = get_option (''.$option_name.'');
1395
-
1396
- $html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Analytics tracking?';
1397
- echo $html;
1398
- }
1399
-
1400
- function googlelanguagetranslator_analytics_id_cb() {
1401
-
1402
- $option_name = 'googlelanguagetranslator_analytics_id' ;
1403
- $new_value = '';
1404
-
1405
- if ( get_option( $option_name ) === false ) {
1406
-
1407
- // The option does not exist, so we update it.
1408
- update_option( $option_name, $new_value );
1409
- }
1410
-
1411
- $options = get_option (''.$option_name.'');
1412
-
1413
- $html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
1414
- echo $html;
1415
- }
1416
-
1417
- function googlelanguagetranslator_css_cb() {
1418
-
1419
- $option_name = 'googlelanguagetranslator_css' ;
1420
- $new_value = '';
1421
-
1422
- if ( get_option( $option_name ) === false ) {
1423
-
1424
- // The option does not exist, so we update it.
1425
- update_option( $option_name, $new_value );
1426
- }
1427
-
1428
- $options = get_option (''.$option_name.'');
1429
-
1430
- $html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
1431
- echo $html;
1432
- }
1433
-
1434
- function googlelanguagetranslator_manage_translations_cb() {
1435
- $option_name = 'googlelanguagetranslator_manage_translations' ;
1436
- $new_value = 0;
1437
-
1438
- if ( get_option( $option_name ) === false ) {
1439
-
1440
- // The option does not exist, so we update it.
1441
- update_option( $option_name, $new_value );
1442
- }
1443
-
1444
- $options = get_option (''.$option_name.'');
1445
-
1446
- $html = '<input type="checkbox" name="googlelanguagetranslator_manage_translations" id="googlelanguagetranslator_manage_translations" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on translation management?';
1447
- echo $html;
1448
- }
1449
-
1450
- function googlelanguagetranslator_multilanguage_cb() {
1451
-
1452
- $option_name = 'googlelanguagetranslator_multilanguage' ;
1453
- $new_value = 0;
1454
-
1455
- if ( get_option( $option_name ) === false ) {
1456
-
1457
- // The option does not exist, so we update it.
1458
- update_option( $option_name, $new_value );
1459
- }
1460
-
1461
- $options = get_option (''.$option_name.'');
1462
-
1463
- $html = '<input type="checkbox" name="googlelanguagetranslator_multilanguage" id="googlelanguagetranslator_multilanguage" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on multilanguage mode?';
1464
- echo $html;
1465
- }
1466
-
1467
-
1468
-
1469
-
1470
- } //End initialize_settings()
1471
- add_action('admin_init', 'initialize_settings');
1472
-
1473
-
1474
- // Functions for frontend display
1475
-
1476
- function googlelanguagetranslator_included_languages() {
1477
- if ( get_option('googlelanguagetranslator_language_option')=='specific') {
1478
- $get_language_choices = get_option ('language_display_settings');
1479
- //print_r($get_language_choices);
1480
-
1481
- foreach ($get_language_choices as $key=>$value) {
1482
- if($value == 1) {
1483
- $items[] = $key;
1484
- }
1485
- }
1486
- $comma_separated = implode(",",array_values($items));
1487
-
1488
- if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
1489
- $lang = 'includedLanguages:\''.$comma_separated.'\',';
1490
- return $lang;
1491
- } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
1492
- $lang = 'includedLanguages:\''.$comma_separated.'\',';
1493
- return $lang;
1494
- }
1495
- }
1496
- }
1497
-
1498
- function analytics() {
1499
- if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
1500
- $analytics_id = get_option('googlelanguagetranslator_analytics_id');
1501
- $analytics = 'gaTrack: true, gaId: \''.$analytics_id.'\'';
1502
- return $analytics;
1503
- }
1504
- }
1505
-
1506
- function googlelanguagetranslator_vertical(){
1507
- $is_active = get_option ( 'googlelanguagetranslator_active' );
1508
- $get_flag_choices = get_option ('flag_display_settings');
1509
- $language_choices = googlelanguagetranslator_included_languages();
1510
-
1511
- if( $is_active == 1){
1512
-
1513
- foreach ($get_flag_choices as $key) {
1514
- //print_r($key);
1515
- }
1516
-
1517
- $str='<div id="flags">';
1518
-
1519
-
1520
-
1521
- if ($key == '1') {
1522
- if ( isset ( $get_flag_choices['flag-af'] ) ) {
1523
- $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>';
1524
- }
1525
-
1526
-
1527
- if ( isset ( $get_flag_choices['flag-sq'] ) ) {
1528
- $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>';
1529
- }
1530
-
1531
- if ( isset ( $get_flag_choices['flag-ar'] ) ) {
1532
- $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>';
1533
- }
1534
-
1535
- if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1536
- $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>';
1537
- }
1538
-
1539
- if ( isset ( $get_flag_choices['flag-az'] ) ) {
1540
- $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>';
1541
- }
1542
-
1543
- if ( isset ( $get_flag_choices['flag-eu'] ) ) {
1544
- $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>';
1545
- }
1546
-
1547
- if ( isset ( $get_flag_choices['flag-be'] ) ) {
1548
- $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>';
1549
- }
1550
-
1551
- if ( isset ( $get_flag_choices['flag-bn'] ) ) {
1552
- $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>';
1553
- }
1554
-
1555
- if ( isset ( $get_flag_choices['flag-bs'] ) ) {
1556
- $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>';
1557
- }
1558
-
1559
- if ( isset ( $get_flag_choices['flag-bg'] ) ) {
1560
- $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>';
1561
- }
1562
-
1563
- if ( isset ( $get_flag_choices['flag-ca'] ) ) {
1564
- $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>';
1565
- }
1566
-
1567
- if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
1568
- $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>';
1569
- }
1570
-
1571
- if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
1572
- $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>';
1573
- }
1574
-
1575
- if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
1576
- $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>';
1577
- }
1578
-
1579
- if ( isset ( $get_flag_choices['flag-cs'] ) ) {
1580
- $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>';
1581
- }
1582
-
1583
- if ( isset ( $get_flag_choices['flag-hr'] ) ) {
1584
- $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>';
1585
- }
1586
-
1587
- if ( isset ( $get_flag_choices['flag-da'] ) ) {
1588
- $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>';
1589
- }
1590
-
1591
- if ( isset ( $get_flag_choices['flag-nl'] ) ) {
1592
- $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>';
1593
- }
1594
-
1595
- if ( isset ( $get_flag_choices['flag-en'] ) ) {
1596
- $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>';
1597
- }
1598
-
1599
- if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1600
- $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>';
1601
- }
1602
-
1603
- if ( isset ( $get_flag_choices['flag-et'] ) ) {
1604
- $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>';
1605
- }
1606
-
1607
- if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1608
- $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>';
1609
- }
1610
-
1611
- if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1612
- $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>';
1613
- }
1614
-
1615
- if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1616
- $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>';
1617
- }
1618
-
1619
- if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1620
- $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>';
1621
- }
1622
-
1623
- if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1624
- $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>';
1625
- }
1626
-
1627
- if ( isset ( $get_flag_choices['flag-de'] ) ) {
1628
- $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>';
1629
- }
1630
-
1631
- if ( isset ( $get_flag_choices['flag-el'] ) ) {
1632
- $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>';
1633
- }
1634
-
1635
- if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1636
- $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>';
1637
- }
1638
-
1639
- if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1640
- $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>';
1641
- }
1642
-
1643
- if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1644
- $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>';
1645
- }
1646
-
1647
- if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1648
- $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>';
1649
- }
1650
-
1651
- if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1652
- $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>';
1653
- }
1654
-
1655
- if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1656
- $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>';
1657
- }
1658
-
1659
- if ( isset ( $get_flag_choices['flag-is'] ) ) {
1660
- $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>';
1661
- }
1662
-
1663
- if ( isset ( $get_flag_choices['flag-id'] ) ) {
1664
- $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>';
1665
- }
1666
-
1667
- if ( isset ( $get_flag_choices['flag-ga'] ) ) {
1668
- $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>';
1669
- }
1670
-
1671
- if ( isset ( $get_flag_choices['flag-it'] ) ) {
1672
- $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>';
1673
- }
1674
-
1675
- if ( isset ( $get_flag_choices['flag-ja'] ) ) {
1676
- $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>';
1677
- }
1678
-
1679
- if ( isset ( $get_flag_choices['flag-jw'] ) ) {
1680
- $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>';
1681
- }
1682
-
1683
- if ( isset ( $get_flag_choices['flag-kn'] ) ) {
1684
- $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>';
1685
- }
1686
-
1687
- if ( isset ( $get_flag_choices['flag-km'] ) ) {
1688
- $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>';
1689
- }
1690
-
1691
- if ( isset ( $get_flag_choices['flag-ko'] ) ) {
1692
- $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>';
1693
- }
1694
-
1695
- if ( isset ( $get_flag_choices['flag-lo'] ) ) {
1696
- $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>';
1697
- }
1698
-
1699
- if ( isset ( $get_flag_choices['flag-la'] ) ) {
1700
- $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>';
1701
- }
1702
-
1703
- if ( isset ( $get_flag_choices['flag-lv'] ) ) {
1704
- $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>';
1705
- }
1706
-
1707
- if ( isset ( $get_flag_choices['flag-lt'] ) ) {
1708
- $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>';
1709
- }
1710
-
1711
- if ( isset ( $get_flag_choices['flag-mk'] ) ) {
1712
- $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>';
1713
- }
1714
-
1715
- if ( isset ( $get_flag_choices['flag-ms'] ) ) {
1716
- $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>';
1717
- }
1718
-
1719
- if ( isset ( $get_flag_choices['flag-mt'] ) ) {
1720
- $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>';
1721
- }
1722
-
1723
- if ( isset ( $get_flag_choices['flag-mr'] ) ) {
1724
- $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>';
1725
- }
1726
-
1727
- if ( isset ( $get_flag_choices['flag-no'] ) ) {
1728
- $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>';
1729
- }
1730
-
1731
- if ( isset ( $get_flag_choices['flag-fa'] ) ) {
1732
- $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>';
1733
- }
1734
-
1735
- if ( isset ( $get_flag_choices['flag-pl'] ) ) {
1736
- $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>';
1737
- }
1738
-
1739
- if ( isset ( $get_flag_choices['flag-pt'] ) ) {
1740
- $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>';
1741
- }
1742
-
1743
- if ( isset ( $get_flag_choices['flag-ro'] ) ) {
1744
- $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>';
1745
- }
1746
-
1747
- if ( isset ( $get_flag_choices['flag-ru'] ) ) {
1748
- $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>';
1749
- }
1750
-
1751
- if ( isset ( $get_flag_choices['flag-sr'] ) ) {
1752
- $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>';
1753
- }
1754
-
1755
- if ( isset ( $get_flag_choices['flag-sk'] ) ) {
1756
- $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>';
1757
- }
1758
-
1759
- if ( isset ( $get_flag_choices['flag-sl'] ) ) {
1760
- $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>';
1761
- }
1762
-
1763
- if ( isset ( $get_flag_choices['flag-es'] ) ) {
1764
- $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>';
1765
- }
1766
-
1767
- if ( isset ( $get_flag_choices['flag-sw'] ) ) {
1768
- $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>';
1769
- }
1770
-
1771
- if ( isset ( $get_flag_choices['flag-sv'] ) ) {
1772
- $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>';
1773
- }
1774
-
1775
- if ( isset ( $get_flag_choices['flag-ta'] ) ) {
1776
- $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>';
1777
- }
1778
-
1779
- if ( isset ( $get_flag_choices['flag-te'] ) ) {
1780
- $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>';
1781
- }
1782
-
1783
- if ( isset ( $get_flag_choices['flag-th'] ) ) {
1784
- $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>';
1785
- }
1786
-
1787
- if ( isset ( $get_flag_choices['flag-tr'] ) ) {
1788
- $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>';
1789
- }
1790
-
1791
- if ( isset ( $get_flag_choices['flag-uk'] ) ) {
1792
- $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>';
1793
- }
1794
-
1795
- if ( isset ( $get_flag_choices['flag-ur'] ) ) {
1796
- $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>';
1797
- }
1798
-
1799
- if ( isset ( $get_flag_choices['flag-vi'] ) ) {
1800
- $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>';
1801
- }
1802
-
1803
- if ( isset ( $get_flag_choices['flag-cy'] ) ) {
1804
- $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>';
1805
- }
1806
-
1807
- if ( isset ( $get_flag_choices['flag-yi'] ) ) {
1808
- $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>';
1809
- }
1810
-
1811
-
1812
- $str.='</div>';
1813
-
1814
- $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
1815
-
1816
- if ($is_multilanguage == 1) {
1817
- $multilanguagePage = 'multilanguagePage:true,';
1818
-
1819
- $str.='<script type="text/javascript">
1820
- function GoogleLanguageTranslatorInit() {
1821
- new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\','.$multilanguagePage . $language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
1822
- </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
1823
- <div id="google_language_translator"></div>';
1824
- return $str;
1825
- } elseif ($is_multilanguage == 0) {
1826
-
1827
- $str.='<script type="text/javascript">
1828
- function GoogleLanguageTranslatorInit() {
1829
- new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\','.$language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
1830
- </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
1831
- <div id="google_language_translator"></div>';
1832
- return $str;
1833
- }
1834
-
1835
- }
1836
- }
1837
- }
1838
-
1839
- function googlelanguagetranslator_horizontal(){
1840
- $is_active = get_option ( 'googlelanguagetranslator_active' );
1841
- $get_flag_choices = get_option ('flag_display_settings');
1842
- $language_choices = googlelanguagetranslator_included_languages();
1843
-
1844
-
1845
- if( $is_active == 1){
1846
-
1847
- foreach ($get_flag_choices as $key) {
1848
- //print_r($key);
1849
-
1850
-
1851
- }
1852
-
1853
- $str.='<div id="flags">';
1854
-
1855
-
1856
-
1857
- if ($key == '1') {
1858
- if ( isset ( $get_flag_choices['flag-af'] ) ) {
1859
- $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>';
1860
- }
1861
- if ( isset ( $get_flag_choices['flag-sq'] ) ) {
1862
- $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>';
1863
- }
1864
-
1865
- if ( isset ( $get_flag_choices['flag-ar'] ) ) {
1866
- $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>';
1867
- }
1868
-
1869
- if ( isset ( $get_flag_choices['flag-hy'] ) ) {
1870
- $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>';
1871
- }
1872
-
1873
- if ( isset ( $get_flag_choices['flag-az'] ) ) {
1874
- $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>';
1875
- }
1876
-
1877
- if ( isset ( $get_flag_choices['flag-eu'] ) ) {
1878
- $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>';
1879
- }
1880
-
1881
- if ( isset ( $get_flag_choices['flag-be'] ) ) {
1882
- $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>';
1883
- }
1884
-
1885
- if ( isset ( $get_flag_choices['flag-bn'] ) ) {
1886
- $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>';
1887
- }
1888
-
1889
- if ( isset ( $get_flag_choices['flag-bs'] ) ) {
1890
- $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>';
1891
- }
1892
-
1893
- if ( isset ( $get_flag_choices['flag-bg'] ) ) {
1894
- $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>';
1895
- }
1896
-
1897
- if ( isset ( $get_flag_choices['flag-ca'] ) ) {
1898
- $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>';
1899
- }
1900
-
1901
- if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
1902
- $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>';
1903
- }
1904
-
1905
- if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
1906
- $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>';
1907
- }
1908
-
1909
- if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
1910
- $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>';
1911
- }
1912
-
1913
- if ( isset ( $get_flag_choices['flag-cs'] ) ) {
1914
- $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>';
1915
- }
1916
-
1917
- if ( isset ( $get_flag_choices['flag-hr'] ) ) {
1918
- $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>';
1919
- }
1920
-
1921
- if ( isset ( $get_flag_choices['flag-da'] ) ) {
1922
- $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>';
1923
- }
1924
-
1925
- if ( isset ( $get_flag_choices['flag-nl'] ) ) {
1926
- $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>';
1927
- }
1928
-
1929
- if ( isset ( $get_flag_choices['flag-en'] ) ) {
1930
- $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>';
1931
- }
1932
-
1933
- if ( isset ( $get_flag_choices['flag-eo'] ) ) {
1934
- $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>';
1935
- }
1936
-
1937
- if ( isset ( $get_flag_choices['flag-et'] ) ) {
1938
- $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>';
1939
- }
1940
-
1941
- if ( isset ( $get_flag_choices['flag-tl'] ) ) {
1942
- $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>';
1943
- }
1944
-
1945
- if ( isset ( $get_flag_choices['flag-fi'] ) ) {
1946
- $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>';
1947
- }
1948
-
1949
- if ( isset ( $get_flag_choices['flag-fr'] ) ) {
1950
- $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>';
1951
- }
1952
-
1953
- if ( isset ( $get_flag_choices['flag-gl'] ) ) {
1954
- $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>';
1955
- }
1956
-
1957
- if ( isset ( $get_flag_choices['flag-ka'] ) ) {
1958
- $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>';
1959
- }
1960
-
1961
- if ( isset ( $get_flag_choices['flag-de'] ) ) {
1962
- $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>';
1963
- }
1964
-
1965
- if ( isset ( $get_flag_choices['flag-el'] ) ) {
1966
- $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>';
1967
- }
1968
-
1969
- if ( isset ( $get_flag_choices['flag-gu'] ) ) {
1970
- $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>';
1971
- }
1972
-
1973
- if ( isset ( $get_flag_choices['flag-ht'] ) ) {
1974
- $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>';
1975
- }
1976
-
1977
- if ( isset ( $get_flag_choices['flag-iw'] ) ) {
1978
- $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>';
1979
- }
1980
-
1981
- if ( isset ( $get_flag_choices['flag-hi'] ) ) {
1982
- $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>';
1983
- }
1984
-
1985
- if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
1986
- $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>';
1987
- }
1988
-
1989
- if ( isset ( $get_flag_choices['flag-hu'] ) ) {
1990
- $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>';
1991
- }
1992
-
1993
- if ( isset ( $get_flag_choices['flag-is'] ) ) {
1994
- $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>';
1995
- }
1996
-
1997
- if ( isset ( $get_flag_choices['flag-id'] ) ) {
1998
- $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>';
1999
- }
2000
-
2001
- if ( isset ( $get_flag_choices['flag-ga'] ) ) {
2002
- $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>';
2003
- }
2004
-
2005
- if ( isset ( $get_flag_choices['flag-it'] ) ) {
2006
- $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>';
2007
- }
2008
-
2009
- if ( isset ( $get_flag_choices['flag-ja'] ) ) {
2010
- $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>';
2011
- }
2012
-
2013
- if ( isset ( $get_flag_choices['flag-jw'] ) ) {
2014
- $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>';
2015
- }
2016
-
2017
- if ( isset ( $get_flag_choices['flag-kn'] ) ) {
2018
- $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>';
2019
- }
2020
-
2021
- if ( isset ( $get_flag_choices['flag-km'] ) ) {
2022
- $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>';
2023
- }
2024
-
2025
- if ( isset ( $get_flag_choices['flag-ko'] ) ) {
2026
- $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>';
2027
- }
2028
-
2029
- if ( isset ( $get_flag_choices['flag-lo'] ) ) {
2030
- $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>';
2031
- }
2032
-
2033
- if ( isset ( $get_flag_choices['flag-la'] ) ) {
2034
- $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>';
2035
- }
2036
-
2037
- if ( isset ( $get_flag_choices['flag-lv'] ) ) {
2038
- $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>';
2039
- }
2040
-
2041
- if ( isset ( $get_flag_choices['flag-lt'] ) ) {
2042
- $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>';
2043
- }
2044
-
2045
- if ( isset ( $get_flag_choices['flag-mk'] ) ) {
2046
- $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>';
2047
- }
2048
-
2049
- if ( isset ( $get_flag_choices['flag-ms'] ) ) {
2050
- $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>';
2051
- }
2052
-
2053
- if ( isset ( $get_flag_choices['flag-mt'] ) ) {
2054
- $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>';
2055
- }
2056
-
2057
- if ( isset ( $get_flag_choices['flag-mr'] ) ) {
2058
- $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>';
2059
- }
2060
-
2061
- if ( isset ( $get_flag_choices['flag-no'] ) ) {
2062
- $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>';
2063
- }
2064
-
2065
- if ( isset ( $get_flag_choices['flag-fa'] ) ) {
2066
- $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>';
2067
- }
2068
-
2069
- if ( isset ( $get_flag_choices['flag-pl'] ) ) {
2070
- $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>';
2071
- }
2072
-
2073
- if ( isset ( $get_flag_choices['flag-pt'] ) ) {
2074
- $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>';
2075
- }
2076
-
2077
- if ( isset ( $get_flag_choices['flag-ro'] ) ) {
2078
- $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>';
2079
- }
2080
-
2081
- if ( isset ( $get_flag_choices['flag-ru'] ) ) {
2082
- $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>';
2083
- }
2084
-
2085
- if ( isset ( $get_flag_choices['flag-sr'] ) ) {
2086
- $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>';
2087
- }
2088
-
2089
- if ( isset ( $get_flag_choices['flag-sk'] ) ) {
2090
- $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>';
2091
- }
2092
-
2093
- if ( isset ( $get_flag_choices['flag-sl'] ) ) {
2094
- $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>';
2095
- }
2096
-
2097
- if ( isset ( $get_flag_choices['flag-es'] ) ) {
2098
- $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>';
2099
- }
2100
-
2101
- if ( isset ( $get_flag_choices['flag-sw'] ) ) {
2102
- $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>';
2103
- }
2104
-
2105
- if ( isset ( $get_flag_choices['flag-sv'] ) ) {
2106
- $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>';
2107
- }
2108
-
2109
- if ( isset ( $get_flag_choices['flag-ta'] ) ) {
2110
- $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>';
2111
- }
2112
-
2113
- if ( isset ( $get_flag_choices['flag-te'] ) ) {
2114
- $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>';
2115
- }
2116
-
2117
- if ( isset ( $get_flag_choices['flag-th'] ) ) {
2118
- $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>';
2119
- }
2120
-
2121
- if ( isset ( $get_flag_choices['flag-tr'] ) ) {
2122
- $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>';
2123
- }
2124
-
2125
- if ( isset ( $get_flag_choices['flag-uk'] ) ) {
2126
- $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>';
2127
- }
2128
-
2129
- if ( isset ( $get_flag_choices['flag-ur'] ) ) {
2130
- $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>';
2131
- }
2132
-
2133
- if ( isset ( $get_flag_choices['flag-vi'] ) ) {
2134
- $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>';
2135
- }
2136
-
2137
- if ( isset ( $get_flag_choices['flag-cy'] ) ) {
2138
- $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>';
2139
- }
2140
-
2141
- if ( isset ( $get_flag_choices['flag-yi'] ) ) {
2142
- $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>';
2143
- }
2144
- $str.='</div>';
2145
-
2146
- $is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
2147
-
2148
- if ($is_multilanguage == 1) {
2149
- $multilanguagePage = 'multilanguagePage:true,';
2150
-
2151
- $str.='<script type="text/javascript">
2152
- function GoogleLanguageTranslatorInit() {
2153
- new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,'.$multilanguagePage . $language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
2154
- </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
2155
- <div id="google_language_translator"></div>';
2156
- return $str;
2157
- } elseif ($is_multilanguage == 0) {
2158
-
2159
- $str.='<script type="text/javascript">
2160
- function GoogleLanguageTranslatorInit() {
2161
- new google.translate.TranslateElement({pageLanguage: \''.get_option('googlelanguagetranslator_language').'\',layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL,'.$language_choices.'autoDisplay: false, '.analytics().' }, \'google_language_translator\');}
2162
- </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit"></script>
2163
- <div id="google_language_translator"></div>';
2164
- return $str;
2165
- }
2166
-
2167
- }
2168
- }
2169
- }
2170
-
2171
- function googlelanguagetranslator_toolbar_yes(){
2172
- if(get_option('googlelanguagetranslator_active')==1) { ?>
2173
- <style type="text/css">
2174
- #google_language_translator {color: transparent;}
2175
- .goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
2176
- body { top:0px !important; }
2177
- </style>
2178
- <?php
2179
- }
2180
- }
2181
-
2182
- function googlelanguagetranslator_toolbar_no(){
2183
- if(get_option('googlelanguagetranslator_active')==1) { ?>
2184
- <style type="text/css">
2185
- .goog-te-banner-frame{visibility:hidden !important;}
2186
- body { top:0px !important;}
2187
- .goog-te-banner-frame,.skiptranslate { width:100%; height:0px; }
2188
- </style>
2189
- <?php
2190
- }
2191
- }
2192
-
2193
-
2194
- function googlelanguagetranslator_showbranding_yes() {
2195
- if(get_option('googlelanguagetranslator_active')==1) { ?>
2196
- <style type="text/css">
2197
- #google_language_translator { width:auto !important; }
2198
- .goog-te-gadget .goog-te-combo {margin: 4px 0px !important;}
2199
- </style>
2200
- <?php
2201
- }
2202
- }
2203
-
2204
- function googlelanguagetranslator_flags() {
2205
- if(get_option('googlelanguagetranslator_active') ==1) { ?>
2206
- <style type="text/css">
2207
- #flags { display:none; }
2208
- </style>
2209
- <?php
2210
- }
2211
- }
2212
-
2213
- function googlelanguagetranslator_translatebox() {
2214
- if(get_option('googlelanguagetranslator_active') ==1) { ?>
2215
- <style type="text/css">
2216
- #google_language_translator { display:none; }
2217
- </style>
2218
- <?php
2219
- }
2220
- }
2221
-
2222
- function googlelanguagetranslator_showbranding_no() {
2223
- if(get_option('googlelanguagetranslator_active')==1) { ?>
2224
- <style type="text/css">
2225
- #google_language_translator a {display: none !important; }
2226
- .goog-te-gadget {color:transparent !important;}
2227
- <?php if (get_option('googlelanguagetranslator_theme_style')=='elegant') { ?>
2228
- a.goog-logo-link { display:none; }
2229
- <?php } ?>
2230
- .goog-te-gadget { font-size:0px !important; }
2231
- .goog-te-gadget .goog-te-combo {margin: 2px 0px !important;}
2232
- .goog-tooltip {display: none !important;}
2233
- .goog-tooltip:hover {display: none !important;}
2234
- .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
2235
- .goog-branding { display:none; }
2236
- </style>
2237
- <?php
2238
- }
2239
- }
2240
-
2241
- function googlelanguagetranslator_manage_translations_no() {
2242
- if(get_option('googlelanguagetranslator_active')==1) { ?>
2243
- <style type="text/css">
2244
- .goog-tooltip {display: none !important;}
2245
- .goog-tooltip:hover {display: none !important;}
2246
- .goog-text-highlight {background-color: transparent !important; border: none !important; box-shadow: none !important;}
2247
- </style>
2248
- <?php
2249
- }
2250
- }
2251
-
2252
- function googlelanguagetranslator_flags_display() {
2253
- $options = get_option ('googlelanguagetranslator_flag_size'); ?>
2254
-
2255
- <style type="text/css">
2256
-
2257
- <?php if(get_option('googlelanguagetranslator_display')=='Vertical') { ?>
2258
- <?php if (get_option('googlelanguagetranslator_language_option')=='specific') { ?>
2259
- #flags {display:none !important; }
2260
- <?php } ?>
2261
- p.hello { font-size:12px; color:darkgray; }
2262
- <?php } elseif (get_option('googlelanguagetranslator_display')=='Horizontal') { ?>
2263
- <?php if (get_option('googlelanguagetranslator_language_option')=='specific') { ?>
2264
- #flags {display:none !important; }
2265
- <?php } ?>
2266
- <?php if (get_option('googlelanguagetranslator_flags_alignment')=='flags_right') { ?>
2267
- #google_language_translator { text-align:left !important; }
2268
- select.goog-te-combo { float:right; }
2269
- .goog-te-gadget { padding-top:13px; }
2270
- .goog-te-gadget .goog-te-combo { margin-top:-7px !important; }
2271
- <?php } ?>
2272
- .goog-te-gadget { margin-top:2px !important; }
2273
- p.hello { font-size:12px; color:#666; }
2274
- <?php } ?>
2275
- <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
2276
- #google_language_translator, #language { clear:both; width:auto !important; text-align:right; }
2277
- #language { float:right; }
2278
- #flags { text-align:right; width:165px; float:right; clear:right; }
2279
- p.hello { text-align:right; float:right; clear:both; }
2280
- .glt-clear { height:0px; clear:both; margin:0px; padding:0px; }
2281
- <?php } ?>
2282
- <?php if ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_left') { ?>
2283
- #google_language_translator { clear:both; }
2284
- #flags { width:165px; }
2285
- #flags a { display:inline-block; margin-right:2px; }
2286
-
2287
-
2288
-
2289
- }
2290
- <?php } elseif ( get_option ('googlelanguagetranslator_flags_alignment') == 'flags_right') { ?>
2291
- #flags { width:165px; }
2292
- #flags a { display:inline-block; margin-left:2px; }
2293
- <?php } ?>
2294
-
2295
-
2296
- </style>
2297
-
2298
-
2299
- <?php
2300
-
2301
- }
2302
- add_action('wp_head','googlelanguagetranslator_flags_display');
2303
-
2304
  ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: Google Language Translator
4
+ Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 3.0.3
6
+ Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
+ Author: Rob Myrick
8
+ Author URI: http://www.studio88design.com/
9
+ */
10
+
11
+ register_activation_hook( __FILE__, 'glt_activate' );
12
+
13
+ include( plugin_dir_path( __FILE__ ) . 'glt_activate.php');
14
+
15
+ include( plugin_dir_path( __FILE__ ) . 'glt_scripts.php');
16
+
17
+ include( plugin_dir_path( __FILE__ ) . 'glt_widget.php');
18
+
19
+ include( plugin_dir_path( __FILE__ ) . 'glt_horizontal.php');
20
+
21
+ include( plugin_dir_path( __FILE__ ) . 'glt_vertical.php');
22
+
23
+ function load_css() {
24
+ include( plugin_dir_path( __FILE__ ) . 'glt_css.php');
25
+ }
26
+ add_action('wp_head','load_css');
27
+ add_action('admin_head','load_css');
28
+
29
+ function google_translator_shortcode() {
30
+ if (get_option('googlelanguagetranslator_display')=='Vertical'){
31
+ return googlelanguagetranslator_vertical();
32
+ }
33
+
34
+ elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
35
+ return googlelanguagetranslator_horizontal();
36
+ }
37
+
38
+ }
39
+
40
+ add_shortcode( 'google-translator', 'google_translator_shortcode');
41
+
42
+ add_filter('widget_text', 'do_shortcode');
43
+
44
+ function page_layout_cb() { ?>
45
+ <div class="wrap">
46
+ <div id="icon-options-general" class="icon32"></div>
47
+ <h2><span class="notranslate">Google Language Translator</span></h2>
48
+ <form action="<?php echo admin_url('options.php'); ?>" method="post">
49
+ <div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
50
+ <div class="postbox" style="width: 100%">
51
+ <h3 class="notranslate">Settings</h3>
52
+
53
+ <?php settings_fields('google_language_translator'); ?>
54
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
55
+ <tr>
56
+ <td style="width:60%" class="notranslate">Plugin Status:</td>
57
+ <td class="notranslate"><?php googlelanguagetranslator_active_cb(); ?></td>
58
+ </tr>
59
+
60
+ <tr class="notranslate">
61
+ <td>Choose the original language of your website</td>
62
+ <td><?php googlelanguagetranslator_language_cb(); ?></td>
63
+ </tr>
64
+
65
+ <tr class="notranslate">
66
+ <td>What translation languages will you display to website visitors?<br/>(Note: To show flags you must choose "All Languages")</td>
67
+ <td><?php googlelanguagetranslator_language_option_cb(); ?></td>
68
+ </tr>
69
+
70
+ <tr class="notranslate">
71
+ <td colspan="2"><?php language_display_settings_cb(); ?></td>
72
+ </tr>
73
+
74
+ <tr class="notranslate">
75
+ <td class="choose_flags_intro">Show flag images?<br/>(Display up to 72 flags above the translator)</td>
76
+ <td class="choose_flags_intro"><?php googlelanguagetranslator_flags_cb(); ?></td>
77
+ </tr>
78
+
79
+ <tr class="notranslate">
80
+ <td class="choose_flags">Choose the flags you want to display:</td>
81
+ <td></td>
82
+ </tr>
83
+
84
+ <tr class="notranslate">
85
+ <td colspan="2" class="choose_flags"><?php flag_display_settings_cb(); ?></td>
86
+ </tr>
87
+
88
+ <tr class="notranslate">
89
+ <td>Show translate box?</td>
90
+ <td><?php googlelanguagetranslator_translatebox_cb(); ?></td>
91
+ </tr>
92
+
93
+ <tr class="notranslate">
94
+ <td>Layout options:</td>
95
+ <td><?php googlelanguagetranslator_display_cb(); ?></td>
96
+ </tr>
97
+
98
+ <tr class="notranslate">
99
+ <td>Show Google Toolbar?</td>
100
+ <td><?php googlelanguagetranslator_toolbar_cb(); ?></td>
101
+ </tr>
102
+
103
+ <tr class="notranslate">
104
+ <td>Show Google Branding?<br/>
105
+ <span>(<a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a> about Google's Attribution Requirements.)</span>
106
+ </td>
107
+ <td><?php googlelanguagetranslator_showbranding_cb(); ?></td>
108
+ </tr>
109
+
110
+ <tr class="alignment notranslate">
111
+ <td class="flagdisplay">Align the translator left or right?</td>
112
+ <td class="flagdisplay"><?php googlelanguagetranslator_flags_alignment_cb(); ?></td>
113
+ </tr>
114
+
115
+ <tr class="manage_translations notranslate">
116
+ <td>Turn on translation management?<br/>(Managed directly through your Google account. Requires <a href="http://translate.google.com/manager/website/settings" target="_blank">Google Translate</a> meta tag installed in header.)</td>
117
+ <td><?php googlelanguagetranslator_manage_translations_cb(); ?></td>
118
+ </tr>
119
+
120
+ <tr class="multilanguage notranslate">
121
+ <td>Multilanguage Page Option?: (<em>not recommended)</em><br/>(If checked, a "forced" translation of your webpage will be served when returned to the default language, instead of delivering original content.)</td>
122
+ <td><?php googlelanguagetranslator_multilanguage_cb(); ?></td>
123
+ </tr>
124
+
125
+ <tr class="notranslate">
126
+ <td>Google Analytics:</td>
127
+ <td><?php googlelanguagetranslator_analytics_cb(); ?></td>
128
+ </tr>
129
+
130
+ <tr class="analytics notranslate">
131
+ <td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
132
+ <td><?php googlelanguagetranslator_analytics_id_cb(); ?></td>
133
+ </tr>
134
+
135
+ <tr class="notranslate">
136
+ <td>Copy/Paste this shortcode if adding to pages/posts:</td>
137
+ <td>[google-translator]</td>
138
+ </tr>
139
+ </table>
140
+
141
+ <table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
142
+ <tr class="notranslate">
143
+ <td>Copy/Paste this code if adding to header/footer:</td>
144
+ <td>&lt?php echo do_shortcode('[google-translator]'); ?&gt</td>
145
+ </tr>
146
+
147
+ <tr class="notranslate">
148
+ <td><?php submit_button(); ?></td>
149
+ <td></td>
150
+ </tr>
151
+ </table>
152
+
153
+ </div> <!-- .postbox -->
154
+ </div> <!-- .metbox-holder -->
155
+
156
+ <div class="metabox-holder" style="float:right; clear:right; width:33%">
157
+ <div class="postbox">
158
+ <h3 class="notranslate">Preview</h3>
159
+ <table style="width:100%">
160
+ <tr>
161
+ <td style="height:80px; box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span> &nbsp; <span>Hello</span></p></td>
162
+ </tr>
163
+ </table>
164
+ </div> <!-- .postbox -->
165
+ </div> <!-- .metabox-holder -->
166
+
167
+
168
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
169
+ <div class="postbox">
170
+ <h3>Add CSS Styles</h3>
171
+ <div class="inside">
172
+ <p>You can apply any necessary CSS styles below:</p>
173
+ <?php googlelanguagetranslator_css_cb(); ?>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ </form>
178
+
179
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
180
+ <div class="postbox">
181
+ <h3>GLT Premium is Here! $12</h3>
182
+ <div class="inside"><a href="http://www.wp-studio.net/" target="_blank"><img style="background:#444; border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px" src="<?php echo plugins_url('google-language-translator/images/logo.png'); ?>"></a><br />
183
+ <ul id="features">
184
+ <li>Get more design and functionality options</li>
185
+ <li>Loads directly with page content, not afterward</li>
186
+ <li>jQuery-powered "Elegant" theme to engage your visitors</li>
187
+ <li>Manage your website's translations</li>
188
+ <li>Show or hide any features you want</li>
189
+ <li>Full access to our support forum</li>
190
+ <li>Full access to future updates, for life of the plugin</li>
191
+ </ul>
192
+ </div>
193
+ </div>
194
+ </div>
195
+
196
+ <div class="metabox-holder notranslate" style="float: right; width: 33%;">
197
+ <div class="postbox">
198
+ <h3>Please Consider A Donation</h3>
199
+ <div class="inside">If you like this plugin and find it useful, help keep this plugin actively developed by clicking the donate button <br /><br />
200
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
201
+ <input type="hidden" name="cmd" value="_donations">
202
+ <input type="hidden" name="business" value="robertmyrick@hotmail.com">
203
+ <input type="hidden" name="lc" value="US">
204
+ <input type="hidden" name="item_name" value="Support Studio 88 Design and help us bring you more Wordpress goodies! Any donation is kindly appreciated. Thank you!">
205
+ <input type="hidden" name="no_note" value="0">
206
+ <input type="hidden" name="currency_code" value="USD">
207
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
208
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
209
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
210
+ </form>
211
+
212
+ <br />
213
+ <br />
214
+ </div>
215
+ </div>
216
+ </div>
217
+ </div> <!-- .wrap -->
218
+ <?php
219
+ }
220
+
221
+
222
+ /* ------------------------------------------------------------------------ *
223
+ * Setting Registration
224
+ * ------------------------------------------------------------------------ */
225
+
226
+
227
+ function initialize_settings() {
228
+
229
+ // First, we register a section. This is necessary since all future options must belong to one.
230
+ add_settings_section(
231
+ 'glt_settings', // ID used to identify this section and with which to register options
232
+ 'Settings', // Title to be displayed on the administration page
233
+ '', // Callback used to render the description of the section
234
+ 'google_language_translator' // Page on which to add this section of options
235
+ );
236
+
237
+
238
+
239
+
240
+
241
+ //Fieldset 1
242
+ add_settings_field( 'googlelanguagetranslator_active','Plugin status:','googlelanguagetranslator_active_cb','google_language_translator','glt_settings');
243
+ add_settings_field( 'googlelanguagetranslator_language','Choose the original language of your website','','googlelanguagetranslator_language_cb','glt_settings');
244
+ add_settings_field( 'googlelanguagetranslator_language_option','What translation languages will you display to website visitors?','googlelanguagetranslator_language_option_cb','google_language_translator','glt_settings');
245
+ add_settings_field( 'language_display_settings','Your language choices','language_display_settings_cb','google_language_translator','glt_settings');
246
+ add_settings_field( 'googlelanguagetranslator_flags','Show Flag Images?','googlelanguagetranslator_flags_cb','google_language_translator','glt_settings');
247
+ add_settings_field( 'flag_display_settings','Flag Options','flag_display_settings_cb','google_language_translator','glt_settings');
248
+ add_settings_field( 'googlelanguagetranslator_translatebox','Show Translate Box?','googlelanguagetranslator_translatebox_cb','google_language_translator','glt_settings');
249
+ add_settings_field( 'googlelanguagetranslator_display', 'Layout Options','googlelanguagetranslator_display_cb','google_language_translator','glt_settings');
250
+ add_settings_field( 'googlelanguagetranslator_toolbar', 'Show Toolbar','googlelanguagetranslator_toolbar_cb','google_language_translator','glt_settings');
251
+ add_settings_field( 'googlelanguagetranslator_showbranding', 'Show Google Branding','googlelanguagetranslator_showbranding_cb','google_language_translator','glt_settings');
252
+ add_settings_field( 'googlelanguagetranslator_flags_alignment', 'Align Flags Right or Left', 'googlelanguagetranslator_flags_alignment_cb','google_language_translator','glt_settings');
253
+ add_settings_field( 'googlelanguagetranslator_analytics','Activate Google Analytics tracking?','googlelanguagetranslator_analytics_cb','google_language_translator','glt_settings');
254
+ add_settings_field( 'googlelanguagetranslator_analytics_id','Enter your Google Analytics ID','googlelanguagetranslator_analytics_id_cb','google_language_translator','glt_settings');
255
+ add_settings_field( 'googlelanguagetranslator_css','Custom CSS Overrides','googlelanguagetranslator_css_cb','google_language_translator','glt_settings');
256
+ add_settings_field( 'googlelanguagetranslator_manage_translations','Turn on translation management?','googlelanguagetranslator_manage_translations_cb','google_language_translator','glt_settings');
257
+ add_settings_field( 'googlelanguagetranslator_multilanguage','Multilanguage webpages?','googlelanguagetranslator_multilanguage_cb','google_language_translator','glt_settings');
258
+
259
+
260
+
261
+ //Register Fieldset 1
262
+ register_setting( 'google_language_translator','googlelanguagetranslator_active');
263
+ register_setting( 'google_language_translator','googlelanguagetranslator_language');
264
+ register_setting( 'google_language_translator','googlelanguagetranslator_language_option');
265
+ register_setting( 'google_language_translator','language_display_settings');
266
+ register_setting( 'google_language_translator','googlelanguagetranslator_flags');
267
+ register_setting( 'google_language_translator','flag_display_settings');
268
+ register_setting( 'google_language_translator','googlelanguagetranslator_translatebox');
269
+ register_setting( 'google_language_translator','googlelanguagetranslator_display');
270
+ register_setting( 'google_language_translator','googlelanguagetranslator_toolbar');
271
+ register_setting( 'google_language_translator','googlelanguagetranslator_showbranding');
272
+ register_setting( 'google_language_translator','googlelanguagetranslator_flags_alignment');
273
+ register_setting( 'google_language_translator','googlelanguagetranslator_disable_mootools');
274
+ register_setting( 'google_language_translator','googlelanguagetranslator_disable_modal');
275
+ register_setting( 'google_language_translator','googlelanguagetranslator_analytics');
276
+ register_setting( 'google_language_translator','googlelanguagetranslator_analytics_id');
277
+ register_setting( 'google_language_translator','googlelanguagetranslator_css');
278
+ register_setting( 'google_language_translator','googlelanguagetranslator_manage_translations');
279
+ register_setting( 'google_language_translator','googlelanguagetranslator_multilanguage');
280
+
281
+ function googlelanguagetranslator_active_cb() {
282
+
283
+ $option_name = 'googlelanguagetranslator_active' ;
284
+ $new_value = 1;
285
+
286
+ if ( get_option( $option_name ) === false ) {
287
+
288
+ // The option does not exist, so we update it.
289
+ update_option( $option_name, $new_value );
290
+ }
291
+
292
+ $options = get_option (''.$option_name.'');
293
+
294
+ $html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Language Translator?';
295
+ echo $html;
296
+ }
297
+
298
+ function googlelanguagetranslator_language_cb() {
299
+
300
+ $option_name = 'googlelanguagetranslator_language';
301
+ $new_value = 'en';
302
+
303
+ if ( get_option( $option_name ) === false ) {
304
+
305
+ // The option does not exist, so we update it.
306
+ update_option( $option_name, $new_value );
307
+ }
308
+
309
+ $options = get_option (''.$option_name.''); ?>
310
+ <select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
311
+ <option value="af" <?php if($options=='af'){echo "selected";}?>>Afrikaans</option>
312
+ <option value="sq" <?php if($options=='sq'){echo "selected";}?>>Albanian</option>
313
+ <option value="ar" <?php if($options=='ar'){echo "selected";}?>>Arabic</option>
314
+ <option value="hy" <?php if($options=='hy'){echo "selected";}?>>Armenian</option>
315
+ <option value="az" <?php if($options=='az'){echo "selected";}?>>Azerbaijani</option>
316
+ <option value="eu" <?php if($options=='eu'){echo "selected";}?>>Basque</option>
317
+ <option value="be" <?php if($options=='be'){echo "selected";}?>>Belarusian</option>
318
+ <option value="bn" <?php if($options=='bn'){echo "selected";}?>>Bengali</option>
319
+ <option value="bs" <?php if($options=='bs'){echo "selected";}?>>Bosnian</option>
320
+ <option value="bg" <?php if($options=='bg'){echo "selected";}?>>Bulgarian</option>
321
+ <option value="ca" <?php if($options=='ca'){echo "selected";}?>>Catalan</option>
322
+ <option value="ceb" <?php if($options=='ceb'){echo "selected";}?>>Cebuano</option>
323
+ <option value="zh-CN" <?php if($options=='zh-CN'){echo "selected";}?>>Chinese</option>
324
+ <option value="zh-TW" <?php if($options=='zh-TW'){echo "selected";}?>>Chinese (Han)</option>
325
+ <option value="hr" <?php if($options=='hr'){echo "selected";}?>>Croatian</option>
326
+ <option value="cs" <?php if($options=='cs'){echo "selected";}?>>Czech</option>
327
+ <option value="da" <?php if($options=='da'){echo "selected";}?>>Danish</option>
328
+ <option value="nl" <?php if($options=='nl'){echo "selected";}?>>Dutch</option>
329
+ <option value="en" <?php if($options=='en'){echo "selected";}?>>English</option>
330
+ <option value="eo" <?php if($options=='eo'){echo "selected";}?>>Esperanto</option>
331
+ <option value="et" <?php if($options=='et'){echo "selected";}?>>Estonian</option>
332
+ <option value="tl" <?php if($options=='tl'){echo "selected";}?>>Filipino</option>
333
+ <option value="fi" <?php if($options=='fi'){echo "selected";}?>>Finnish</option>
334
+ <option value="fr" <?php if($options=='fr'){echo "selected";}?>>French</option>
335
+ <option value="gl" <?php if($options=='gl'){echo "selected";}?>>Galician</option>
336
+ <option value="ka" <?php if($options=='ka'){echo "selected";}?>>Georgian</option>
337
+ <option value="de" <?php if($options=='de'){echo "selected";}?>>German</option>
338
+ <option value="el" <?php if($options=='el'){echo "selected";}?>>Greek</option>
339
+ <option value="gu" <?php if($options=='gu'){echo "selected";}?>>Gujarati</option>
340
+ <option value="ht" <?php if($options=='ht'){echo "selected";}?>>Haitian</option>
341
+ <option value="iw" <?php if($options=='iw'){echo "selected";}?>>Hebrew</option>
342
+ <option value="hi" <?php if($options=='hi'){echo "selected";}?>>Hindi</option>
343
+ <option value="hmn" <?php if($options=='hmn'){echo "selected";}?>>Hmong</option>
344
+ <option value="hu" <?php if($options=='hu'){echo "selected";}?>>Hungarian</option>
345
+ <option value="is" <?php if($options=='is'){echo "selected";}?>>Icelandic</option>
346
+ <option value="id" <?php if($options=='id'){echo "selected";}?>>Indonesian</option>
347
+ <option value="ga" <?php if($options=='ga'){echo "selected";}?>>Irish</option>
348
+ <option value="it" <?php if($options=='it'){echo "selected";}?>>Italian</option>
349
+ <option value="ja" <?php if($options=='ja'){echo "selected";}?>>Japanese</option>
350
+ <option value="jw" <?php if($options=='jw'){echo "selected";}?>>Javanese</option>
351
+ <option value="kn" <?php if($options=='kn'){echo "selected";}?>>Kannada</option>
352
+ <option value="km" <?php if($options=='km'){echo "selected";}?>>Khmer</option>
353
+ <option value="ko" <?php if($options=='ko'){echo "selected";}?>>Korean</option>
354
+ <option value="lo" <?php if($options=='lo'){echo "selected";}?>>Lao</option>
355
+ <option value="la" <?php if($options=='la'){echo "selected";}?>>Latin</option>
356
+ <option value="lv" <?php if($options=='lv'){echo "selected";}?>>Latvian</option>
357
+ <option value="lt" <?php if($options=='lt'){echo "selected";}?>>Lithuanian</option>
358
+ <option value="mk" <?php if($options=='mk'){echo "selected";}?>>Macedonian</option>
359
+ <option value="ms" <?php if($options=='ms'){echo "selected";}?>>Malay</option>
360
+ <option value="mt" <?php if($options=='mt'){echo "selected";}?>>Maltese</option>
361
+ <option value="mr" <?php if($options=='mr'){echo "selected";}?>>Marathi</option>
362
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>Norwegian</option>
363
+ <option value="fa" <?php if($options=='fa'){echo "selected";}?>>Persian</option>
364
+ <option value="pl" <?php if($options=='pl'){echo "selected";}?>>Polish</option>
365
+ <option value="pt" <?php if($options=='pt'){echo "selected";}?>>Portuguese</option>
366
+ <option value="ro" <?php if($options=='ro'){echo "selected";}?>>Romanian</option>
367
+ <option value="ru" <?php if($options=='ru'){echo "selected";}?>>Russian</option>
368
+ <option value="sr" <?php if($options=='sr'){echo "selected";}?>>Serbian</option>
369
+ <option value="sk" <?php if($options=='sk'){echo "selected";}?>>Slovak</option>
370
+ <option value="sl" <?php if($options=='sl'){echo "selected";}?>>Slovenian</option>
371
+ <option value="es" <?php if($options=='es'){echo "selected";}?>>Spanish</option>
372
+ <option value="sw" <?php if($options=='sw'){echo "selected";}?>>Swahili</option>
373
+ <option value="sv" <?php if($options=='sv'){echo "selected";}?>>Swedish</option>
374
+ <option value="ta" <?php if($options=='ta'){echo "selected";}?>>Tamil</option>
375
+ <option value="te" <?php if($options=='te'){echo "selected";}?>>Telugu</option>
376
+ <option value="th" <?php if($options=='th'){echo "selected";}?>>Thai</option>
377
+ <option value="tr" <?php if($options=='tr'){echo "selected";}?>>Turkish</option>
378
+ <option value="uk" <?php if($options=='uk'){echo "selected";}?>>Ukranian</option>
379
+ <option value="ur" <?php if($options=='ur'){echo "selected";}?>>Urdu</option>
380
+ <option value="vi" <?php if($options=='vi'){echo "selected";}?>>Vietnamese</option>
381
+ <option value="cy" <?php if($options=='cy'){echo "selected";}?>>Welsh</option>
382
+ <option value="yi" <?php if($options=='yi'){echo "selected";}?>>Yiddish</option>
383
+ </select>
384
+ <?php
385
+
386
+ }
387
+
388
+ function googlelanguagetranslator_language_option_cb() {
389
+
390
+ $option_name = 'googlelanguagetranslator_language_option' ;
391
+ $new_value = 'all';
392
+
393
+ if ( get_option( $option_name ) === false ) {
394
+
395
+ // The option does not exist, so we update it.
396
+ update_option( $option_name, $new_value );
397
+ }
398
+
399
+ $options = get_option (''.$option_name.''); ?>
400
+
401
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="all" <?php if($options=='all'){echo "checked";}?>/> All Languages<br/>
402
+ <input type="radio" name="googlelanguagetranslator_language_option" id="googlelanguagetranslator_language_option" value="specific" <?php if($options=='specific'){echo "checked";}?>/> Specific Languages
403
+ <?php }
404
+
405
+
406
+
407
+ function language_display_settings_cb() {
408
+ $defaults = array (
409
+ 'en' => 1
410
+ );
411
+
412
+ $option_name = 'language_display_settings' ;
413
+ $new_value = $defaults;
414
+
415
+ if ( get_option( $option_name ) === false ) {
416
+
417
+ // The option does not exist, so we update it.
418
+ update_option( $option_name, $new_value );
419
+ }
420
+
421
+ $get_language_choices = get_option (''.$option_name.'');
422
+
423
+ if (!isset ( $get_language_choices ['af'] ) ) {
424
+ $get_language_choices['af'] = 0;
425
+ }
426
+
427
+ if (!isset ( $get_language_choices ['sq'] ) ) {
428
+ $get_language_choices['sq'] = 0;
429
+ }
430
+
431
+ if (!isset ( $get_language_choices ['ar'] ) ) {
432
+ $get_language_choices['ar'] = 0;
433
+ }
434
+
435
+ if (!isset ( $get_language_choices ['hy'] ) ) {
436
+ $get_language_choices['hy'] = 0;
437
+ }
438
+
439
+ if (!isset ( $get_language_choices ['az'] ) ) {
440
+ $get_language_choices['az'] = 0;
441
+ }
442
+
443
+ if (!isset ( $get_language_choices ['eu'] ) ) {
444
+ $get_language_choices['eu'] = 0;
445
+ }
446
+
447
+ if (!isset ( $get_language_choices ['be'] ) ) {
448
+ $get_language_choices['be'] = 0;
449
+ }
450
+
451
+ if (!isset ( $get_language_choices ['bn'] ) ) {
452
+ $get_language_choices['bn'] = 0;
453
+ }
454
+
455
+ if (!isset ( $get_language_choices ['bs'] ) ) {
456
+ $get_language_choices['bs'] = 0;
457
+ }
458
+
459
+ if (!isset ( $get_language_choices ['bg'] ) ) {
460
+ $get_language_choices['bg'] = 0;
461
+ }
462
+
463
+ if (!isset ( $get_language_choices ['ca'] ) ) {
464
+ $get_language_choices['ca'] = 0;
465
+ }
466
+
467
+ if (!isset ( $get_language_choices ['ceb'] ) ) {
468
+ $get_language_choices['ceb'] = 0;
469
+ }
470
+
471
+ if (!isset ( $get_language_choices ['zh-CN'] ) ) {
472
+ $get_language_choices['zh-CN'] = 0;
473
+ }
474
+
475
+ if (!isset ( $get_language_choices ['zh-TW'] ) ) {
476
+ $get_language_choices['zh-TW'] = 0;
477
+ }
478
+
479
+ if (!isset ( $get_language_choices ['hr'] ) ) {
480
+ $get_language_choices['hr'] = 0;
481
+ }
482
+
483
+ if (!isset ( $get_language_choices ['cs'] ) ) {
484
+ $get_language_choices['cs'] = 0;
485
+ }
486
+
487
+ if (!isset ( $get_language_choices ['da'] ) ) {
488
+ $get_language_choices['da'] = 0;
489
+ }
490
+
491
+ if (!isset ( $get_language_choices ['nl'] ) ) {
492
+ $get_language_choices['nl'] = 0;
493
+ }
494
+
495
+ if (!isset ( $get_language_choices ['en'] ) ) {
496
+ $get_language_choices['en'] = 1;
497
+ }
498
+
499
+ if (!isset ( $get_language_choices ['eo'] ) ) {
500
+ $get_language_choices['eo'] = 0;
501
+ }
502
+
503
+ if (!isset ( $get_language_choices ['et'] ) ) {
504
+ $get_language_choices['et'] = 0;
505
+ }
506
+
507
+ if (!isset ( $get_language_choices ['tl'] ) ) {
508
+ $get_language_choices['tl'] = 0;
509
+ }
510
+
511
+ if (!isset ( $get_language_choices ['fi'] ) ) {
512
+ $get_language_choices['fi'] = 0;
513
+ }
514
+
515
+ if (!isset ( $get_language_choices ['fr'] ) ) {
516
+ $get_language_choices['fr'] = 0;
517
+ }
518
+
519
+ if (!isset ( $get_language_choices ['gl'] ) ) {
520
+ $get_language_choices['gl'] = 0;
521
+ }
522
+
523
+ if (!isset ( $get_language_choices ['ka'] ) ) {
524
+ $get_language_choices['ka'] = 0;
525
+ }
526
+
527
+ if (!isset ( $get_language_choices ['de'] ) ) {
528
+ $get_language_choices['de'] = 0;
529
+ }
530
+
531
+ if (!isset ( $get_language_choices ['el'] ) ) {
532
+ $get_language_choices['el'] = 0;
533
+ }
534
+
535
+ if (!isset ( $get_language_choices ['gu'] ) ) {
536
+ $get_language_choices['gu'] = 0;
537
+ }
538
+
539
+ if (!isset ( $get_language_choices ['ht'] ) ) {
540
+ $get_language_choices['ht'] = 0;
541
+ }
542
+
543
+ if (!isset ( $get_language_choices ['iw'] ) ) {
544
+ $get_language_choices['iw'] = 0;
545
+ }
546
+
547
+ if (!isset ( $get_language_choices ['hi'] ) ) {
548
+ $get_language_choices['hi'] = 0;
549
+ }
550
+
551
+ if (!isset ( $get_language_choices ['hmn'] ) ) {
552
+ $get_language_choices['hmn'] = 0;
553
+ }
554
+
555
+ if (!isset ( $get_language_choices ['hu'] ) ) {
556
+ $get_language_choices['hu'] = 0;
557
+ }
558
+
559
+ if (!isset ( $get_language_choices ['is'] ) ) {
560
+ $get_language_choices['is'] = 0;
561
+ }
562
+
563
+ if (!isset ( $get_language_choices ['id'] ) ) {
564
+ $get_language_choices['id'] = 0;
565
+ }
566
+
567
+ if (!isset ( $get_language_choices ['ga'] ) ) {
568
+ $get_language_choices['ga'] = 0;
569
+ }
570
+
571
+ if (!isset ( $get_language_choices ['it'] ) ) {
572
+ $get_language_choices['it'] = 0;
573
+ }
574
+
575
+ if (!isset ( $get_language_choices ['ja'] ) ) {
576
+ $get_language_choices['ja'] = 0;
577
+ }
578
+
579
+ if (!isset ( $get_language_choices ['jw'] ) ) {
580
+ $get_language_choices['jw'] = 0;
581
+ }
582
+
583
+ if (!isset ( $get_language_choices ['kn'] ) ) {
584
+ $get_language_choices['kn'] = 0;
585
+ }
586
+
587
+ if (!isset ( $get_language_choices ['km'] ) ) {
588
+ $get_language_choices['km'] = 0;
589
+ }
590
+
591
+ if (!isset ( $get_language_choices ['ko'] ) ) {
592
+ $get_language_choices['ko'] = 0;
593
+ }
594
+
595
+ if (!isset ( $get_language_choices ['lo'] ) ) {
596
+ $get_language_choices['lo'] = 0;
597
+ }
598
+
599
+ if (!isset ( $get_language_choices ['la'] ) ) {
600
+ $get_language_choices['la'] = 0;
601
+ }
602
+
603
+ if (!isset ( $get_language_choices ['lv'] ) ) {
604
+ $get_language_choices['lv'] = 0;
605
+ }
606
+
607
+ if (!isset ( $get_language_choices ['lt'] ) ) {
608
+ $get_language_choices['lt'] = 0;
609
+ }
610
+
611
+ if (!isset ( $get_language_choices ['mk'] ) ) {
612
+ $get_language_choices['mk'] = 0;
613
+ }
614
+
615
+ if (!isset ( $get_language_choices ['ms'] ) ) {
616
+ $get_language_choices['ms'] = 0;
617
+ }
618
+
619
+ if (!isset ( $get_language_choices ['mt'] ) ) {
620
+ $get_language_choices['mt'] = 0;
621
+ }
622
+
623
+ if (!isset ( $get_language_choices ['mr'] ) ) {
624
+ $get_language_choices['mr'] = 0;
625
+ }
626
+
627
+ if (!isset ( $get_language_choices ['no'] ) ) {
628
+ $get_language_choices['no'] = 0;
629
+ }
630
+
631
+ if (!isset ( $get_language_choices ['fa'] ) ) {
632
+ $get_language_choices['fa'] = 0;
633
+ }
634
+
635
+ if (!isset ( $get_language_choices ['pl'] ) ) {
636
+ $get_language_choices['pl'] = 0;
637
+ }
638
+
639
+ if (!isset ( $get_language_choices ['pt'] ) ) {
640
+ $get_language_choices['pt'] = 0;
641
+ }
642
+
643
+ if (!isset ( $get_language_choices ['ro'] ) ) {
644
+ $get_language_choices['ro'] = 0;
645
+ }
646
+
647
+ if (!isset ( $get_language_choices ['ru'] ) ) {
648
+ $get_language_choices['ru'] = 0;
649
+ }
650
+
651
+ if (!isset ( $get_language_choices ['sr'] ) ) {
652
+ $get_language_choices['sr'] = 0;
653
+ }
654
+
655
+ if (!isset ( $get_language_choices ['sk'] ) ) {
656
+ $get_language_choices['sk'] = 0;
657
+ }
658
+
659
+ if (!isset ( $get_language_choices ['sl'] ) ) {
660
+ $get_language_choices['sl'] = 0;
661
+ }
662
+
663
+ if (!isset ( $get_language_choices ['es'] ) ) {
664
+ $get_language_choices['es'] = 0;
665
+ }
666
+
667
+ if (!isset ( $get_language_choices ['sw'] ) ) {
668
+ $get_language_choices['sw'] = 0;
669
+ }
670
+
671
+ if (!isset ( $get_language_choices ['sv'] ) ) {
672
+ $get_language_choices['sv'] = 0;
673
+ }
674
+
675
+ if (!isset ( $get_language_choices ['ta'] ) ) {
676
+ $get_language_choices['ta'] = 0;
677
+ }
678
+
679
+ if (!isset ( $get_language_choices ['te'] ) ) {
680
+ $get_language_choices['te'] = 0;
681
+ }
682
+
683
+ if (!isset ( $get_language_choices ['th'] ) ) {
684
+ $get_language_choices['th'] = 0;
685
+ }
686
+
687
+ if (!isset ( $get_language_choices ['tr'] ) ) {
688
+ $get_language_choices['tr'] = 0;
689
+ }
690
+
691
+ if (!isset ( $get_language_choices ['uk'] ) ) {
692
+ $get_language_choices['uk'] = 0;
693
+ }
694
+
695
+ if (!isset ( $get_language_choices ['ur'] ) ) {
696
+ $get_language_choices['ur'] = 0;
697
+ }
698
+
699
+ if (!isset ( $get_language_choices ['vi'] ) ) {
700
+ $get_language_choices['vi'] = 0;
701
+ }
702
+
703
+ if (!isset ( $get_language_choices ['cy'] ) ) {
704
+ $get_language_choices['cy'] = 0;
705
+ }
706
+
707
+ if (!isset ( $get_language_choices ['yi'] ) ) {
708
+ $get_language_choices['yi'] = 0;
709
+ } ?>
710
+
711
+ <div class="languages" style="width:25%; float:left">
712
+ <div><input type="checkbox" name="language_display_settings[af]" value="1" <?php if ( 1 == $get_language_choices['af'] ) echo 'checked="checked"'; ?>/> Afrikaans</div>
713
+ <div><input type="checkbox" name="language_display_settings[sq]" value="1" <?php if ( 1 == $get_language_choices['sq'] ) echo 'checked="checked"'; ?>/> Albanian</div>
714
+ <div><input type="checkbox" name="language_display_settings[ar]" value="1" <?php if ( 1 == $get_language_choices['ar'] ) echo 'checked="checked"'; ?>/> Arabic</div>
715
+ <div><input type="checkbox" name="language_display_settings[hy]" value="1" <?php if ( 1 == $get_language_choices['hy'] ) echo 'checked="checked"'; ?>/> Armenian</div>
716
+ <div><input type="checkbox" name="language_display_settings[az]" value="1" <?php if ( 1 == $get_language_choices['az'] ) echo 'checked="checked"'; ?>/> Azerbaijani</div>
717
+ <div><input type="checkbox" name="language_display_settings[eu]" value="1" <?php if ( 1 == $get_language_choices['eu'] ) echo 'checked="checked"'; ?>/> Basque</div>
718
+ <div><input type="checkbox" name="language_display_settings[be]" value="1" <?php if ( 1 == $get_language_choices['be'] ) echo 'checked="checked"'; ?>/> Belarusian</div>
719
+ <div><input type="checkbox" name="language_display_settings[bn]" value="1" <?php if ( 1 == $get_language_choices['bn'] ) echo 'checked="checked"'; ?>/> Bengali</div>
720
+ <div><input type="checkbox" name="language_display_settings[bs]" value="1" <?php if ( 1 == $get_language_choices['bs'] ) echo 'checked="checked"'; ?>/> Bosnian</div>
721
+ <div><input type="checkbox" name="language_display_settings[bg]" value="1" <?php if ( 1 == $get_language_choices['bg'] ) echo 'checked="checked"'; ?>/> Bulgarian</div>
722
+ <div><input type="checkbox" name="language_display_settings[ca]" value="1" <?php if ( 1 == $get_language_choices['ca'] ) echo 'checked="checked"'; ?>/> Catalan</div>
723
+ <div><input type="checkbox" name="language_display_settings[ceb]" value="1" <?php if ( 1 == $get_language_choices['ceb'] ) echo 'checked="checked"'; ?>/> Cebuano</div>
724
+ <div><input type="checkbox" name="language_display_settings[zh-CN]" value="1" <?php if ( 1 == $get_language_choices['zh-CN'] ) echo 'checked="checked"'; ?>/> Chinese</div>
725
+ <div><input type="checkbox" name="language_display_settings[zh-TW]" value="1" <?php if ( 1 == $get_language_choices['zh-TW'] ) echo 'checked="checked"'; ?>/> Chinese (Han)</div>
726
+ <div><input type="checkbox" name="language_display_settings[hr]" value="1" <?php if ( 1 == $get_language_choices['hr'] ) echo 'checked="checked"'; ?>/> Croatian</div>
727
+ <div><input type="checkbox" name="language_display_settings[cs]" value="1" <?php if ( 1 == $get_language_choices['cs'] ) echo 'checked="checked"'; ?>/> Czech</div>
728
+ <div><input type="checkbox" name="language_display_settings[da]" value="1" <?php if ( 1 == $get_language_choices['da'] ) echo 'checked="checked"'; ?>/> Danish</div>
729
+ <div><input type="checkbox" name="language_display_settings[nl]" value="1" <?php if ( 1 == $get_language_choices['nl'] ) echo 'checked="checked"'; ?>/> Dutch</div>
730
+ <div><input type="checkbox" name="language_display_settings[en]" value="1" <?php if ( 1 == $get_language_choices['en'] ) echo 'checked="checked"'; ?>/> English</div>
731
+ </div>
732
+
733
+ <div class="languages" style="width:25%; float:left">
734
+ <div><input type="checkbox" name="language_display_settings[eo]" value="1" <?php if ( 1 == $get_language_choices['eo'] ) echo 'checked="checked"'; ?>/> Esperanto</div>
735
+ <div><input type="checkbox" name="language_display_settings[et]" value="1" <?php if ( 1 == $get_language_choices['et'] ) echo 'checked="checked"'; ?>/> Estonian</div>
736
+ <div><input type="checkbox" name="language_display_settings[tl]" value="1" <?php if ( 1 == $get_language_choices['tl'] ) echo 'checked="checked"'; ?>/> Filipino</div>
737
+ <div><input type="checkbox" name="language_display_settings[fi]" value="1" <?php if ( 1 == $get_language_choices['fi'] ) echo 'checked="checked"'; ?>/> Finnish</div>
738
+ <div><input type="checkbox" name="language_display_settings[fr]" value="1" <?php if ( 1 == $get_language_choices['fr'] ) echo 'checked="checked"'; ?>/> French</div>
739
+ <div><input type="checkbox" name="language_display_settings[gl]" value="1" <?php if ( 1 == $get_language_choices['gl'] ) echo 'checked="checked"'; ?>/> Galician</div>
740
+ <div><input type="checkbox" name="language_display_settings[ka]" value="1" <?php if ( 1 == $get_language_choices['ka'] ) echo 'checked="checked"'; ?>/> Georgian</div>
741
+ <div><input type="checkbox" name="language_display_settings[de]" value="1" <?php if ( 1 == $get_language_choices['de'] ) echo 'checked="checked"'; ?>/> German</div>
742
+ <div><input type="checkbox" name="language_display_settings[el]" value="1" <?php if ( 1 == $get_language_choices['el'] ) echo 'checked="checked"'; ?>/> Greek</div>
743
+ <div><input type="checkbox" name="language_display_settings[gu]" value="1" <?php if ( 1 == $get_language_choices['gu'] ) echo 'checked="checked"'; ?>/> Gujarati</div>
744
+ <div><input type="checkbox" name="language_display_settings[ht]" value="1" <?php if ( 1 == $get_language_choices['ht'] ) echo 'checked="checked"'; ?>/> Haitian</div>
745
+ <div><input type="checkbox" name="language_display_settings[iw]" value="1" <?php if ( 1 == $get_language_choices['iw'] ) echo 'checked="checked"'; ?>/> Hebrew</div>
746
+ <div><input type="checkbox" name="language_display_settings[hi]" value="1" <?php if ( 1 == $get_language_choices['hi'] ) echo 'checked="checked"'; ?>/> Hindi</div>
747
+ <div><input type="checkbox" name="language_display_settings[hmn]" value="1" <?php if ( 1 == $get_language_choices['hmn'] ) echo 'checked="checked"'; ?>/> Hmong</div>
748
+ <div><input type="checkbox" name="language_display_settings[hu]" value="1" <?php if ( 1 == $get_language_choices['hu'] ) echo 'checked="checked"'; ?>/> Hungarian</div>
749
+ <div><input type="checkbox" name="language_display_settings[is]" value="1" <?php if ( 1 == $get_language_choices['is'] ) echo 'checked="checked"'; ?>/> Icelandic</div>
750
+ <div><input type="checkbox" name="language_display_settings[id]" value="1" <?php if ( 1 == $get_language_choices['id'] ) echo 'checked="checked"'; ?>/> Indonesian</div>
751
+ <div><input type="checkbox" name="language_display_settings[ga]" value="1" <?php if ( 1 == $get_language_choices['ga'] ) echo 'checked="checked"'; ?>/> Irish</div>
752
+ <div><input type="checkbox" name="language_display_settings[it]" value="1" <?php if ( 1 == $get_language_choices['it'] ) echo 'checked="checked"'; ?>/> Italian</div>
753
+ </div>
754
+
755
+ <div class="languages" style="width:25%; float:left">
756
+ <div><input type="checkbox" name="language_display_settings[ja]" value="1" <?php if ( 1 == $get_language_choices['ja'] ) echo 'checked="checked"'; ?>/> Japanese</div>
757
+ <div><input type="checkbox" name="language_display_settings[jw]" value="1" <?php if ( 1 == $get_language_choices['jw'] ) echo 'checked="checked"'; ?>/> Javanese</div>
758
+ <div><input type="checkbox" name="language_display_settings[kn]" value="1" <?php if ( 1 == $get_language_choices['kn'] ) echo 'checked="checked"'; ?>/> Kannada</div>
759
+ <div><input type="checkbox" name="language_display_settings[km]" value="1" <?php if ( 1 == $get_language_choices['km'] ) echo 'checked="checked"'; ?>/> Khmer</div>
760
+ <div><input type="checkbox" name="language_display_settings[ko]" value="1" <?php if ( 1 == $get_language_choices['ko'] ) echo 'checked="checked"'; ?>/> Korean</div>
761
+ <div><input type="checkbox" name="language_display_settings[lo]" value="1" <?php if ( 1 == $get_language_choices['lo'] ) echo 'checked="checked"'; ?>/> Lao</div>
762
+ <div><input type="checkbox" name="language_display_settings[la]" value="1" <?php if ( 1 == $get_language_choices['la'] ) echo 'checked="checked"'; ?>/> Latin</div>
763
+ <div><input type="checkbox" name="language_display_settings[lv]" value="1" <?php if ( 1 == $get_language_choices['lv'] ) echo 'checked="checked"'; ?>/> Latvian</div>
764
+ <div><input type="checkbox" name="language_display_settings[lt]" value="1" <?php if ( 1 == $get_language_choices['lt'] ) echo 'checked="checked"'; ?>/> Lithuanian</div>
765
+ <div><input type="checkbox" name="language_display_settings[mk]" value="1" <?php if ( 1 == $get_language_choices['mk'] ) echo 'checked="checked"'; ?>/> Macedonian</div>
766
+ <div><input type="checkbox" name="language_display_settings[ms]" value="1" <?php if ( 1 == $get_language_choices['ms'] ) echo 'checked="checked"'; ?>/> Malay</div>
767
+ <div><input type="checkbox" name="language_display_settings[mt]" value="1" <?php if ( 1 == $get_language_choices['mt'] ) echo 'checked="checked"'; ?>/> Maltese</div>
768
+ <div><input type="checkbox" name="language_display_settings[mr]" value="1" <?php if ( 1 == $get_language_choices['mr'] ) echo 'checked="checked"'; ?>/> Marathi</div>
769
+ <div><input type="checkbox" name="language_display_settings[no]" value="1" <?php if ( 1 == $get_language_choices['no'] ) echo 'checked="checked"'; ?>/> Norwegian</div>
770
+ <div><input type="checkbox" name="language_display_settings[fa]" value="1" <?php if ( 1 == $get_language_choices['fa'] ) echo 'checked="checked"'; ?>/> Persian</div>
771
+ <div><input type="checkbox" name="language_display_settings[pl]" value="1" <?php if ( 1 == $get_language_choices['pl'] ) echo 'checked="checked"'; ?>/> Polish</div>
772
+ <div><input type="checkbox" name="language_display_settings[pt]" value="1" <?php if ( 1 == $get_language_choices['pt'] ) echo 'checked="checked"'; ?>/> Portuguese</div>
773
+ <div><input type="checkbox" name="language_display_settings[ro]" value="1" <?php if ( 1 == $get_language_choices['ro'] ) echo 'checked="checked"'; ?>/> Romanian</div>
774
+ <div><input type="checkbox" name="language_display_settings[ru]" value="1" <?php if ( 1 == $get_language_choices['ru'] ) echo 'checked="checked"'; ?>/> Russian</div>
775
+ </div>
776
+
777
+ <div class="languages" style="width:25%; float:left">
778
+ <div><input type="checkbox" name="language_display_settings[sr]" value="1" <?php if ( 1 == $get_language_choices['sr'] ) echo 'checked="checked"'; ?>/> Serbian</div>
779
+ <div><input type="checkbox" name="language_display_settings[sk]" value="1" <?php if ( 1 == $get_language_choices['sk'] ) echo 'checked="checked"'; ?>/> Slovak</div>
780
+ <div><input type="checkbox" name="language_display_settings[sl]" value="1" <?php if ( 1 == $get_language_choices['sl'] ) echo 'checked="checked"'; ?>/> Slovenian</div>
781
+ <div><input type="checkbox" name="language_display_settings[es]" value="1" <?php if ( 1 == $get_language_choices['es'] ) echo 'checked="checked"'; ?>/> Spanish</div>
782
+ <div><input type="checkbox" name="language_display_settings[sw]" value="1" <?php if ( 1 == $get_language_choices['sw'] ) echo 'checked="checked"'; ?>/> Swahili</div>
783
+ <div><input type="checkbox" name="language_display_settings[sv]" value="1" <?php if ( 1 == $get_language_choices['sv'] ) echo 'checked="checked"'; ?>/> Swedish</div>
784
+ <div><input type="checkbox" name="language_display_settings[ta]" value="1" <?php if ( 1 == $get_language_choices['ta'] ) echo 'checked="checked"'; ?>/> Tamil</div>
785
+ <div><input type="checkbox" name="language_display_settings[te]" value="1" <?php if ( 1 == $get_language_choices['te'] ) echo 'checked="checked"'; ?>/> Telugu</div>
786
+ <div><input type="checkbox" name="language_display_settings[th]" value="1" <?php if ( 1 == $get_language_choices['th'] ) echo 'checked="checked"'; ?>/> Thai</div>
787
+ <div><input type="checkbox" name="language_display_settings[tr]" value="1" <?php if ( 1 == $get_language_choices['tr'] ) echo 'checked="checked"'; ?>/> Turkish</div>
788
+ <div><input type="checkbox" name="language_display_settings[uk]" value="1" <?php if ( 1 == $get_language_choices['uk'] ) echo 'checked="checked"'; ?>/> Ukranian</div>
789
+ <div><input type="checkbox" name="language_display_settings[ur]" value="1" <?php if ( 1 == $get_language_choices['ur'] ) echo 'checked="checked"'; ?>/> Urdu</div>
790
+ <div><input type="checkbox" name="language_display_settings[vi]" value="1" <?php if ( 1 == $get_language_choices['vi'] ) echo 'checked="checked"'; ?>/> Vietnamese</div>
791
+ <div><input type="checkbox" name="language_display_settings[cy]" value="1" <?php if ( 1 == $get_language_choices['cy'] ) echo 'checked="checked"'; ?>/> Welsh</div>
792
+ <div><input type="checkbox" name="language_display_settings[yi]" value="1" <?php if ( 1 == $get_language_choices['yi'] ) echo 'checked="checked"'; ?>/> Yiddish</div>
793
+ </div>
794
+
795
+ <div style="clear:both"></div>
796
+ <?php }
797
+
798
+ function googlelanguagetranslator_flags_cb() {
799
+
800
+ $option_name = 'googlelanguagetranslator_flags' ;
801
+ $new_value = 'show_flags';
802
+
803
+ if ( get_option( $option_name ) === false ) {
804
+
805
+ // The option does not exist, so we update it.
806
+ update_option( $option_name, $new_value );
807
+ }
808
+
809
+ $options = get_option (''.$option_name.''); ?>
810
+
811
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="show_flags" <?php if($options=='show_flags'){echo "checked";}?>/> Yes, show flag images<br/>
812
+ <input type="radio" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="hide_flags" <?php if($options=='hide_flags'){echo "checked";}?>/> No, hide flag images
813
+ <?php }
814
+
815
+
816
+ function flag_display_settings_cb() {
817
+ $defaults = array(
818
+ 'flag-en' => 1
819
+ );
820
+
821
+ $option_name = 'flag_display_settings' ;
822
+ $new_value = $defaults;
823
+
824
+ if ( get_option( $option_name ) === false ) {
825
+
826
+ // The option does not exist, so we update it.
827
+ update_option( $option_name, $new_value );
828
+ }
829
+
830
+ $get_flag_choices = get_option (''.$option_name.'');
831
+
832
+ if (!isset ( $get_flag_choices ['flag-af'] ) ) {
833
+ $get_flag_choices['flag-af'] = 0;
834
+ }
835
+
836
+ if (!isset ( $get_flag_choices ['flag-sq'] ) ) {
837
+ $get_flag_choices['flag-sq'] = 0;
838
+ }
839
+
840
+ if (!isset ( $get_flag_choices ['flag-ar'] ) ) {
841
+ $get_flag_choices['flag-ar'] = 0;
842
+ }
843
+
844
+ if (!isset ( $get_flag_choices ['flag-hy'] ) ) {
845
+ $get_flag_choices['flag-hy'] = 0;
846
+ }
847
+
848
+ if (!isset ( $get_flag_choices ['flag-az'] ) ) {
849
+ $get_flag_choices['flag-az'] = 0;
850
+ }
851
+
852
+ if (!isset ( $get_flag_choices ['flag-eu'] ) ) {
853
+ $get_flag_choices['flag-eu'] = 0;
854
+ }
855
+
856
+ if (!isset ( $get_flag_choices ['flag-be'] ) ) {
857
+ $get_flag_choices['flag-be'] = 0;
858
+ }
859
+
860
+ if (!isset ( $get_flag_choices ['flag-bn'] ) ) {
861
+ $get_flag_choices['flag-bn'] = 0;
862
+ }
863
+
864
+ if (!isset ( $get_flag_choices ['flag-bs'] ) ) {
865
+ $get_flag_choices['flag-bs'] = 0;
866
+ }
867
+
868
+ if (!isset ( $get_flag_choices ['flag-bg'] ) ) {
869
+ $get_flag_choices['flag-bg'] = 0;
870
+ }
871
+
872
+ if (!isset ( $get_flag_choices ['flag-ca'] ) ) {
873
+ $get_flag_choices['flag-ca'] = 0;
874
+ }
875
+
876
+ if (!isset ( $get_flag_choices ['flag-ceb'] ) ) {
877
+ $get_flag_choices['flag-ceb'] = 0;
878
+ }
879
+
880
+ if (!isset ( $get_flag_choices ['flag-zh-CN'] ) ) {
881
+ $get_flag_choices['flag-zh-CN'] = 0;
882
+ }
883
+
884
+ if (!isset ( $get_flag_choices ['flag-zh-TW'] ) ) {
885
+ $get_flag_choices['flag-zh-TW'] = 0;
886
+ }
887
+
888
+ if (!isset ( $get_flag_choices ['flag-hr'] ) ) {
889
+ $get_flag_choices['flag-hr'] = 0;
890
+ }
891
+
892
+ if (!isset ( $get_flag_choices ['flag-cs'] ) ) {
893
+ $get_flag_choices['flag-cs'] = 0;
894
+ }
895
+
896
+ if (!isset ( $get_flag_choices ['flag-da'] ) ) {
897
+ $get_flag_choices['flag-da'] = 0;
898
+ }
899
+
900
+ if (!isset ( $get_flag_choices ['flag-nl'] ) ) {
901
+ $get_flag_choices['flag-nl'] = 0;
902
+ }
903
+
904
+ if (!isset ( $get_flag_choices ['flag-en'] ) ) {
905
+ $get_flag_choices['flag-en'] = 1;
906
+ }
907
+
908
+ if (!isset ( $get_flag_choices ['flag-eo'] ) ) {
909
+ $get_flag_choices['flag-eo'] = 0;
910
+ }
911
+
912
+ if (!isset ( $get_flag_choices ['flag-et'] ) ) {
913
+ $get_flag_choices['flag-et'] = 0;
914
+ }
915
+
916
+ if (!isset ( $get_flag_choices ['flag-tl'] ) ) {
917
+ $get_flag_choices['flag-tl'] = 0;
918
+ }
919
+
920
+ if (!isset ( $get_flag_choices ['flag-fi'] ) ) {
921
+ $get_flag_choices['flag-fi'] = 0;
922
+ }
923
+
924
+ if (!isset ( $get_flag_choices ['flag-fr'] ) ) {
925
+ $get_flag_choices['flag-fr'] = 0;
926
+ }
927
+
928
+ if (!isset ( $get_flag_choices ['flag-gl'] ) ) {
929
+ $get_flag_choices['flag-gl'] = 0;
930
+ }
931
+
932
+ if (!isset ( $get_flag_choices ['flag-ka'] ) ) {
933
+ $get_flag_choices['flag-ka'] = 0;
934
+ }
935
+
936
+ if (!isset ( $get_flag_choices ['flag-de'] ) ) {
937
+ $get_flag_choices['flag-de'] = 0;
938
+ }
939
+
940
+ if (!isset ( $get_flag_choices ['flag-el'] ) ) {
941
+ $get_flag_choices['flag-el'] = 0;
942
+ }
943
+
944
+ if (!isset ( $get_flag_choices ['flag-gu'] ) ) {
945
+ $get_flag_choices['flag-gu'] = 0;
946
+ }
947
+
948
+ if (!isset ( $get_flag_choices ['flag-ht'] ) ) {
949
+ $get_flag_choices['flag-ht'] = 0;
950
+ }
951
+
952
+ if (!isset ( $get_flag_choices ['flag-iw'] ) ) {
953
+ $get_flag_choices['flag-iw'] = 0;
954
+ }
955
+
956
+ if (!isset ( $get_flag_choices ['flag-hi'] ) ) {
957
+ $get_flag_choices['flag-hi'] = 0;
958
+ }
959
+
960
+ if (!isset ( $get_flag_choices ['flag-hmn'] ) ) {
961
+ $get_flag_choices['flag-hmn'] = 0;
962
+ }
963
+
964
+ if (!isset ( $get_flag_choices ['flag-hu'] ) ) {
965
+ $get_flag_choices['flag-hu'] = 0;
966
+ }
967
+
968
+ if (!isset ( $get_flag_choices ['flag-is'] ) ) {
969
+ $get_flag_choices['flag-is'] = 0;
970
+ }
971
+
972
+ if (!isset ( $get_flag_choices ['flag-id'] ) ) {
973
+ $get_flag_choices['flag-id'] = 0;
974
+ }
975
+
976
+ if (!isset ( $get_flag_choices ['flag-ga'] ) ) {
977
+ $get_flag_choices['flag-ga'] = 0;
978
+ }
979
+
980
+ if (!isset ( $get_flag_choices ['flag-it'] ) ) {
981
+ $get_flag_choices['flag-it'] = 0;
982
+ }
983
+
984
+ if (!isset ( $get_flag_choices ['flag-ja'] ) ) {
985
+ $get_flag_choices['flag-ja'] = 0;
986
+ }
987
+
988
+ if (!isset ( $get_flag_choices ['flag-jw'] ) ) {
989
+ $get_flag_choices['flag-jw'] = 0;
990
+ }
991
+
992
+ if (!isset ( $get_flag_choices ['flag-kn'] ) ) {
993
+ $get_flag_choices['flag-kn'] = 0;
994
+ }
995
+
996
+ if (!isset ( $get_flag_choices ['flag-km'] ) ) {
997
+ $get_flag_choices['flag-km'] = 0;
998
+ }
999
+
1000
+ if (!isset ( $get_flag_choices ['flag-ko'] ) ) {
1001
+ $get_flag_choices['flag-ko'] = 0;
1002
+ }
1003
+
1004
+ if (!isset ( $get_flag_choices ['flag-lo'] ) ) {
1005
+ $get_flag_choices['flag-lo'] = 0;
1006
+ }
1007
+
1008
+ if (!isset ( $get_flag_choices ['flag-la'] ) ) {
1009
+ $get_flag_choices['flag-la'] = 0;
1010
+ }
1011
+
1012
+ if (!isset ( $get_flag_choices ['flag-lv'] ) ) {
1013
+ $get_flag_choices['flag-lv'] = 0;
1014
+ }
1015
+
1016
+ if (!isset ( $get_flag_choices ['flag-lt'] ) ) {
1017
+ $get_flag_choices['flag-lt'] = 0;
1018
+ }
1019
+
1020
+ if (!isset ( $get_flag_choices ['flag-mk'] ) ) {
1021
+ $get_flag_choices['flag-mk'] = 0;
1022
+ }
1023
+
1024
+ if (!isset ( $get_flag_choices ['flag-ms'] ) ) {
1025
+ $get_flag_choices['flag-ms'] = 0;
1026
+ }
1027
+
1028
+ if (!isset ( $get_flag_choices ['flag-mt'] ) ) {
1029
+ $get_flag_choices['flag-mt'] = 0;
1030
+ }
1031
+
1032
+ if (!isset ( $get_flag_choices ['flag-mr'] ) ) {
1033
+ $get_flag_choices['flag-mr'] = 0;
1034
+ }
1035
+
1036
+ if (!isset ( $get_flag_choices ['flag-no'] ) ) {
1037
+ $get_flag_choices['flag-no'] = 0;
1038
+ }
1039
+
1040
+ if (!isset ( $get_flag_choices ['flag-fa'] ) ) {
1041
+ $get_flag_choices['flag-fa'] = 0;
1042
+ }
1043
+
1044
+ if (!isset ( $get_flag_choices ['flag-pl'] ) ) {
1045
+ $get_flag_choices['flag-pl'] = 0;
1046
+ }
1047
+
1048
+ if (!isset ( $get_flag_choices ['flag-pt'] ) ) {
1049
+ $get_flag_choices['flag-pt'] = 0;
1050
+ }
1051
+
1052
+ if (!isset ( $get_flag_choices ['flag-ro'] ) ) {
1053
+ $get_flag_choices['flag-ro'] = 0;
1054
+ }
1055
+
1056
+ if (!isset ( $get_flag_choices ['flag-ru'] ) ) {
1057
+ $get_flag_choices['flag-ru'] = 0;
1058
+ }
1059
+
1060
+ if (!isset ( $get_flag_choices ['flag-sr'] ) ) {
1061
+ $get_flag_choices['flag-sr'] = 0;
1062
+ }
1063
+
1064
+ if (!isset ( $get_flag_choices ['flag-sk'] ) ) {
1065
+ $get_flag_choices['flag-sk'] = 0;
1066
+ }
1067
+
1068
+ if (!isset ( $get_flag_choices ['flag-sl'] ) ) {
1069
+ $get_flag_choices['flag-sl'] = 0;
1070
+ }
1071
+
1072
+ if (!isset ( $get_flag_choices ['flag-es'] ) ) {
1073
+ $get_flag_choices['flag-es'] = 0;
1074
+ }
1075
+
1076
+ if (!isset ( $get_flag_choices ['flag-sw'] ) ) {
1077
+ $get_flag_choices['flag-sw'] = 0;
1078
+ }
1079
+
1080
+ if (!isset ( $get_flag_choices ['flag-sv'] ) ) {
1081
+ $get_flag_choices['flag-sv'] = 0;
1082
+ }
1083
+
1084
+ if (!isset ( $get_flag_choices ['flag-ta'] ) ) {
1085
+ $get_flag_choices['flag-ta'] = 0;
1086
+ }
1087
+
1088
+ if (!isset ( $get_flag_choices ['flag-te'] ) ) {
1089
+ $get_flag_choices['flag-te'] = 0;
1090
+ }
1091
+
1092
+ if (!isset ( $get_flag_choices ['flag-th'] ) ) {
1093
+ $get_flag_choices['flag-th'] = 0;
1094
+ }
1095
+
1096
+ if (!isset ( $get_flag_choices ['flag-tr'] ) ) {
1097
+ $get_flag_choices['flag-tr'] = 0;
1098
+ }
1099
+
1100
+ if (!isset ( $get_flag_choices ['flag-uk'] ) ) {
1101
+ $get_flag_choices['flag-uk'] = 0;
1102
+ }
1103
+
1104
+ if (!isset ( $get_flag_choices ['flag-ur'] ) ) {
1105
+ $get_flag_choices['flag-ur'] = 0;
1106
+ }
1107
+
1108
+ if (!isset ( $get_flag_choices ['flag-vi'] ) ) {
1109
+ $get_flag_choices['flag-vi'] = 0;
1110
+ }
1111
+
1112
+ if (!isset ( $get_flag_choices ['flag-cy'] ) ) {
1113
+ $get_flag_choices['flag-cy'] = 0;
1114
+ }
1115
+
1116
+ if (!isset ( $get_flag_choices ['flag-yi'] ) ) {
1117
+ $get_flag_choices['flag-yi'] = 0;
1118
+ }
1119
+
1120
+ ?>
1121
+ <div class="flagdisplay" style="width:25%; float:left">
1122
+ <div><input type="checkbox" name="flag_display_settings[flag-af]" value="1" <?php checked( 1,$get_flag_choices['flag-af']); ?>/> Afrikaans</div>
1123
+ <div><input type="checkbox" name="flag_display_settings[flag-sq]" value="1" <?php checked( 1,$get_flag_choices['flag-sq']); ?>/> Albanian</div>
1124
+ <div><input type="checkbox" name="flag_display_settings[flag-ar]" value="1" <?php checked( 1,$get_flag_choices['flag-ar']); ?>/> Arabic</div>
1125
+ <div><input type="checkbox" name="flag_display_settings[flag-hy]" value="1" <?php checked( 1,$get_flag_choices['flag-hy']); ?>/> Armenian</div>
1126
+ <div><input type="checkbox" name="flag_display_settings[flag-az]" value="1" <?php checked( 1,$get_flag_choices['flag-az']); ?>/> Azerbaijani</div>
1127
+ <div><input type="checkbox" name="flag_display_settings[flag-eu]" value="1" <?php checked( 1,$get_flag_choices['flag-eu']); ?>/> Basque</div>
1128
+ <div><input type="checkbox" name="flag_display_settings[flag-be]" value="1" <?php checked( 1,$get_flag_choices['flag-be']); ?>/> Belarusian</div>
1129
+ <div><input type="checkbox" name="flag_display_settings[flag-bn]" value="1" <?php checked( 1,$get_flag_choices['flag-bn']); ?>/> Bengali</div>
1130
+ <div><input type="checkbox" name="flag_display_settings[flag-bs]" value="1" <?php checked( 1,$get_flag_choices['flag-bs']); ?>/> Bosnian</div>
1131
+ <div><input type="checkbox" name="flag_display_settings[flag-bg]" value="1" <?php checked( 1,$get_flag_choices['flag-bg']); ?>/> Bulgarian</div>
1132
+ <div><input type="checkbox" name="flag_display_settings[flag-ca]" value="1" <?php checked( 1,$get_flag_choices['flag-ca']); ?>/> Catalan</div>
1133
+ <div><input type="checkbox" name="flag_display_settings[flag-ceb]" value="1" <?php checked( 1,$get_flag_choices['flag-ceb']); ?>/> Cebuano</div>
1134
+ <div><input type="checkbox" name="flag_display_settings[flag-zh-CN]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-CN']); ?>/> Chinese</div>
1135
+ <div><input type="checkbox" name="flag_display_settings[flag-zh-TW]" value="1" <?php checked( 1,$get_flag_choices['flag-zh-TW']); ?>/> Chinese (Han)</div>
1136
+ <div><input type="checkbox" name="flag_display_settings[flag-hr]" value="1" <?php checked( 1,$get_flag_choices['flag-hr']); ?>/> Croatian</div>
1137
+ <div><input type="checkbox" name="flag_display_settings[flag-cs]" value="1" <?php checked( 1,$get_flag_choices['flag-cs']); ?>/> Czech</div>
1138
+ <div><input type="checkbox" name="flag_display_settings[flag-da]" value="1" <?php checked( 1,$get_flag_choices['flag-da']); ?>/> Danish</div>
1139
+ <div><input type="checkbox" name="flag_display_settings[flag-nl]" value="1" <?php checked( 1,$get_flag_choices['flag-nl']); ?>/> Dutch</div>
1140
+ <div><input type="checkbox" name="flag_display_settings[flag-en]" value="1" <?php checked(1,$get_flag_choices['flag-en']); ?>/> English</div>
1141
+ </div>
1142
+
1143
+ <div class="flagdisplay" style="width:25%; float:left">
1144
+ <div><input type="checkbox" name="flag_display_settings[flag-eo]" value="1" <?php checked( 1,$get_flag_choices['flag-eo']); ?>/> Esperanto</div>
1145
+ <div><input type="checkbox" name="flag_display_settings[flag-et]" value="1" <?php checked( 1,$get_flag_choices['flag-et']); ?>/> Estonian</div>
1146
+ <div><input type="checkbox" name="flag_display_settings[flag-tl]" value="1" <?php checked( 1,$get_flag_choices['flag-tl']); ?>/> Filipino</div>
1147
+ <div><input type="checkbox" name="flag_display_settings[flag-fi]" value="1" <?php checked( 1,$get_flag_choices['flag-fi']); ?>/> Finnish</div>
1148
+ <div><input type="checkbox" name="flag_display_settings[flag-fr]" value="1" <?php checked( 1,$get_flag_choices['flag-fr']); ?>/> French</div>
1149
+ <div><input type="checkbox" name="flag_display_settings[flag-gl]" value="1" <?php checked( 1,$get_flag_choices['flag-gl']); ?>/> Galician</div>
1150
+ <div><input type="checkbox" name="flag_display_settings[flag-ka]" value="1" <?php checked( 1,$get_flag_choices['flag-ka']); ?>/> Georgian</div>
1151
+ <div><input type="checkbox" name="flag_display_settings[flag-de]" value="1" <?php checked( 1,$get_flag_choices['flag-de']); ?>/> German</div>
1152
+ <div><input type="checkbox" name="flag_display_settings[flag-el]" value="1" <?php checked( 1,$get_flag_choices['flag-el']); ?>/> Greek</div>
1153
+ <div><input type="checkbox" name="flag_display_settings[flag-gu]" value="1" <?php checked( 1,$get_flag_choices['flag-gu']); ?>/> Gujarati</div>
1154
+ <div><input type="checkbox" name="flag_display_settings[flag-ht]" value="1" <?php checked( 1,$get_flag_choices['flag-ht']); ?>/> Haitian</div>
1155
+ <div><input type="checkbox" name="flag_display_settings[flag-iw]" value="1" <?php checked( 1,$get_flag_choices['flag-iw']); ?>/> Hebrew</div>
1156
+ <div><input type="checkbox" name="flag_display_settings[flag-hi]" value="1" <?php checked( 1,$get_flag_choices['flag-hi']); ?>/> Hindi</div>
1157
+ <div><input type="checkbox" name="flag_display_settings[flag-hmn]" value="1" <?php checked( 1,$get_flag_choices['flag-hmn']); ?>/> Hmong</div>
1158
+ <div><input type="checkbox" name="flag_display_settings[flag-hu]" value="1" <?php checked( 1,$get_flag_choices['flag-hu']); ?>/> Hungarian</div>
1159
+ <div><input type="checkbox" name="flag_display_settings[flag-is]" value="1" <?php checked( 1,$get_flag_choices['flag-is']); ?>/> Icelandic</div>
1160
+ <div><input type="checkbox" name="flag_display_settings[flag-id]" value="1" <?php checked( 1,$get_flag_choices['flag-id']); ?>/> Indonesian</div>
1161
+ <div><input type="checkbox" name="flag_display_settings[flag-ga]" value="1" <?php checked( 1,$get_flag_choices['flag-ga']); ?>/> Irish</div>
1162
+ <div><input type="checkbox" name="flag_display_settings[flag-it]" value="1" <?php checked( 1,$get_flag_choices['flag-it']); ?>/> Italian</div>
1163
+ </div>
1164
+
1165
+ <div class="flagdisplay" style="width:25%; float:left">
1166
+ <div><input type="checkbox" name="flag_display_settings[flag-ja]" value="1" <?php checked( 1,$get_flag_choices['flag-ja']); ?>/> Japanese</div>
1167
+ <div><input type="checkbox" name="flag_display_settings[flag-jw]" value="1" <?php checked( 1,$get_flag_choices['flag-jw']); ?>/> Javanese</div>
1168
+ <div><input type="checkbox" name="flag_display_settings[flag-kn]" value="1" <?php checked( 1,$get_flag_choices['flag-kn']); ?>/> Kannada</div>
1169
+ <div><input type="checkbox" name="flag_display_settings[flag-km]" value="1" <?php checked( 1,$get_flag_choices['flag-km']); ?>/> Khmer</div>
1170
+ <div><input type="checkbox" name="flag_display_settings[flag-ko]" value="1" <?php checked( 1,$get_flag_choices['flag-ko']); ?>/> Korean</div>
1171
+ <div><input type="checkbox" name="flag_display_settings[flag-lo]" value="1" <?php checked( 1,$get_flag_choices['flag-lo']); ?>/> Lao</div>
1172
+ <div><input type="checkbox" name="flag_display_settings[flag-la]" value="1" <?php checked( 1,$get_flag_choices['flag-la']); ?>/> Latin</div>
1173
+ <div><input type="checkbox" name="flag_display_settings[flag-lv]" value="1" <?php checked( 1,$get_flag_choices['flag-lv']); ?>/> Latvian</div>
1174
+ <div><input type="checkbox" name="flag_display_settings[flag-lt]" value="1" <?php checked( 1,$get_flag_choices['flag-lt']); ?>/> Lithuanian</div>
1175
+ <div><input type="checkbox" name="flag_display_settings[flag-mk]" value="1" <?php checked( 1,$get_flag_choices['flag-mk']); ?>/> Macedonian</div>
1176
+ <div><input type="checkbox" name="flag_display_settings[flag-ms]" value="1" <?php checked( 1,$get_flag_choices['flag-ms']); ?>/> Malay</div>
1177
+ <div><input type="checkbox" name="flag_display_settings[flag-mt]" value="1" <?php checked( 1,$get_flag_choices['flag-mt']); ?>/> Maltese</div>
1178
+ <div><input type="checkbox" name="flag_display_settings[flag-mr]" value="1" <?php checked( 1,$get_flag_choices['flag-mr']); ?>/> Marathi</div>
1179
+ <div><input type="checkbox" name="flag_display_settings[flag-no]" value="1" <?php checked( 1,$get_flag_choices['flag-no']); ?>/> Norwegian</div>
1180
+ <div><input type="checkbox" name="flag_display_settings[flag-fa]" value="1" <?php checked( 1,$get_flag_choices['flag-fa']); ?>/> Persian</div>
1181
+ <div><input type="checkbox" name="flag_display_settings[flag-pl]" value="1" <?php checked( 1,$get_flag_choices['flag-pl']); ?>/> Polish</div>
1182
+ <div><input type="checkbox" name="flag_display_settings[flag-pt]" value="1" <?php checked( 1,$get_flag_choices['flag-pt']); ?>/> Portuguese</div>
1183
+ <div><input type="checkbox" name="flag_display_settings[flag-ro]" value="1" <?php checked( 1,$get_flag_choices['flag-ro']); ?>/> Romanian</div>
1184
+ <div><input type="checkbox" name="flag_display_settings[flag-ru]" value="1" <?php checked( 1,$get_flag_choices['flag-ru']); ?>/> Russian</div>
1185
+ </div>
1186
+
1187
+ <div class="flagdisplay" style="width:25%; float:left">
1188
+ <div><input type="checkbox" name="flag_display_settings[flag-sr]" value="1" <?php checked( 1,$get_flag_choices['flag-sr']); ?>/> Serbian</div>
1189
+ <div><input type="checkbox" name="flag_display_settings[flag-sk]" value="1" <?php checked( 1,$get_flag_choices['flag-sk']); ?>/> Slovak</div>
1190
+ <div><input type="checkbox" name="flag_display_settings[flag-sl]" value="1" <?php checked( 1,$get_flag_choices['flag-sl']); ?>/> Slovenian</div>
1191
+ <div><input type="checkbox" name="flag_display_settings[flag-es]" value="1" <?php checked( 1,$get_flag_choices['flag-es']); ?>/> Spanish</div>
1192
+ <div><input type="checkbox" name="flag_display_settings[flag-sw]" value="1" <?php checked( 1,$get_flag_choices['flag-sw']); ?>/> Swahili</div>
1193
+ <div><input type="checkbox" name="flag_display_settings[flag-sv]" value="1" <?php checked( 1,$get_flag_choices['flag-sv']); ?>/> Swedish</div>
1194
+ <div><input type="checkbox" name="flag_display_settings[flag-ta]" value="1" <?php checked( 1,$get_flag_choices['flag-ta']); ?>/> Tamil</div>
1195
+ <div><input type="checkbox" name="flag_display_settings[flag-te]" value="1" <?php checked( 1,$get_flag_choices['flag-te']); ?>/> Telugu</div>
1196
+ <div><input type="checkbox" name="flag_display_settings[flag-th]" value="1" <?php checked( 1,$get_flag_choices['flag-th']); ?>/> Thai</div>
1197
+ <div><input type="checkbox" name="flag_display_settings[flag-tr]" value="1" <?php checked( 1,$get_flag_choices['flag-tr']); ?>/> Turkish</div>
1198
+ <div><input type="checkbox" name="flag_display_settings[flag-uk]" value="1" <?php checked( 1,$get_flag_choices['flag-uk']); ?>/> Ukranian</div>
1199
+ <div><input type="checkbox" name="flag_display_settings[flag-ur]" value="1" <?php checked( 1,$get_flag_choices['flag-ur']); ?>/> Urdu</div>
1200
+ <div><input type="checkbox" name="flag_display_settings[flag-vi]" value="1" <?php checked( 1,$get_flag_choices['flag-vi']); ?>/> Vietnamese</div>
1201
+ <div><input type="checkbox" name="flag_display_settings[flag-cy]" value="1" <?php checked( 1,$get_flag_choices['flag-cy']); ?>/> Welsh</div>
1202
+ <div><input type="checkbox" name="flag_display_settings[flag-yi]" value="1" <?php checked( 1,$get_flag_choices['flag-yi']); ?>/> Yiddish</div>
1203
+ </div>
1204
+ <div style="clear:both"></div>
1205
+ <?php }
1206
+
1207
+ function googlelanguagetranslator_translatebox_cb() {
1208
+
1209
+ $option_name = 'googlelanguagetranslator_translatebox' ;
1210
+ $new_value = 'yes';
1211
+
1212
+ if ( get_option( $option_name ) === false ) {
1213
+
1214
+ // The option does not exist, so we update it.
1215
+ update_option( $option_name, $new_value );
1216
+ }
1217
+
1218
+ $options = get_option (''.$option_name.''); ?>
1219
+
1220
+ <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
1221
+ <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
1222
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
1223
+ </select>
1224
+ <?php }
1225
+
1226
+ function googlelanguagetranslator_display_cb() {
1227
+
1228
+ $option_name = 'googlelanguagetranslator_display' ;
1229
+ $new_value = 'Vertical';
1230
+
1231
+ if ( get_option( $option_name ) === false ) {
1232
+
1233
+ // The option does not exist, so we update it.
1234
+ update_option( $option_name, $new_value );
1235
+ }
1236
+
1237
+ $options = get_option (''.$option_name.''); ?>
1238
+
1239
+ <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
1240
+ <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
1241
+ <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
1242
+
1243
+ </select>
1244
+ <?php }
1245
+
1246
+ function googlelanguagetranslator_toolbar_cb() {
1247
+
1248
+ $option_name = 'googlelanguagetranslator_toolbar' ;
1249
+ $new_value = 'Yes';
1250
+
1251
+ if ( get_option( $option_name ) === false ) {
1252
+
1253
+ // The option does not exist, so we update it.
1254
+ update_option( $option_name, $new_value );
1255
+ }
1256
+
1257
+ $options = get_option (''.$option_name.''); ?>
1258
+
1259
+ <select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
1260
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
1261
+ <option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
1262
+ </select>
1263
+ <?php }
1264
+
1265
+ function googlelanguagetranslator_showbranding_cb() {
1266
+
1267
+ $option_name = 'googlelanguagetranslator_showbranding' ;
1268
+ $new_value = 'Yes';
1269
+
1270
+ if ( get_option( $option_name ) === false ) {
1271
+
1272
+ // The option does not exist, so we update it.
1273
+ update_option( $option_name, $new_value );
1274
+ }
1275
+
1276
+ $options = get_option (''.$option_name.''); ?>
1277
+
1278
+ <select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
1279
+ <option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
1280
+ <option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
1281
+ </select>
1282
+ <?php }
1283
+
1284
+ function googlelanguagetranslator_flags_alignment_cb() {
1285
+
1286
+ $option_name = 'googlelanguagetranslator_flags_alignment' ;
1287
+ $new_value = 'flags_left';
1288
+
1289
+ if ( get_option( $option_name ) === false ) {
1290
+
1291
+ // The option does not exist, so we update it.
1292
+ update_option( $option_name, 'flags_left' );
1293
+ }
1294
+
1295
+ $options = get_option (''.$option_name.''); ?>
1296
+
1297
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_left" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
1298
+ <input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_right" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
1299
+ <?php }
1300
+
1301
+
1302
+ function googlelanguagetranslator_analytics_cb() {
1303
+
1304
+ $option_name = 'googlelanguagetranslator_analytics' ;
1305
+ $new_value = 0;
1306
+
1307
+ if ( get_option( $option_name ) === false ) {
1308
+
1309
+ // The option does not exist, so we update it.
1310
+ update_option( $option_name, $new_value );
1311
+ }
1312
+
1313
+ $options = get_option (''.$option_name.'');
1314
+
1315
+ $html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> &nbsp; Activate Google Analytics tracking?';
1316
+ echo $html;
1317
+ }
1318
+
1319
+ function googlelanguagetranslator_analytics_id_cb() {
1320
+
1321
+ $option_name = 'googlelanguagetranslator_analytics_id' ;
1322
+ $new_value = '';
1323
+
1324
+ if ( get_option( $option_name ) === false ) {
1325
+
1326
+ // The option does not exist, so we update it.
1327
+ update_option( $option_name, $new_value );
1328
+ }
1329
+
1330
+ $options = get_option (''.$option_name.'');
1331
+
1332
+ $html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
1333
+ echo $html;
1334
+ }
1335
+
1336
+ function googlelanguagetranslator_css_cb() {
1337
+
1338
+ $option_name = 'googlelanguagetranslator_css' ;
1339
+ $new_value = '';
1340
+
1341
+ if ( get_option( $option_name ) === false ) {
1342
+
1343
+ // The option does not exist, so we update it.
1344
+ update_option( $option_name, $new_value );
1345
+ }
1346
+
1347
+ $options = get_option (''.$option_name.'');
1348
+
1349
+ $html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
1350
+ echo $html;
1351
+ }
1352
+
1353
+ function googlelanguagetranslator_manage_translations_cb() {
1354
+ $option_name = 'googlelanguagetranslator_manage_translations' ;
1355
+ $new_value = 0;
1356
+
1357
+ if ( get_option( $option_name ) === false ) {
1358
+
1359
+ // The option does not exist, so we update it.
1360
+ update_option( $option_name, $new_value );
1361
+ }
1362
+
1363
+ $options = get_option (''.$option_name.'');
1364
+
1365
+ $html = '<input type="checkbox" name="googlelanguagetranslator_manage_translations" id="googlelanguagetranslator_manage_translations" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on translation management?';
1366
+ echo $html;
1367
+ }
1368
+
1369
+ function googlelanguagetranslator_multilanguage_cb() {
1370
+
1371
+ $option_name = 'googlelanguagetranslator_multilanguage' ;
1372
+ $new_value = 0;
1373
+
1374
+ if ( get_option( $option_name ) === false ) {
1375
+
1376
+ // The option does not exist, so we update it.
1377
+ update_option( $option_name, $new_value );
1378
+ }
1379
+
1380
+ $options = get_option (''.$option_name.'');
1381
+
1382
+ $html = '<input type="checkbox" name="googlelanguagetranslator_multilanguage" id="googlelanguagetranslator_multilanguage" value="1" '.checked(1,$options,false).'/> &nbsp; Turn on multilanguage mode?';
1383
+ echo $html;
1384
+ }
1385
+
1386
+
1387
+
1388
+
1389
+ } //End initialize_settings()
1390
+ add_action('admin_init', 'initialize_settings');
1391
+
1392
+
1393
+ // Functions for frontend display
1394
+
1395
+ function googlelanguagetranslator_included_languages() {
1396
+ if ( get_option('googlelanguagetranslator_language_option')=='specific') {
1397
+ $get_language_choices = get_option ('language_display_settings');
1398
+ //print_r($get_language_choices);
1399
+
1400
+ foreach ($get_language_choices as $key=>$value) {
1401
+ if($value == 1) {
1402
+ $items[] = $key;
1403
+ }
1404
+ }
1405
+ $comma_separated = implode(",",array_values($items));
1406
+
1407
+ if ( get_option('googlelanguagetranslator_display') == 'Vertical') {
1408
+ $lang = 'includedLanguages:\''.$comma_separated.'\',';
1409
+ return $lang;
1410
+ } elseif ( get_option('googlelanguagetranslator_display') == 'Horizontal') {
1411
+ $lang = 'includedLanguages:\''.$comma_separated.'\',';
1412
+ return $lang;
1413
+ }
1414
+ }
1415
+ }
1416
+
1417
+ function analytics() {
1418
+ if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
1419
+ $analytics_id = get_option('googlelanguagetranslator_analytics_id');
1420
+ $analytics = 'gaTrack: true, gaId: \''.$analytics_id.'\'';
1421
+ return $analytics;
1422
+ }
1423
+ }
1424
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1425
  ?>
readme.txt CHANGED
@@ -1,147 +1,154 @@
1
- === Google Language Translator ===
2
- Contributors: Rob Myrick
3
- Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=47LFA33AC89S6
4
- Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
- Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
- Requires at least: 2.9
7
- Tested up to: 3.8.1
8
- stable tag: 3.0.2
9
-
10
- Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
-
12
- == Description ==
13
-
14
- Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
15
-
16
- == Installation ==
17
-
18
- 1. Download the zip folder named google-language-translator.zip
19
- 2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
20
- 3. Activate the plugin through the plugin window in the admin panel.
21
- 4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
22
- 5. Copy the shortcode and paste it into a page, post or widget.
23
- 6. Do not use the shortcode twice on a single page - it will not work.
24
-
25
- == Frequently Asked Questions ==
26
-
27
- == Changelog ==
28
-
29
- 1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
30
-
31
- 1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
32
-
33
- 1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
34
-
35
- 1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
36
-
37
- 1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
38
-
39
- 1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
40
-
41
- 1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
42
-
43
- 1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
44
-
45
- 1.9
46
-
47
- - Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
48
-
49
- - Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
50
-
51
- - Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
52
-
53
- - Added jQuery functionality to the settings panel to improve the user experience.
54
-
55
- - Added an option for users to display/hide the flag images.
56
-
57
- - Added an option for users to display/hide the translate box when flags are displayed.
58
-
59
- - Removed the settings.css file - I found a better way of displaying the options without CSS.
60
-
61
- 2.0 Corrected some immediate errors in the 1.9 update.
62
-
63
- 2.1
64
-
65
- - Added language "Dutch" to the Original Language drop-down option on the settings page.
66
-
67
- - Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
68
-
69
- 2.2
70
-
71
- - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
72
-
73
- - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
74
-
75
- - Added link in the settings panel that points to Google's Attribution Policy.
76
-
77
- 2.3
78
-
79
- - Added a "Preview" area on the settings page that allows you to see your settings in action.
80
-
81
- - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
82
-
83
- - Added an option that allows left/right alignment of the translation tool.
84
-
85
- - Added the "Google Language Translator" widget.
86
-
87
- - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
88
-
89
- 2.4
90
-
91
- - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
92
-
93
- 2.5
94
-
95
- - Eliminated an internal Wordpress error being generated from a coding mistake.
96
-
97
- - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
98
-
99
- 2.6
100
-
101
- - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
102
-
103
- 2.7
104
-
105
- - Added Google Analytics tracking capability to the plugin.
106
-
107
- - Added a "CSS Styles" box in the settings panel.
108
-
109
- - Changed the Catalonian flag to its correct flag image.
110
-
111
- - Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
112
-
113
- - Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
114
-
115
-
116
- 2.8
117
-
118
- - Added an option to allow users to manage their own translations directly through their Google Translate account (free). When activated, users can hover over the text of their website, and edit the translations from the webpage directly. Google will remember these translations, and then serve them to users once the edits are made. Users must install the Google Translate Customization meta tag provided through Google Translate here: translate.google.com/manager/website/settings. To obtain this meta tag, users need to configure the Google Translate tool directly from this website (although they will not use this because the plugin provides it), then the user can obtain the meta tag on the "Get Code" screen, which is displayed after configuring the Google Translate tool on this webpage.
119
- - Added an option to allow users to turn on/off Google's multilanguagePage option, that when activated, the original website content will be a forced translation, instead of original content (but only after a translation is made.)
120
- - Added more flexible styles to the settings page, so that left and right panels display nicely to the user.
121
-
122
- 2.9
123
-
124
- ***IMPORTANT: Google's most recent server update is producing display issues for website translation tool. There are major display issues with the translation toolbar and also the translations editing interface. Version 2.9 temporarily hides the edit translation functionality until Google decides to fix this issue, although you can still edit translations directly through your Google account at translate.google.com. Please direct any support requests through Wordpress.org and we will be happy to assist you.
125
-
126
- - Fixed Google Translation toolbar display issue
127
- - Fixed the Edit Translation interface by hiding it temporarily until Google fixes this
128
- - Removed some unneeded styles from the style sheet.
129
- - Fixed some CSS issues for the Google Branding display, which was affected by Google's most recent update
130
-
131
- 3.0
132
-
133
- - Correct a small CSS error that affected the showing/hiding of the Google toolbar.
134
-
135
- 3.0.1
136
-
137
- - Changed the url request to Google to allow both unsecured and secured page translations. Previously, some users experienced errors when trying to use the translator on "https://" (secured) pages.
138
- - Adjusted some minor spacing issues in the settings page HTML (caused some annoying red HTML errors when using "View Source" in right-click menu).
139
- - Removed old CSS styles that were added in the previous 3.0 update - the styles were added when Google servers were being updated, and were producing major translation dislay issues until their update was complete. Now the styles I added are no longer needed.
140
-
141
- 3.0.2
142
-
143
- - Adjusted additional minor invalid HTML issues on the settings page, and also in the front-end plugin display.
144
-
145
- == Screenshots ==
146
-
147
- 1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.
 
 
 
 
 
 
 
1
+ === Google Language Translator ===
2
+ Contributors: Rob Myrick
3
+ Donate link: http://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=47LFA33AC89S6
4
+ Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
+ Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
+ Requires at least: 2.9
7
+ Tested up to: 3.8.1
8
+ stable tag: 3.0.3
9
+
10
+ Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
+
12
+ == Description ==
13
+
14
+ Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
15
+
16
+ == Installation ==
17
+
18
+ 1. Download the zip folder named google-language-translator.zip
19
+ 2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
20
+ 3. Activate the plugin through the plugin window in the admin panel.
21
+ 4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
22
+ 5. Copy the shortcode and paste it into a page, post or widget.
23
+ 6. Do not use the shortcode twice on a single page - it will not work.
24
+
25
+ == Frequently Asked Questions ==
26
+
27
+ == Changelog ==
28
+
29
+ 1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
30
+
31
+ 1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
32
+
33
+ 1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
34
+
35
+ 1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
36
+
37
+ 1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
38
+
39
+ 1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
40
+
41
+ 1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
42
+
43
+ 1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
44
+
45
+ 1.9
46
+
47
+ - Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
48
+
49
+ - Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
50
+
51
+ - Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
52
+
53
+ - Added jQuery functionality to the settings panel to improve the user experience.
54
+
55
+ - Added an option for users to display/hide the flag images.
56
+
57
+ - Added an option for users to display/hide the translate box when flags are displayed.
58
+
59
+ - Removed the settings.css file - I found a better way of displaying the options without CSS.
60
+
61
+ 2.0 Corrected some immediate errors in the 1.9 update.
62
+
63
+ 2.1
64
+
65
+ - Added language "Dutch" to the Original Language drop-down option on the settings page.
66
+
67
+ - Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
68
+
69
+ 2.2
70
+
71
+ - Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
72
+
73
+ - Changed flag image for the English language (changed United States flag to the United Kingdom flag).
74
+
75
+ - Added link in the settings panel that points to Google's Attribution Policy.
76
+
77
+ 2.3
78
+
79
+ - Added a "Preview" area on the settings page that allows you to see your settings in action.
80
+
81
+ - Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
82
+
83
+ - Added an option that allows left/right alignment of the translation tool.
84
+
85
+ - Added the "Google Language Translator" widget.
86
+
87
+ - Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
88
+
89
+ 2.4
90
+
91
+ - Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
92
+
93
+ 2.5
94
+
95
+ - Eliminated an internal Wordpress error being generated from a coding mistake.
96
+
97
+ - Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
98
+
99
+ 2.6
100
+
101
+ - Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
102
+
103
+ 2.7
104
+
105
+ - Added Google Analytics tracking capability to the plugin.
106
+
107
+ - Added a "CSS Styles" box in the settings panel.
108
+
109
+ - Changed the Catalonian flag to its correct flag image.
110
+
111
+ - Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
112
+
113
+ - Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
114
+
115
+
116
+ 2.8
117
+
118
+ - Added an option to allow users to manage their own translations directly through their Google Translate account (free). When activated, users can hover over the text of their website, and edit the translations from the webpage directly. Google will remember these translations, and then serve them to users once the edits are made. Users must install the Google Translate Customization meta tag provided through Google Translate here: translate.google.com/manager/website/settings. To obtain this meta tag, users need to configure the Google Translate tool directly from this website (although they will not use this because the plugin provides it), then the user can obtain the meta tag on the "Get Code" screen, which is displayed after configuring the Google Translate tool on this webpage.
119
+ - Added an option to allow users to turn on/off Google's multilanguagePage option, that when activated, the original website content will be a forced translation, instead of original content (but only after a translation is made.)
120
+ - Added more flexible styles to the settings page, so that left and right panels display nicely to the user.
121
+
122
+ 2.9
123
+
124
+ ***IMPORTANT: Google's most recent server update is producing display issues for website translation tool. There are major display issues with the translation toolbar and also the translations editing interface. Version 2.9 temporarily hides the edit translation functionality until Google decides to fix this issue, although you can still edit translations directly through your Google account at translate.google.com. Please direct any support requests through Wordpress.org and we will be happy to assist you.
125
+
126
+ - Fixed Google Translation toolbar display issue
127
+ - Fixed the Edit Translation interface by hiding it temporarily until Google fixes this
128
+ - Removed some unneeded styles from the style sheet.
129
+ - Fixed some CSS issues for the Google Branding display, which was affected by Google's most recent update
130
+
131
+ 3.0
132
+
133
+ - Correct a small CSS error that affected the showing/hiding of the Google toolbar.
134
+
135
+ 3.0.1
136
+
137
+ - Changed the url request to Google to allow both unsecured and secured page translations. Previously, some users experienced errors when trying to use the translator on "https://" (secured) pages.
138
+ - Adjusted some minor spacing issues in the settings page HTML (caused some annoying red HTML errors when using "View Source" in right-click menu).
139
+ - Removed old CSS styles that were added in the previous 3.0 update - the styles were added when Google servers were being updated, and were producing major translation dislay issues until their update was complete. Now the styles I added are no longer needed.
140
+
141
+ 3.0.2
142
+
143
+ - Adjusted additional minor invalid HTML issues on the settings page, and also in the front-end plugin display.
144
+
145
+ 3.0.3
146
+
147
+ - Re-factored/Re-arranged some of the code in googlelanguagetranslator.php by placing them into separate files.
148
+ - Fixed a minor coding issue in glt_widget.php - this was generating an error in Wordpress when debugging.
149
+ - Moved all CSS code into a single file. The result is nice, clean inline CSS code that is now called only once.
150
+ - Fixed some additional CSS display issues.
151
+
152
+ == Screenshots ==
153
+
154
+ 1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.