Google Language Translator - Version 3.0.5

Version Description

Download this release

Release Info

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

Code changes from version 3.0.4 to 3.0.5

css/bootstrap-icons.css ADDED
@@ -0,0 +1,487 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v2.2.2
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+ .clearfix {
11
+ *zoom: 1;
12
+ }
13
+ .clearfix:before,
14
+ .clearfix:after {
15
+ display: table;
16
+ content: "";
17
+ line-height: 0;
18
+ }
19
+ .clearfix:after {
20
+ clear: both;
21
+ }
22
+ .hide-text {
23
+ font: 0/0 a;
24
+ color: transparent;
25
+ text-shadow: none;
26
+ background-color: transparent;
27
+ border: 0;
28
+ }
29
+ .input-block-level {
30
+ display: block;
31
+ width: 100%;
32
+ min-height: 30px;
33
+ -webkit-box-sizing: border-box;
34
+ -moz-box-sizing: border-box;
35
+ box-sizing: border-box;
36
+ }
37
+ [class^="icon-"],
38
+ [class*=" icon-"] {
39
+ display: inline-block;
40
+ width: 14px;
41
+ height: 14px;
42
+ *margin-right: .3em;
43
+ line-height: 14px;
44
+ vertical-align: text-top;
45
+ background-image: url("glyphicons-halflings.png");
46
+ background-position: 14px 14px;
47
+ background-repeat: no-repeat;
48
+ margin-top: 9px;
49
+ }
50
+ /* White icons with optional class, or on hover/active states of certain elements */
51
+ .icon-white,
52
+ .nav-pills > .active > a > [class^="icon-"],
53
+ .nav-pills > .active > a > [class*=" icon-"],
54
+ .nav-list > .active > a > [class^="icon-"],
55
+ .nav-list > .active > a > [class*=" icon-"],
56
+ .navbar-inverse .nav > .active > a > [class^="icon-"],
57
+ .navbar-inverse .nav > .active > a > [class*=" icon-"],
58
+ .dropdown-menu > li > a:hover > [class^="icon-"],
59
+ .dropdown-menu > li > a:hover > [class*=" icon-"],
60
+ .dropdown-menu > .active > a > [class^="icon-"],
61
+ .dropdown-menu > .active > a > [class*=" icon-"],
62
+ .dropdown-submenu:hover > a > [class^="icon-"],
63
+ .dropdown-submenu:hover > a > [class*=" icon-"] {
64
+ background-image: url("../img/glyphicons-halflings-white.png");
65
+ }
66
+ .icon-glass {
67
+ background-position: 0 0;
68
+ }
69
+ .icon-music {
70
+ background-position: -24px 0;
71
+ }
72
+ .icon-search {
73
+ background-position: -48px 0;
74
+ }
75
+ .icon-envelope {
76
+ background-position: -72px 0;
77
+ }
78
+ .icon-heart {
79
+ background-position: -96px 0;
80
+ }
81
+ .icon-star {
82
+ background-position: -120px 0;
83
+ }
84
+ .icon-star-empty {
85
+ background-position: -144px 0;
86
+ }
87
+ .icon-user {
88
+ background-position: -168px 0;
89
+ }
90
+ .icon-film {
91
+ background-position: -192px 0;
92
+ }
93
+ .icon-th-large {
94
+ background-position: -216px 0;
95
+ }
96
+ .icon-th {
97
+ background-position: -240px 0;
98
+ }
99
+ .icon-th-list {
100
+ background-position: -264px 0;
101
+ }
102
+ .icon-ok {
103
+ background-position: -288px 0;
104
+ }
105
+ .icon-remove {
106
+ background-position: -312px 0;
107
+ }
108
+ .icon-zoom-in {
109
+ background-position: -336px 0;
110
+ }
111
+ .icon-zoom-out {
112
+ background-position: -360px 0;
113
+ }
114
+ .icon-off {
115
+ background-position: -384px 0;
116
+ }
117
+ .icon-signal {
118
+ background-position: -408px 0;
119
+ }
120
+ .icon-cog {
121
+ background-position: -432px 0;
122
+ }
123
+ .icon-trash {
124
+ background-position: -456px 0;
125
+ }
126
+ .icon-home {
127
+ background-position: 0 -24px;
128
+ }
129
+ .icon-file {
130
+ background-position: -24px -24px;
131
+ }
132
+ .icon-time {
133
+ background-position: -48px -24px;
134
+ }
135
+ .icon-road {
136
+ background-position: -72px -24px;
137
+ }
138
+ .icon-download-alt {
139
+ background-position: -96px -24px;
140
+ }
141
+ .icon-download {
142
+ background-position: -120px -24px;
143
+ }
144
+ .icon-upload {
145
+ background-position: -144px -24px;
146
+ }
147
+ .icon-inbox {
148
+ background-position: -168px -24px;
149
+ }
150
+ .icon-play-circle {
151
+ background-position: -192px -24px;
152
+ }
153
+ .icon-repeat {
154
+ background-position: -216px -24px;
155
+ }
156
+ .icon-refresh {
157
+ background-position: -240px -24px;
158
+ }
159
+ .icon-list-alt {
160
+ background-position: -264px -24px;
161
+ }
162
+ .icon-lock {
163
+ background-position: -287px -24px;
164
+ }
165
+ .icon-flag {
166
+ background-position: -312px -24px;
167
+ }
168
+ .icon-headphones {
169
+ background-position: -336px -24px;
170
+ }
171
+ .icon-volume-off {
172
+ background-position: -360px -24px;
173
+ }
174
+ .icon-volume-down {
175
+ background-position: -384px -24px;
176
+ }
177
+ .icon-volume-up {
178
+ background-position: -408px -24px;
179
+ }
180
+ .icon-qrcode {
181
+ background-position: -432px -24px;
182
+ }
183
+ .icon-barcode {
184
+ background-position: -456px -24px;
185
+ }
186
+ .icon-tag {
187
+ background-position: 0 -48px;
188
+ }
189
+ .icon-tags {
190
+ background-position: -25px -48px;
191
+ }
192
+ .icon-book {
193
+ background-position: -48px -48px;
194
+ }
195
+ .icon-bookmark {
196
+ background-position: -72px -48px;
197
+ }
198
+ .icon-print {
199
+ background-position: -96px -48px;
200
+ }
201
+ .icon-camera {
202
+ background-position: -120px -48px;
203
+ }
204
+ .icon-font {
205
+ background-position: -144px -48px;
206
+ }
207
+ .icon-bold {
208
+ background-position: -167px -48px;
209
+ }
210
+ .icon-italic {
211
+ background-position: -192px -48px;
212
+ }
213
+ .icon-text-height {
214
+ background-position: -216px -48px;
215
+ }
216
+ .icon-text-width {
217
+ background-position: -240px -48px;
218
+ }
219
+ .icon-align-left {
220
+ background-position: -264px -48px;
221
+ }
222
+ .icon-align-center {
223
+ background-position: -288px -48px;
224
+ }
225
+ .icon-align-right {
226
+ background-position: -312px -48px;
227
+ }
228
+ .icon-align-justify {
229
+ background-position: -336px -48px;
230
+ }
231
+ .icon-list {
232
+ background-position: -360px -48px;
233
+ }
234
+ .icon-indent-left {
235
+ background-position: -384px -48px;
236
+ }
237
+ .icon-indent-right {
238
+ background-position: -408px -48px;
239
+ }
240
+ .icon-facetime-video {
241
+ background-position: -432px -48px;
242
+ }
243
+ .icon-picture {
244
+ background-position: -456px -48px;
245
+ }
246
+ .icon-pencil {
247
+ background-position: 0 -72px;
248
+ }
249
+ .icon-map-marker {
250
+ background-position: -24px -72px;
251
+ }
252
+ .icon-adjust {
253
+ background-position: -48px -72px;
254
+ }
255
+ .icon-tint {
256
+ background-position: -72px -72px;
257
+ }
258
+ .icon-edit {
259
+ background-position: -96px -72px;
260
+ }
261
+ .icon-share {
262
+ background-position: -120px -72px;
263
+ }
264
+ .icon-check {
265
+ background-position: -144px -72px;
266
+ }
267
+ .icon-move {
268
+ background-position: -168px -72px;
269
+ }
270
+ .icon-step-backward {
271
+ background-position: -192px -72px;
272
+ }
273
+ .icon-fast-backward {
274
+ background-position: -216px -72px;
275
+ }
276
+ .icon-backward {
277
+ background-position: -240px -72px;
278
+ }
279
+ .icon-play {
280
+ background-position: -264px -72px;
281
+ }
282
+ .icon-pause {
283
+ background-position: -288px -72px;
284
+ }
285
+ .icon-stop {
286
+ background-position: -312px -72px;
287
+ }
288
+ .icon-forward {
289
+ background-position: -336px -72px;
290
+ }
291
+ .icon-fast-forward {
292
+ background-position: -360px -72px;
293
+ }
294
+ .icon-step-forward {
295
+ background-position: -384px -72px;
296
+ }
297
+ .icon-eject {
298
+ background-position: -408px -72px;
299
+ }
300
+ .icon-chevron-left {
301
+ background-position: -432px -72px;
302
+ }
303
+ .icon-chevron-right {
304
+ background-position: -456px -72px;
305
+ }
306
+ .icon-plus-sign {
307
+ background-position: 0 -96px;
308
+ }
309
+ .icon-minus-sign {
310
+ background-position: -24px -96px;
311
+ }
312
+ .icon-remove-sign {
313
+ background-position: -48px -96px;
314
+ }
315
+ .icon-ok-sign {
316
+ background-position: -72px -96px;
317
+ }
318
+ .icon-question-sign {
319
+ background-position: -96px -96px;
320
+ }
321
+ .icon-info-sign {
322
+ background-position: -120px -96px;
323
+ }
324
+ .icon-screenshot {
325
+ background-position: -144px -96px;
326
+ }
327
+ .icon-remove-circle {
328
+ background-position: -168px -96px;
329
+ }
330
+ .icon-ok-circle {
331
+ background-position: -192px -96px;
332
+ }
333
+ .icon-ban-circle {
334
+ background-position: -216px -96px;
335
+ }
336
+ .icon-arrow-left {
337
+ background-position: -240px -96px;
338
+ }
339
+ .icon-arrow-right {
340
+ background-position: -264px -96px;
341
+ }
342
+ .icon-arrow-up {
343
+ background-position: -289px -96px;
344
+ }
345
+ .icon-arrow-down {
346
+ background-position: -312px -96px;
347
+ }
348
+ .icon-share-alt {
349
+ background-position: -336px -96px;
350
+ }
351
+ .icon-resize-full {
352
+ background-position: -360px -96px;
353
+ }
354
+ .icon-resize-small {
355
+ background-position: -384px -96px;
356
+ }
357
+ .icon-plus {
358
+ background-position: -408px -96px;
359
+ }
360
+ .icon-minus {
361
+ background-position: -433px -96px;
362
+ }
363
+ .icon-asterisk {
364
+ background-position: -456px -96px;
365
+ }
366
+ .icon-exclamation-sign {
367
+ background-position: 0 -120px;
368
+ }
369
+ .icon-gift {
370
+ background-position: -24px -120px;
371
+ }
372
+ .icon-leaf {
373
+ background-position: -48px -120px;
374
+ }
375
+ .icon-fire {
376
+ background-position: -72px -120px;
377
+ }
378
+ .icon-eye-open {
379
+ background-position: -96px -120px;
380
+ }
381
+ .icon-eye-close {
382
+ background-position: -120px -120px;
383
+ }
384
+ .icon-warning-sign {
385
+ background-position: -144px -120px;
386
+ }
387
+ .icon-plane {
388
+ background-position: -168px -120px;
389
+ }
390
+ .icon-calendar {
391
+ background-position: -192px -120px;
392
+ }
393
+ .icon-random {
394
+ background-position: -216px -120px;
395
+ width: 16px;
396
+ }
397
+ .icon-comment {
398
+ background-position: -240px -120px;
399
+ }
400
+ .icon-magnet {
401
+ background-position: -264px -120px;
402
+ }
403
+ .icon-chevron-up {
404
+ background-position: -288px -120px;
405
+ }
406
+ .icon-chevron-down {
407
+ background-position: -313px -119px;
408
+ }
409
+ .icon-retweet {
410
+ background-position: -336px -120px;
411
+ }
412
+ .icon-shopping-cart {
413
+ background-position: -360px -120px;
414
+ }
415
+ .icon-folder-close {
416
+ background-position: -384px -120px;
417
+ }
418
+ .icon-folder-open {
419
+ background-position: -408px -120px;
420
+ width: 16px;
421
+ }
422
+ .icon-resize-vertical {
423
+ background-position: -432px -119px;
424
+ }
425
+ .icon-resize-horizontal {
426
+ background-position: -456px -118px;
427
+ }
428
+ .icon-hdd {
429
+ background-position: 0 -144px;
430
+ }
431
+ .icon-bullhorn {
432
+ background-position: -24px -144px;
433
+ }
434
+ .icon-bell {
435
+ background-position: -48px -144px;
436
+ }
437
+ .icon-certificate {
438
+ background-position: -72px -144px;
439
+ }
440
+ .icon-thumbs-up {
441
+ background-position: -96px -144px;
442
+ }
443
+ .icon-thumbs-down {
444
+ background-position: -120px -144px;
445
+ }
446
+ .icon-hand-right {
447
+ background-position: -144px -144px;
448
+ }
449
+ .icon-hand-left {
450
+ background-position: -168px -144px;
451
+ }
452
+ .icon-hand-up {
453
+ background-position: -192px -144px;
454
+ }
455
+ .icon-hand-down {
456
+ background-position: -216px -144px;
457
+ }
458
+ .icon-circle-arrow-right {
459
+ background-position: -240px -144px;
460
+ }
461
+ .icon-circle-arrow-left {
462
+ background-position: -264px -144px;
463
+ }
464
+ .icon-circle-arrow-up {
465
+ background-position: -288px -144px;
466
+ }
467
+ .icon-circle-arrow-down {
468
+ background-position: -312px -144px;
469
+ }
470
+ .icon-globe {
471
+ background-position: -336px -144px;
472
+ }
473
+ .icon-wrench {
474
+ background-position: -360px -144px;
475
+ }
476
+ .icon-tasks {
477
+ background-position: -384px -144px;
478
+ }
479
+ .icon-filter {
480
+ background-position: -408px -144px;
481
+ }
482
+ .icon-briefcase {
483
+ background-position: -432px -144px;
484
+ }
485
+ .icon-fullscreen {
486
+ background-position: -456px -144px;
487
+ }
css/style.css CHANGED
@@ -119,4 +119,16 @@ span.vertical-translator {
119
  margin-top: 2px;
120
  right: -50px;
121
  z-index: 9999;
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
119
  margin-top: 2px;
120
  right: -50px;
121
  z-index: 9999;
122
+ }
123
+
124
+ .tool-items .flag img {
125
+ margin-top:1px !important;
126
+ }
127
+
128
+ .tool-items .flag {
129
+ padding:0px !important;
130
+ }
131
+
132
+ .tool-container {
133
+ line-height:1;
134
  }
css/toolbar.css ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #glt-toolbar { display:none; }
2
+ #glt-translate-trigger {
3
+ position:fixed;
4
+ bottom:0px;
5
+ top:auto;
6
+ right: 20px;
7
+ z-index:200002;
8
+ padding:6px 20px 3px;
9
+ font-size:16px;
10
+ font-family:Arial;
11
+ font-weight:700;
12
+ color:#fff;
13
+ text-shadow:0px -1px 0px rgba(0,0,0,0.25);
14
+ text-decoration:none;
15
+ text-align:center;
16
+ border-top-left-radius:5px;
17
+ border-top-right-radius:5px;
18
+ -webkit-border-top-left-radius:5px;
19
+ -webkit-border-top-right-radius:5px;
20
+ -moz-border-top-left-radius:5px;
21
+ -moz-border-top-right-radius:5px;
22
+ box-shadow:0px 0px 9px rgba(0,0,0,0.3)
23
+ -webkit-box-shadow:0px 0px 9px rgba(0,0,0,0.3);
24
+ -moz-box-shadow:0px 0px 9px rgba(0,0,0,0.3);
25
+ box-sizing:content-box !important;
26
+ -webkit-box-sizing:content-box !important;
27
+ -moz-box-sizing:content-box !important;
28
+ background:linear-gradient(center top, #fbb450, #f89406);
29
+ background: -webkit-gradient(linear, center top, center bottom, from(#fbb450), to(#f89406));
30
+ background: -webkit-linear-gradient(#fbb450, #f89406);
31
+ background: -moz-linear-gradient(#fbb450, #f89406);
32
+ background: -o-linear-gradient(#fbb450, #f89406);
33
+ background: -ms-linear-gradient(#fbb450, #f89406);
34
+ background: linear-gradient(#fbb450, #f89406);
35
+
36
+ background: -o-linear-gradientcenter (center top, #fbb450, #f89406); /* For Opera 11.1 to 12.0 */
37
+ }
38
+
39
+ .tool-container {
40
+ background-color: #d0cbcb;
41
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(14%, #d0cbcb), color-stop(100%, #e9e5e5));
42
+ background: -moz-linear-gradient(top, #d0cbcb 14%, #e9e5e5 100%);
43
+ background: -ms-linear-gradient(top, #d0cbcb 14%,#e9e5e5 100%);
44
+ background: linear-gradient(to bottom, #d0cbcb 14%,#e9e5e5 100%);
45
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIxNCUiIHN0b3AtY29sb3I9IiNkMGNiY2IiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZTllNWU1IiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
46
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d0cbcb', endColorstr='#e9e5e5',GradientType=0 );
47
+ background-size: 100% 100%;
48
+ border-radius: 3px;
49
+ box-shadow: 0px 0px 15px #000;
50
+ position: absolute;
51
+ }
52
+
53
+ .tool-container.tool-top, .tool-container.tool-bottom {
54
+ height: 27px;
55
+ border-bottom: 1px solid #beb8b8 ; /* #B1A9A9 */
56
+ }
57
+
58
+ .tool-items {
59
+ height: 100%;
60
+ }
61
+
62
+ .tool-top .tool-item, .tool-bottom .tool-item {
63
+ float: left;
64
+ /*border-right: 1px solid #e2dfdf;
65
+ border-left: 1px solid #9f9898;*/
66
+ }
67
+
68
+ .tool-left .tool-item, .tool-right .tool-item {
69
+ height: 34px;
70
+ border-top: 1px solid #e2dfdf;
71
+ border-bottom: 1px solid #9f9898;
72
+ }
73
+
74
+
75
+ .tool-item {
76
+ height: 100%;
77
+ display: block;
78
+ width: 34px;
79
+ text-align: center;
80
+ }
81
+
82
+ .tool-item:first-child {
83
+ border-left: none;
84
+ }
85
+
86
+ .tool-left .tool-item:first-child, .tool-right .tool-item:first-child {
87
+ border-top: 1px solid transparent;
88
+ }
89
+
90
+ .tool-item:last-child {
91
+ border-right: none;
92
+ border-bottom: none;
93
+ }
94
+
95
+ .tool-item.selected, .tool-item:hover {
96
+ background: #a79f9f;
97
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #a79f9f), color-stop(93%, #e2dfdf));
98
+ background: -moz-linear-gradient(top, #a79f9f 0%, #e2dfdf 93%);
99
+ background: -ms-linear-gradient(top, #a79f9f 0%, #e2dfdf 93%);
100
+ background: linear-gradient(to bottom, #a79f9f 0%, #e2dfdf 93%);
101
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E3OWY5ZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjkzJSIgc3RvcC1jb2xvcj0iI2UyZGZkZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
102
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a79f9f', endColorstr='#e2dfdf',GradientType=0 );
103
+ }
104
+
105
+ .tool-top .tool-item:last-child:hover, .tool-bottom .tool-item:last-child:hover {
106
+ border-top-right-radius: 4px;
107
+ border-bottom-right-radius: 4px;
108
+ }
109
+
110
+ .tool-top .tool-item:first-child:hover, .tool-bottom .tool-item:first-child:hover {
111
+ border-top-left-radius: 4px;
112
+ border-bottom-left-radius: 4px;
113
+ }
114
+
115
+ .tool-left .tool-item:last-child:hover, .tool-right .tool-item:last-child:hover {
116
+ border-bottom-right-radius: 4px;
117
+ border-bottom-left-radius: 4px;
118
+ }
119
+
120
+ .tool-left .tool-item:first-child:hover, .tool-right .tool-item:first-child:hover {
121
+ border-top-right-radius: 4px;
122
+ border-top-left-radius: 4px;
123
+ }
124
+
125
+ .tool-container .arrow {
126
+ width:0;
127
+ height:0;
128
+ position: absolute;
129
+ border-width:7px;
130
+ border-style:solid;
131
+ }
132
+
133
+ .tool-container.tool-top .arrow {
134
+ border-color: #e9e5e5 transparent transparent;
135
+ left: 50%;
136
+ bottom: -14px;
137
+ margin-left: -7px;
138
+ }
139
+
140
+ .tool-container.tool-bottom .arrow {
141
+ border-color: transparent transparent #e9e5e5;
142
+ left: 50%;
143
+ top: -14px;
144
+ margin-left: -7px;
145
+ }
146
+
147
+ .tool-container.tool-left .arrow {
148
+ border-color: transparent transparent transparent #E9E5E5;
149
+ top: 50%;
150
+ right: -14px;
151
+ margin-top: -7px;
152
+ }
153
+
154
+ .tool-container.tool-right .arrow {
155
+ border-color: transparent #E9E5E5 transparent transparent;
156
+ top: 50%;
157
+ left: -14px;
158
+ margin-top: -7px;
159
+ }
160
+
161
+ .demo-link {
162
+ color: #89CDE4;
163
+ text-decoration: underline;
164
+ cursor: pointer;
165
+ margin-left: 30px;
166
+ }
167
+
168
+ .demo-link:hover {
169
+ text-decoration: none;
170
+ cursor: pointer;
171
+ }
glt_horizontal.php CHANGED
@@ -4,15 +4,307 @@ 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
 
@@ -325,8 +617,8 @@ function googlelanguagetranslator_horizontal(){
325
  <div id="google_language_translator"></div>';
326
  return $str;
327
  }
328
-
329
- }
330
  }
 
331
  }
332
  ?>
4
  $is_active = get_option ( 'googlelanguagetranslator_active' );
5
  $get_flag_choices = get_option ('flag_display_settings');
6
  $language_choices = googlelanguagetranslator_included_languages();
7
+ $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
8
 
9
+ if( $is_active == 1){
10
+ if ($floating_widget=='yes') {
11
+ $str='<div id="glt-translate-trigger"><span class="notranslate">Translate &raquo;</strong></div>';
12
+ $str.='<div id="glt-toolbar">';
13
+ if ( isset ( $get_flag_choices['flag-af'] ) ) {
14
+ $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="24" width="24" alt="Afrikaans"/></a>';
15
+ }
16
+
17
+
18
+ if ( isset ( $get_flag_choices['flag-sq'] ) ) {
19
+ $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="24" width="24" alt="Albanian"/></a>';
20
+ }
21
+
22
+ if ( isset ( $get_flag_choices['flag-ar'] ) ) {
23
+ $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="24" width="24" alt="Arabic"/></a>';
24
+ }
25
+
26
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
27
+ $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="24" width="24" alt="Armenian"/></a>';
28
+ }
29
+
30
+ if ( isset ( $get_flag_choices['flag-az'] ) ) {
31
+ $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="24" width="24" alt="Azerbaijani"/></a>';
32
+ }
33
+
34
+ if ( isset ( $get_flag_choices['flag-eu'] ) ) {
35
+ $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="24" width="24" alt="Basque"/></a>';
36
+ }
37
+
38
+ if ( isset ( $get_flag_choices['flag-be'] ) ) {
39
+ $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="24" width="24" alt="Belarus"/></a>';
40
+ }
41
+
42
+ if ( isset ( $get_flag_choices['flag-bn'] ) ) {
43
+ $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="24" width="24" alt="Bengali"/></a>';
44
+ }
45
+
46
+ if ( isset ( $get_flag_choices['flag-bs'] ) ) {
47
+ $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="24" width="24" alt="Bosnian"/></a>';
48
+ }
49
+
50
+ if ( isset ( $get_flag_choices['flag-bg'] ) ) {
51
+ $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="24" width="24" alt="Bulgarian"/></a>';
52
+ }
53
+
54
+ if ( isset ( $get_flag_choices['flag-ca'] ) ) {
55
+ $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="24" width="24" alt="Catalan"/></a>';
56
+ }
57
+
58
+ if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
59
+ $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="24" width="24" alt="Afrikaans"/></a>';
60
+ }
61
+
62
+ if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
63
+ $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="24" width="24" alt="Chinese (Simplified)"/></a>';
64
+ }
65
+
66
+ if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
67
+ $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="24" width="24" alt="Chinese (Traditional)"/></a>';
68
+ }
69
+
70
+ if ( isset ( $get_flag_choices['flag-cs'] ) ) {
71
+ $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="24" width="24" alt="Czech"/></a>';
72
+ }
73
+
74
+ if ( isset ( $get_flag_choices['flag-hr'] ) ) {
75
+ $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="24" width="24" alt="Croatian"/></a>';
76
+ }
77
+
78
+ if ( isset ( $get_flag_choices['flag-da'] ) ) {
79
+ $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="24" width="24" alt="Danish"/></a>';
80
+ }
81
+
82
+ if ( isset ( $get_flag_choices['flag-nl'] ) ) {
83
+ $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="24" width="24" alt="Dutch"/></a>';
84
+ }
85
+
86
+ if ( isset ( $get_flag_choices['flag-en'] ) ) {
87
+ $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="24" width="24" alt="English"/></a>';
88
+ }
89
+
90
+ if ( isset ( $get_flag_choices['flag-eo'] ) ) {
91
+ $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="24" width="24" alt="Esperanto"/></a>';
92
+ }
93
+
94
+ if ( isset ( $get_flag_choices['flag-et'] ) ) {
95
+ $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="24" width="24" alt="Estonian"/></a>';
96
+ }
97
+
98
+ if ( isset ( $get_flag_choices['flag-tl'] ) ) {
99
+ $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="24" width="24" alt="Filipino"/></a>';
100
+ }
101
+
102
+ if ( isset ( $get_flag_choices['flag-fi'] ) ) {
103
+ $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="24" width="24" alt="Finnish"/></a>';
104
+ }
105
+
106
+ if ( isset ( $get_flag_choices['flag-fr'] ) ) {
107
+ $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="24" width="24" alt="French"/></a>';
108
+ }
109
+
110
+ if ( isset ( $get_flag_choices['flag-gl'] ) ) {
111
+ $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="24" width="24" alt="Galician"/></a>';
112
+ }
113
+
114
+ if ( isset ( $get_flag_choices['flag-ka'] ) ) {
115
+ $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="24" width="24" alt="Georgian"/></a>';
116
+ }
117
+
118
+ if ( isset ( $get_flag_choices['flag-de'] ) ) {
119
+ $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="24" width="24" alt="German"/></a>';
120
+ }
121
+
122
+ if ( isset ( $get_flag_choices['flag-el'] ) ) {
123
+ $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="24" width="24" alt="Greek"/></a>';
124
+ }
125
+
126
+ if ( isset ( $get_flag_choices['flag-gu'] ) ) {
127
+ $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="24" width="24" alt="Gujarati"/></a>';
128
+ }
129
+
130
+ if ( isset ( $get_flag_choices['flag-ht'] ) ) {
131
+ $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="24" width="24" alt="Haitian"/></a>';
132
+ }
133
+
134
+ if ( isset ( $get_flag_choices['flag-iw'] ) ) {
135
+ $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="24" width="24" alt="Hebrew"/></a>';
136
+ }
137
+
138
+ if ( isset ( $get_flag_choices['flag-hi'] ) ) {
139
+ $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="24" width="24" alt="Hindi"/></a>';
140
+ }
141
+
142
+ if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
143
+ $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="24" width="24" alt="Hmong"/></a>';
144
+ }
145
+
146
+ if ( isset ( $get_flag_choices['flag-hu'] ) ) {
147
+ $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="24" width="24" alt="Hungarian"/></a>';
148
+ }
149
+
150
+ if ( isset ( $get_flag_choices['flag-is'] ) ) {
151
+ $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="24" width="24" alt="Icelandic"/></a>';
152
+ }
153
+
154
+ if ( isset ( $get_flag_choices['flag-id'] ) ) {
155
+ $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="24" width="24" alt="Indonesian"/></a>';
156
+ }
157
+
158
+ if ( isset ( $get_flag_choices['flag-ga'] ) ) {
159
+ $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="24" width="24" alt="Irish"/></a>';
160
+ }
161
+
162
+ if ( isset ( $get_flag_choices['flag-it'] ) ) {
163
+ $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="24" width="24" alt="Italian"/></a>';
164
+ }
165
+
166
+ if ( isset ( $get_flag_choices['flag-ja'] ) ) {
167
+ $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="24" width="24" alt="Japanese"/></a>';
168
+ }
169
+
170
+ if ( isset ( $get_flag_choices['flag-jw'] ) ) {
171
+ $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="24" width="24" alt="Javanese"/></a>';
172
+ }
173
+
174
+ if ( isset ( $get_flag_choices['flag-kn'] ) ) {
175
+ $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="24" width="24" alt="Kannada"/></a>';
176
+ }
177
+
178
+ if ( isset ( $get_flag_choices['flag-km'] ) ) {
179
+ $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="24" width="24" alt="Khmer"/></a>';
180
+ }
181
+
182
+ if ( isset ( $get_flag_choices['flag-ko'] ) ) {
183
+ $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="24" width="24" alt="Korea"/></a>';
184
+ }
185
+
186
+ if ( isset ( $get_flag_choices['flag-lo'] ) ) {
187
+ $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="24" width="24" alt="Laos"/></a>';
188
+ }
189
+
190
+ if ( isset ( $get_flag_choices['flag-la'] ) ) {
191
+ $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="24" width="24" alt="Latin"/></a>';
192
+ }
193
+
194
+ if ( isset ( $get_flag_choices['flag-lv'] ) ) {
195
+ $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="24" width="24" alt="Latvian"/></a>';
196
+ }
197
+
198
+ if ( isset ( $get_flag_choices['flag-lt'] ) ) {
199
+ $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="24" width="24" alt="Lithuanian"/></a>';
200
+ }
201
+
202
+ if ( isset ( $get_flag_choices['flag-mk'] ) ) {
203
+ $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="24" width="24" alt="Macedonian"/></a>';
204
+ }
205
+
206
+ if ( isset ( $get_flag_choices['flag-ms'] ) ) {
207
+ $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="24" width="24" alt="Malay"/></a>';
208
+ }
209
+
210
+ if ( isset ( $get_flag_choices['flag-mt'] ) ) {
211
+ $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="24" width="24" alt="Malta"/></a>';
212
+ }
213
+
214
+ if ( isset ( $get_flag_choices['flag-mr'] ) ) {
215
+ $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="24" width="24" alt="Marathi"/></a>';
216
+ }
217
+
218
+ if ( isset ( $get_flag_choices['flag-no'] ) ) {
219
+ $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="24" width="24" alt="Norwegian"/></a>';
220
+ }
221
+
222
+ if ( isset ( $get_flag_choices['flag-fa'] ) ) {
223
+ $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="24" width="24" alt="Persian"/></a>';
224
+ }
225
+
226
+ if ( isset ( $get_flag_choices['flag-pl'] ) ) {
227
+ $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="24" width="24" alt="Polish"/></a>';
228
+ }
229
+
230
+ if ( isset ( $get_flag_choices['flag-pt'] ) ) {
231
+ $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="24" width="24" alt="Portuguese"/></a>';
232
+ }
233
+
234
+ if ( isset ( $get_flag_choices['flag-ro'] ) ) {
235
+ $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="24" width="24" alt="Romanian"/></a>';
236
+ }
237
+
238
+ if ( isset ( $get_flag_choices['flag-ru'] ) ) {
239
+ $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="24" width="24" alt="Russian"/></a>';
240
+ }
241
+
242
+ if ( isset ( $get_flag_choices['flag-sr'] ) ) {
243
+ $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="24" width="24" alt="Serbian"/></a>';
244
+ }
245
+
246
+ if ( isset ( $get_flag_choices['flag-sk'] ) ) {
247
+ $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="24" width="24" alt="Slovak"/></a>';
248
+ }
249
+
250
+ if ( isset ( $get_flag_choices['flag-sl'] ) ) {
251
+ $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="24" width="24" alt="Slovenian"/></a>';
252
+ }
253
+
254
+ if ( isset ( $get_flag_choices['flag-es'] ) ) {
255
+ $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="24" width="24" alt="Spanish"/></a>';
256
+ }
257
+
258
+ if ( isset ( $get_flag_choices['flag-sw'] ) ) {
259
+ $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="24" width="24" alt="Swahili"/></a>';
260
+ }
261
+
262
+ if ( isset ( $get_flag_choices['flag-sv'] ) ) {
263
+ $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="24" width="24" alt="Swedish"/></a>';
264
+ }
265
+
266
+ if ( isset ( $get_flag_choices['flag-ta'] ) ) {
267
+ $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="24" width="24" alt="Tamil"/></a>';
268
+ }
269
+
270
+ if ( isset ( $get_flag_choices['flag-te'] ) ) {
271
+ $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="24" width="24" alt="Telugu"/></a>';
272
+ }
273
+
274
+ if ( isset ( $get_flag_choices['flag-th'] ) ) {
275
+ $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="24" width="24" alt="Thai"/></a>';
276
+ }
277
+
278
+ if ( isset ( $get_flag_choices['flag-tr'] ) ) {
279
+ $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="24" width="24" alt="Turkish"/></a>';
280
+ }
281
+
282
+ if ( isset ( $get_flag_choices['flag-uk'] ) ) {
283
+ $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="24" width="24" alt="Ukranian"/></a>';
284
+ }
285
+
286
+ if ( isset ( $get_flag_choices['flag-ur'] ) ) {
287
+ $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="24" width="24" alt="Urdu"/></a>';
288
+ }
289
+
290
+ if ( isset ( $get_flag_choices['flag-vi'] ) ) {
291
+ $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="24" width="24" alt="vietnamese"/></a>';
292
+ }
293
+
294
+ if ( isset ( $get_flag_choices['flag-cy'] ) ) {
295
+ $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="24" width="24" alt="Welsh"/></a>';
296
+ }
297
+
298
+ if ( isset ( $get_flag_choices['flag-yi'] ) ) {
299
+ $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="24" width="24" alt="Yiddish"/></a>';
300
+ }
301
+ $str.='</div>';
302
 
303
  foreach ($get_flag_choices as $key) {
304
  //print_r($key);
305
  }
306
 
307
+ $str.='<div id="flags">';
308
 
309
 
310
 
617
  <div id="google_language_translator"></div>';
618
  return $str;
619
  }
620
+ }
 
621
  }
622
+ }
623
  }
624
  ?>
glt_scripts.php CHANGED
@@ -5,17 +5,32 @@
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;
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_enqueue_script( 'my-toolbar-script', plugins_url('/toolbar.js',__FILE__), array('jquery'));
9
+ wp_enqueue_script( 'my-load-toolbar-script', plugins_url('/load-toolbar.js',__FILE__), array('jquery'));
10
+ wp_register_style( 'toolbar.css', plugins_url('css/toolbar.css', __FILE__) );
11
+ wp_register_style( 'bootstrap-icons.css', plugins_url('css/bootstrap-icons.css', __FILE__) );
12
  wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
13
  wp_enqueue_style( 'style.css' );
14
+ wp_enqueue_style( 'toolbar.css' );
15
+ wp_enqueue_style( 'bootstrap-icons.css' );
16
  }
17
  }
18
 
19
  function flags() {
20
  wp_enqueue_script( 'flags', plugins_url('/flags.js',__FILE__), array('jquery'));
21
+ wp_enqueue_script( 'my-toolbar-script', plugins_url('/toolbar.js',__FILE__), array('jquery'));
22
+ wp_enqueue_script( 'my-load-toolbar-script', plugins_url('/load-toolbar.js',__FILE__), array('jquery'));
23
+ wp_register_style( 'toolbar.css', plugins_url('css/toolbar.css', __FILE__) );
24
+ wp_register_style( 'bootstrap-icons.css', plugins_url('css/bootstrap-icons.css', __FILE__) );
25
  wp_register_style( 'style.css', plugins_url('css/style.css', __FILE__) );
26
  wp_enqueue_style( 'style.css' );
27
+ wp_enqueue_style( 'toolbar.css' );
28
+ wp_enqueue_style( 'bootstrap-icons.css' );
29
  }
30
+
31
+ if (!is_admin()) {
32
+ add_action('init', 'flags');
33
+ }
34
 
35
  function page_layout (){
36
  global $p;
glt_settings_display.php CHANGED
@@ -42,6 +42,13 @@
42
  <td colspan="2" class="choose_flags"><?php flag_display_settings_cb(); ?></td>
43
  </tr>
44
 
 
 
 
 
 
 
 
45
  <tr class="notranslate">
46
  <td>Show translate box?</td>
47
  <td><?php googlelanguagetranslator_translatebox_cb(); ?></td>
42
  <td colspan="2" class="choose_flags"><?php flag_display_settings_cb(); ?></td>
43
  </tr>
44
 
45
+ <tr class="notranslate">
46
+ <td>Show floating translation widget? <strong style="color:red">(New!)</strong><br/>
47
+ <span>(Displays in the bottom right corner of your website)</span>
48
+ </td>
49
+ <td><?php googlelanguagetranslator_floating_widget_cb(); ?></td>
50
+ </tr>
51
+
52
  <tr class="notranslate">
53
  <td>Show translate box?</td>
54
  <td><?php googlelanguagetranslator_translatebox_cb(); ?></td>
glt_settings_init.php CHANGED
@@ -35,6 +35,7 @@ function initialize_settings() {
35
  add_settings_field( 'googlelanguagetranslator_css','Custom CSS Overrides','googlelanguagetranslator_css_cb','google_language_translator','glt_settings');
36
  add_settings_field( 'googlelanguagetranslator_manage_translations','Turn on translation management?','googlelanguagetranslator_manage_translations_cb','google_language_translator','glt_settings');
37
  add_settings_field( 'googlelanguagetranslator_multilanguage','Multilanguage webpages?','googlelanguagetranslator_multilanguage_cb','google_language_translator','glt_settings');
 
38
 
39
 
40
 
@@ -57,6 +58,7 @@ function initialize_settings() {
57
  register_setting( 'google_language_translator','googlelanguagetranslator_css');
58
  register_setting( 'google_language_translator','googlelanguagetranslator_manage_translations');
59
  register_setting( 'google_language_translator','googlelanguagetranslator_multilanguage');
 
60
 
61
  function googlelanguagetranslator_active_cb() {
62
 
@@ -984,6 +986,25 @@ function initialize_settings() {
984
  <div style="clear:both"></div>
985
  <?php }
986
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
987
  function googlelanguagetranslator_translatebox_cb() {
988
 
989
  $option_name = 'googlelanguagetranslator_translatebox' ;
@@ -997,7 +1018,7 @@ function initialize_settings() {
997
 
998
  $options = get_option (''.$option_name.''); ?>
999
 
1000
- <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:170px">
1001
  <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
1002
  <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
1003
  </select>
@@ -1019,7 +1040,6 @@ function initialize_settings() {
1019
  <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
1020
  <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
1021
  <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
1022
-
1023
  </select>
1024
  <?php }
1025
 
35
  add_settings_field( 'googlelanguagetranslator_css','Custom CSS Overrides','googlelanguagetranslator_css_cb','google_language_translator','glt_settings');
36
  add_settings_field( 'googlelanguagetranslator_manage_translations','Turn on translation management?','googlelanguagetranslator_manage_translations_cb','google_language_translator','glt_settings');
37
  add_settings_field( 'googlelanguagetranslator_multilanguage','Multilanguage webpages?','googlelanguagetranslator_multilanguage_cb','google_language_translator','glt_settings');
38
+ add_settings_field( 'googlelanguagetranslator_floating_widget','Show floating translation widget?','googlelanguagetranslator_floating_widget_cb','google_language_translator','glt_settings');
39
 
40
 
41
 
58
  register_setting( 'google_language_translator','googlelanguagetranslator_css');
59
  register_setting( 'google_language_translator','googlelanguagetranslator_manage_translations');
60
  register_setting( 'google_language_translator','googlelanguagetranslator_multilanguage');
61
+ register_setting( 'google_language_translator','googlelanguagetranslator_floating_widget');
62
 
63
  function googlelanguagetranslator_active_cb() {
64
 
986
  <div style="clear:both"></div>
987
  <?php }
988
 
989
+ function googlelanguagetranslator_floating_widget_cb() {
990
+
991
+ $option_name = 'googlelanguagetranslator_floating_widget' ;
992
+ $new_value = 'yes';
993
+
994
+ if ( get_option( $option_name ) === false ) {
995
+
996
+ // The option does not exist, so we update it.
997
+ update_option( $option_name, $new_value );
998
+ }
999
+
1000
+ $options = get_option (''.$option_name.''); ?>
1001
+
1002
+ <select name="googlelanguagetranslator_floating_widget" id="googlelanguagetranslator_floating_widget" style="width:170px">
1003
+ <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show widget</option>
1004
+ <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide widget</option>
1005
+ </select>
1006
+ <?php }
1007
+
1008
  function googlelanguagetranslator_translatebox_cb() {
1009
 
1010
  $option_name = 'googlelanguagetranslator_translatebox' ;
1018
 
1019
  $options = get_option (''.$option_name.''); ?>
1020
 
1021
+ <select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:190px">
1022
  <option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show language box</option>
1023
  <option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide language box</option>
1024
  </select>
1040
  <select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
1041
  <option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
1042
  <option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
 
1043
  </select>
1044
  <?php }
1045
 
glt_vertical.php CHANGED
@@ -4,14 +4,311 @@ 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
 
@@ -328,7 +625,7 @@ function googlelanguagetranslator_vertical(){
328
  <div id="google_language_translator"></div>';
329
  return $str;
330
  }
331
-
332
  }
333
  }
334
  }
4
  $is_active = get_option ( 'googlelanguagetranslator_active' );
5
  $get_flag_choices = get_option ('flag_display_settings');
6
  $language_choices = googlelanguagetranslator_included_languages();
7
+ $floating_widget = get_option ('googlelanguagetranslator_floating_widget');
8
+
9
+
10
 
11
  if( $is_active == 1){
12
+ if ($floating_widget=='yes') {
13
+ $str='<div id="glt-translate-trigger"><span class="notranslate">Translate &raquo;</strong></div>';
14
+ $str.='<div id="glt-toolbar">';
15
+ if ( isset ( $get_flag_choices['flag-af'] ) ) {
16
+ $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="24" width="24" alt="Afrikaans"/></a>';
17
+ }
18
+
19
+
20
+ if ( isset ( $get_flag_choices['flag-sq'] ) ) {
21
+ $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="24" width="24" alt="Albanian"/></a>';
22
+ }
23
+
24
+ if ( isset ( $get_flag_choices['flag-ar'] ) ) {
25
+ $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="24" width="24" alt="Arabic"/></a>';
26
+ }
27
+
28
+ if ( isset ( $get_flag_choices['flag-hy'] ) ) {
29
+ $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="24" width="24" alt="Armenian"/></a>';
30
+ }
31
+
32
+ if ( isset ( $get_flag_choices['flag-az'] ) ) {
33
+ $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="24" width="24" alt="Azerbaijani"/></a>';
34
+ }
35
+
36
+ if ( isset ( $get_flag_choices['flag-eu'] ) ) {
37
+ $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="24" width="24" alt="Basque"/></a>';
38
+ }
39
+
40
+ if ( isset ( $get_flag_choices['flag-be'] ) ) {
41
+ $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="24" width="24" alt="Belarus"/></a>';
42
+ }
43
+
44
+ if ( isset ( $get_flag_choices['flag-bn'] ) ) {
45
+ $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="24" width="24" alt="Bengali"/></a>';
46
+ }
47
+
48
+ if ( isset ( $get_flag_choices['flag-bs'] ) ) {
49
+ $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="24" width="24" alt="Bosnian"/></a>';
50
+ }
51
+
52
+ if ( isset ( $get_flag_choices['flag-bg'] ) ) {
53
+ $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="24" width="24" alt="Bulgarian"/></a>';
54
+ }
55
+
56
+ if ( isset ( $get_flag_choices['flag-ca'] ) ) {
57
+ $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="24" width="24" alt="Catalan"/></a>';
58
+ }
59
+
60
+ if ( isset ( $get_flag_choices['flag-ceb'] ) ) {
61
+ $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="24" width="24" alt="Afrikaans"/></a>';
62
+ }
63
+
64
+ if ( isset ( $get_flag_choices['flag-zh-CN'] ) ) {
65
+ $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="24" width="24" alt="Chinese (Simplified)"/></a>';
66
+ }
67
+
68
+ if ( isset ( $get_flag_choices['flag-zh-TW'] ) ) {
69
+ $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="24" width="24" alt="Chinese (Traditional)"/></a>';
70
+ }
71
+
72
+ if ( isset ( $get_flag_choices['flag-cs'] ) ) {
73
+ $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="24" width="24" alt="Czech"/></a>';
74
+ }
75
+
76
+ if ( isset ( $get_flag_choices['flag-hr'] ) ) {
77
+ $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="24" width="24" alt="Croatian"/></a>';
78
+ }
79
+
80
+ if ( isset ( $get_flag_choices['flag-da'] ) ) {
81
+ $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="24" width="24" alt="Danish"/></a>';
82
+ }
83
+
84
+ if ( isset ( $get_flag_choices['flag-nl'] ) ) {
85
+ $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="24" width="24" alt="Dutch"/></a>';
86
+ }
87
+
88
+ if ( isset ( $get_flag_choices['flag-en'] ) ) {
89
+ $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="24" width="24" alt="English"/></a>';
90
+ }
91
+
92
+ if ( isset ( $get_flag_choices['flag-eo'] ) ) {
93
+ $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="24" width="24" alt="Esperanto"/></a>';
94
+ }
95
+
96
+ if ( isset ( $get_flag_choices['flag-et'] ) ) {
97
+ $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="24" width="24" alt="Estonian"/></a>';
98
+ }
99
+
100
+ if ( isset ( $get_flag_choices['flag-tl'] ) ) {
101
+ $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="24" width="24" alt="Filipino"/></a>';
102
+ }
103
+
104
+ if ( isset ( $get_flag_choices['flag-fi'] ) ) {
105
+ $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="24" width="24" alt="Finnish"/></a>';
106
+ }
107
+
108
+ if ( isset ( $get_flag_choices['flag-fr'] ) ) {
109
+ $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="24" width="24" alt="French"/></a>';
110
+ }
111
+
112
+ if ( isset ( $get_flag_choices['flag-gl'] ) ) {
113
+ $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="24" width="24" alt="Galician"/></a>';
114
+ }
115
+
116
+ if ( isset ( $get_flag_choices['flag-ka'] ) ) {
117
+ $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="24" width="24" alt="Georgian"/></a>';
118
+ }
119
+
120
+ if ( isset ( $get_flag_choices['flag-de'] ) ) {
121
+ $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="24" width="24" alt="German"/></a>';
122
+ }
123
+
124
+ if ( isset ( $get_flag_choices['flag-el'] ) ) {
125
+ $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="24" width="24" alt="Greek"/></a>';
126
+ }
127
+
128
+ if ( isset ( $get_flag_choices['flag-gu'] ) ) {
129
+ $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="24" width="24" alt="Gujarati"/></a>';
130
+ }
131
+
132
+ if ( isset ( $get_flag_choices['flag-ht'] ) ) {
133
+ $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="24" width="24" alt="Haitian"/></a>';
134
+ }
135
+
136
+ if ( isset ( $get_flag_choices['flag-iw'] ) ) {
137
+ $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="24" width="24" alt="Hebrew"/></a>';
138
+ }
139
+
140
+ if ( isset ( $get_flag_choices['flag-hi'] ) ) {
141
+ $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="24" width="24" alt="Hindi"/></a>';
142
+ }
143
+
144
+ if ( isset ( $get_flag_choices['flag-hmn'] ) ) {
145
+ $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="24" width="24" alt="Hmong"/></a>';
146
+ }
147
+
148
+ if ( isset ( $get_flag_choices['flag-hu'] ) ) {
149
+ $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="24" width="24" alt="Hungarian"/></a>';
150
+ }
151
+
152
+ if ( isset ( $get_flag_choices['flag-is'] ) ) {
153
+ $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="24" width="24" alt="Icelandic"/></a>';
154
+ }
155
+
156
+ if ( isset ( $get_flag_choices['flag-id'] ) ) {
157
+ $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="24" width="24" alt="Indonesian"/></a>';
158
+ }
159
+
160
+ if ( isset ( $get_flag_choices['flag-ga'] ) ) {
161
+ $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="24" width="24" alt="Irish"/></a>';
162
+ }
163
+
164
+ if ( isset ( $get_flag_choices['flag-it'] ) ) {
165
+ $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="24" width="24" alt="Italian"/></a>';
166
+ }
167
+
168
+ if ( isset ( $get_flag_choices['flag-ja'] ) ) {
169
+ $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="24" width="24" alt="Japanese"/></a>';
170
+ }
171
+
172
+ if ( isset ( $get_flag_choices['flag-jw'] ) ) {
173
+ $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="24" width="24" alt="Javanese"/></a>';
174
+ }
175
+
176
+ if ( isset ( $get_flag_choices['flag-kn'] ) ) {
177
+ $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="24" width="24" alt="Kannada"/></a>';
178
+ }
179
+
180
+ if ( isset ( $get_flag_choices['flag-km'] ) ) {
181
+ $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="24" width="24" alt="Khmer"/></a>';
182
+ }
183
+
184
+ if ( isset ( $get_flag_choices['flag-ko'] ) ) {
185
+ $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="24" width="24" alt="Korea"/></a>';
186
+ }
187
+
188
+ if ( isset ( $get_flag_choices['flag-lo'] ) ) {
189
+ $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="24" width="24" alt="Laos"/></a>';
190
+ }
191
+
192
+ if ( isset ( $get_flag_choices['flag-la'] ) ) {
193
+ $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="24" width="24" alt="Latin"/></a>';
194
+ }
195
+
196
+ if ( isset ( $get_flag_choices['flag-lv'] ) ) {
197
+ $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="24" width="24" alt="Latvian"/></a>';
198
+ }
199
+
200
+ if ( isset ( $get_flag_choices['flag-lt'] ) ) {
201
+ $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="24" width="24" alt="Lithuanian"/></a>';
202
+ }
203
+
204
+ if ( isset ( $get_flag_choices['flag-mk'] ) ) {
205
+ $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="24" width="24" alt="Macedonian"/></a>';
206
+ }
207
+
208
+ if ( isset ( $get_flag_choices['flag-ms'] ) ) {
209
+ $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="24" width="24" alt="Malay"/></a>';
210
+ }
211
+
212
+ if ( isset ( $get_flag_choices['flag-mt'] ) ) {
213
+ $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="24" width="24" alt="Malta"/></a>';
214
+ }
215
+
216
+ if ( isset ( $get_flag_choices['flag-mr'] ) ) {
217
+ $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="24" width="24" alt="Marathi"/></a>';
218
+ }
219
+
220
+ if ( isset ( $get_flag_choices['flag-no'] ) ) {
221
+ $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="24" width="24" alt="Norwegian"/></a>';
222
+ }
223
+
224
+ if ( isset ( $get_flag_choices['flag-fa'] ) ) {
225
+ $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="24" width="24" alt="Persian"/></a>';
226
+ }
227
+
228
+ if ( isset ( $get_flag_choices['flag-pl'] ) ) {
229
+ $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="24" width="24" alt="Polish"/></a>';
230
+ }
231
+
232
+ if ( isset ( $get_flag_choices['flag-pt'] ) ) {
233
+ $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="24" width="24" alt="Portuguese"/></a>';
234
+ }
235
+
236
+ if ( isset ( $get_flag_choices['flag-ro'] ) ) {
237
+ $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="24" width="24" alt="Romanian"/></a>';
238
+ }
239
+
240
+ if ( isset ( $get_flag_choices['flag-ru'] ) ) {
241
+ $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="24" width="24" alt="Russian"/></a>';
242
+ }
243
+
244
+ if ( isset ( $get_flag_choices['flag-sr'] ) ) {
245
+ $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="24" width="24" alt="Serbian"/></a>';
246
+ }
247
+
248
+ if ( isset ( $get_flag_choices['flag-sk'] ) ) {
249
+ $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="24" width="24" alt="Slovak"/></a>';
250
+ }
251
+
252
+ if ( isset ( $get_flag_choices['flag-sl'] ) ) {
253
+ $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="24" width="24" alt="Slovenian"/></a>';
254
+ }
255
+
256
+ if ( isset ( $get_flag_choices['flag-es'] ) ) {
257
+ $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="24" width="24" alt="Spanish"/></a>';
258
+ }
259
+
260
+ if ( isset ( $get_flag_choices['flag-sw'] ) ) {
261
+ $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="24" width="24" alt="Swahili"/></a>';
262
+ }
263
+
264
+ if ( isset ( $get_flag_choices['flag-sv'] ) ) {
265
+ $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="24" width="24" alt="Swedish"/></a>';
266
+ }
267
+
268
+ if ( isset ( $get_flag_choices['flag-ta'] ) ) {
269
+ $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="24" width="24" alt="Tamil"/></a>';
270
+ }
271
+
272
+ if ( isset ( $get_flag_choices['flag-te'] ) ) {
273
+ $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="24" width="24" alt="Telugu"/></a>';
274
+ }
275
+
276
+ if ( isset ( $get_flag_choices['flag-th'] ) ) {
277
+ $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="24" width="24" alt="Thai"/></a>';
278
+ }
279
+
280
+ if ( isset ( $get_flag_choices['flag-tr'] ) ) {
281
+ $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="24" width="24" alt="Turkish"/></a>';
282
+ }
283
+
284
+ if ( isset ( $get_flag_choices['flag-uk'] ) ) {
285
+ $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="24" width="24" alt="Ukranian"/></a>';
286
+ }
287
+
288
+ if ( isset ( $get_flag_choices['flag-ur'] ) ) {
289
+ $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="24" width="24" alt="Urdu"/></a>';
290
+ }
291
+
292
+ if ( isset ( $get_flag_choices['flag-vi'] ) ) {
293
+ $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="24" width="24" alt="vietnamese"/></a>';
294
+ }
295
+
296
+ if ( isset ( $get_flag_choices['flag-cy'] ) ) {
297
+ $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="24" width="24" alt="Welsh"/></a>';
298
+ }
299
+
300
+ if ( isset ( $get_flag_choices['flag-yi'] ) ) {
301
+ $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="24" width="24" alt="Yiddish"/></a>';
302
+ }
303
+ $str.='</div>';
304
+
305
+
306
 
307
  foreach ($get_flag_choices as $key) {
308
  //print_r($key);
309
 
310
  }
311
+ $str.='<div id="flags">';
312
 
313
 
314
 
625
  <div id="google_language_translator"></div>';
626
  return $str;
627
  }
628
+ }
629
  }
630
  }
631
  }
google-language-translator.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
- Version: 3.0.4
6
  Description: The MOST SIMPLE Google Translator plugin. This plugin adds Google Translator to your website by using a single shortcode, [google-translator]. Settings include: layout style, hide/show specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
7
  Author: Rob Myrick
8
  Author URI: http://www.studio88design.com/
2
  /*
3
  Plugin Name: Google Language Translator
4
  Plugin URI: http://www.studio88design.com/plugins/google-language-translator
5
+ Version: 3.0.5
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/
load-toolbar.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ $('#glt-translate-trigger').toolbar({content: '#glt-toolbar', position: 'top', hideOnClick: 'true'});
3
+
4
+
5
+ $('#glt-translate-trigger').on('toolbarShown',function(event) {
6
+ $('.tool-rounded').css('display','block');
7
+ $('.tool-rounded').css('position','fixed');
8
+ $('.tool-rounded').css('bottom','50px');
9
+ $('.tool-rounded').css('top','auto !important');
10
+ $('#glt-translate-trigger span').text('Translate « ');
11
+
12
+ });
13
+
14
+ $('#glt-translate-trigger').on('toolbarHidden',function(event) {
15
+ $('#glt-translate-trigger span').text('Translate » ');
16
+ $('.tool-rounded').css('position','absolute');
17
+
18
+ });
19
+
20
+
21
+
22
+ });
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin link: http://www.studio88design.com/plugins/google-language-translator
5
  Tags: language translator, google translator, language translate, google, google language translator, translation, translate, multi language
6
  Requires at least: 2.9
7
  Tested up to: 3.8.1
8
- stable tag: 3.0.4
9
 
10
  Welcome to Google Language Translator! This plugin allows you to insert the Google Language Translator tool anywhere on your website using shortcode.
11
 
@@ -155,6 +155,11 @@ Settings include: inline or vertical layout, show/hide specific languages, hide/
155
  - Fixed the issue of Custom CSS box not displaying it's styles to the website. This was only missed in this last update, due to re-arrangement of the files. Sorry for any inconvenience.
156
  - Removed style2.php file, which is unnecessary and was being used in testing.
157
 
 
 
 
 
 
158
  == Screenshots ==
159
 
160
  1. Settings include: inline or vertical layout, hide/show Google toolbar, display specific languages, and show/hide Google branding. Add the shortcode to pages, posts, and widgets.
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.5
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
 
155
  - Fixed the issue of Custom CSS box not displaying it's styles to the website. This was only missed in this last update, due to re-arrangement of the files. Sorry for any inconvenience.
156
  - Removed style2.php file, which is unnecessary and was being used in testing.
157
 
158
+ 3.0.5
159
+
160
+ - Added new Floating Widget (see settings page). The Floating Widget is simply another way for allowing website visitors to translate languages. The functionality is built-in with the existing flag preferences, and can be turned on or off at the administrator's preference. The floating widget can also function in full with both the language box and/or flags showing OR hiding, so the administrator has full control of how it displays. The floating widget is placed at bottom right of the website in the free version, but can be placed in other locations by changing CSS styles associated with the box. The premium version will allow more options as to changing the Floating Widget location.
161
+ - Fixed the issue with Dashboard styles loading on the wrong pages. This was causing some annoying display issues on the Wordpress Dashboard.
162
+
163
  == Screenshots ==
164
 
165
  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.
toolbar.js ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Toolbar.js
3
+ *
4
+ * @fileoverview jQuery plugin that creates tooltip style toolbars.
5
+ * @link http://paulkinzett.github.com/toolbar/
6
+ * @author Paul Kinzett (http://kinzett.co.nz/)
7
+ * @version 1.0.4
8
+ * @requires jQuery 1.7+
9
+ *
10
+ * @license jQuery Toolbar Plugin v1.0.4
11
+ * http://paulkinzett.github.com/toolbar/
12
+ * Copyright 2013 Paul Kinzett (http://kinzett.co.nz/)
13
+ * Released under the MIT license.
14
+ * <https://raw.github.com/paulkinzett/toolbar/master/LICENSE.txt>
15
+ */
16
+
17
+ if ( typeof Object.create !== 'function' ) {
18
+ Object.create = function( obj ) {
19
+ function F() {}
20
+ F.prototype = obj;
21
+ return new F();
22
+ };
23
+ }
24
+
25
+ (function( $, window, document, undefined ) {
26
+
27
+ var ToolBar = {
28
+ init: function( options, elem ) {
29
+ var self = this;
30
+ self.elem = elem;
31
+ self.$elem = $( elem );
32
+ self.options = $.extend( {}, $.fn.toolbar.options, options );
33
+ self.toolbar = $('<div class="tool-container gradient" />')
34
+ .addClass('tool-'+self.options.position)
35
+ .addClass('tool-rounded')
36
+ .append('<div class="tool-items" />')
37
+ .append('<div class="arrow" />')
38
+ .appendTo('body')
39
+ .css('opacity', 0)
40
+ .hide();
41
+ self.toolbar_arrow = self.toolbar.find('.arrow');
42
+ self.initializeToolbar();
43
+ },
44
+
45
+ initializeToolbar: function() {
46
+ var self = this;
47
+ self.populateContent();
48
+ self.setTrigger();
49
+ self.toolbarWidth = self.toolbar.width();
50
+ },
51
+
52
+ setTrigger: function() {
53
+ var self = this;
54
+
55
+ self.$elem.on('click', function(event) {
56
+ event.preventDefault();
57
+ if(self.$elem.hasClass('pressed')) {
58
+ self.hide();
59
+ } else {
60
+ self.show();
61
+ }
62
+ });
63
+
64
+ if (self.options.hideOnClick) {
65
+ $('html').on("click.toolbar", function ( event ) {
66
+ if (event.target != self.elem &&
67
+ self.$elem.has(event.target).length === 0 &&
68
+ self.toolbar.has(event.target).length === 0 &&
69
+ self.toolbar.is(":visible")) {
70
+ self.hide();
71
+ }
72
+ });
73
+ }
74
+
75
+ $(window).resize(function( event ) {
76
+ event.stopPropagation();
77
+ if ( self.toolbar.is(":visible") ) {
78
+ self.toolbarCss = self.getCoordinates(self.options.position, 20);
79
+ self.collisionDetection();
80
+ self.toolbar.css( self.toolbarCss );
81
+ self.toolbar_arrow.css( self.arrowCss );
82
+ }
83
+ });
84
+ },
85
+
86
+ populateContent: function() {
87
+ var self = this;
88
+ var location = self.toolbar.find('.tool-items');
89
+ var content = $(self.options.content).clone( true ).find('a').addClass('tool-item gradient');
90
+ location.html(content);
91
+ location.find('.tool-item').on('click', function(event) {
92
+ event.preventDefault();
93
+ self.$elem.trigger('toolbarItemClick', this);
94
+ });
95
+ },
96
+
97
+ calculatePosition: function() {
98
+ var self = this;
99
+ self.arrowCss = {};
100
+ self.toolbarCss = self.getCoordinates(self.options.position, 0);
101
+ self.toolbarCss.position = 'absolute';
102
+ self.toolbarCss.zIndex = self.options.zIndex;
103
+ self.collisionDetection();
104
+ self.toolbar.css(self.toolbarCss);
105
+ self.toolbar_arrow.css(self.arrowCss);
106
+ },
107
+
108
+ getCoordinates: function( position, adjustment ) {
109
+ var self = this;
110
+ self.coordinates = self.$elem.offset();
111
+
112
+ if (self.options.adjustment && self.options.adjustment[self.options.position]) {
113
+ adjustment = self.options.adjustment[self.options.position] + adjustment;
114
+ }
115
+
116
+ switch(self.options.position) {
117
+ case 'top':
118
+ return {
119
+ left: self.coordinates.left-(self.toolbar.width()/2)+(self.$elem.outerWidth()/2),
120
+ //top: self.coordinates.top-self.$elem.height()-adjustment,
121
+ right: 'auto'
122
+ };
123
+ case 'left':
124
+ return {
125
+ left: self.coordinates.left-(self.toolbar.width()/2)-(self.$elem.width()/2)-adjustment,
126
+ top: self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.outerHeight()/2),
127
+ right: 'auto'
128
+ };
129
+ case 'right':
130
+ return {
131
+ left: self.coordinates.left+(self.toolbar.width()/2)+(self.$elem.width()/3)+adjustment,
132
+ top: self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.outerHeight()/2),
133
+ right: 'auto'
134
+ };
135
+ case 'bottom':
136
+ return {
137
+ left: self.coordinates.left-(self.toolbar.width()/2)+(self.$elem.outerWidth()/2),
138
+ top: self.coordinates.top+self.$elem.height()+adjustment,
139
+ right: 'auto'
140
+ };
141
+ }
142
+ },
143
+
144
+ collisionDetection: function() {
145
+ var self = this;
146
+ var edgeOffset = 20;
147
+ if(self.options.position =='top' || self.options.position == 'bottom') {
148
+ self.arrowCss = {left: '50%', right: '50%'};
149
+ if( self.toolbarCss.left < edgeOffset ) {
150
+ self.toolbarCss.left = edgeOffset;
151
+ self.arrowCss.left = self.$elem.offset().left + self.$elem.width()/2-(edgeOffset);
152
+ }
153
+ else if(($(window).width() - (self.toolbarCss.left + self.toolbarWidth)) < edgeOffset) {
154
+ self.toolbarCss.right = edgeOffset;
155
+ self.toolbarCss.left = 'auto';
156
+ self.arrowCss.left = 'auto';
157
+ self.arrowCss.right = ($(window).width()-self.$elem.offset().left)-(self.$elem.width()/2)-(edgeOffset)-5;
158
+ }
159
+ }
160
+ },
161
+
162
+ show: function() {
163
+ var self = this;
164
+ var animation = {'opacity': 1};
165
+
166
+ self.$elem.addClass('pressed');
167
+ self.calculatePosition();
168
+
169
+ switch(self.options.position) {
170
+ case 'top':
171
+ //animation.top = '-=20';
172
+ break;
173
+ case 'left':
174
+ animation.left = '-=20';
175
+ break;
176
+ case 'right':
177
+ animation.left = '+=20';
178
+ break;
179
+ case 'bottom':
180
+ animation.top = '+=20';
181
+ break;
182
+ }
183
+
184
+ self.toolbar.show().animate(animation, 200 );
185
+ self.$elem.trigger('toolbarShown');
186
+ },
187
+
188
+ hide: function() {
189
+ var self = this;
190
+ var animation = {'opacity': 0};
191
+
192
+ self.$elem.removeClass('pressed');
193
+
194
+ switch(self.options.position) {
195
+ case 'top':
196
+ //animation.top = '+=20';
197
+ break;
198
+ case 'left':
199
+ animation.left = '+=20';
200
+ break;
201
+ case 'right':
202
+ animation.left = '-=20';
203
+ break;
204
+ case 'bottom':
205
+ animation.top = '-=20';
206
+ break;
207
+ }
208
+
209
+ self.toolbar.animate(animation, 200, function() {
210
+ self.toolbar.hide();
211
+ });
212
+
213
+ self.$elem.trigger('toolbarHidden');
214
+ },
215
+
216
+ getToolbarElement: function () {
217
+ return this.toolbar.find('.tool-items');
218
+ }
219
+ };
220
+
221
+ $.fn.toolbar = function( options ) {
222
+ if ($.isPlainObject( options )) {
223
+ return this.each(function() {
224
+ var toolbarObj = Object.create( ToolBar );
225
+ toolbarObj.init( options, this );
226
+ $(this).data('toolbarObj', toolbarObj);
227
+ });
228
+ } else if ( typeof options === 'string' && options.indexOf('_') !== 0 ) {
229
+ var toolbarObj = $(this).data('toolbarObj');
230
+ var method = toolbarObj[options];
231
+ return method.apply(toolbarObj, $.makeArray(arguments).slice(1));
232
+ }
233
+ };
234
+
235
+ $.fn.toolbar.options = {
236
+ content: '#myContent',
237
+ position: 'top',
238
+ hideOnClick: false,
239
+ zIndex: 120
240
+ };
241
+
242
+ }) ( jQuery, window, document );