Version Description
Download this release
Release Info
Developer | edo888 |
Plugin | Google Language Translator |
Version | 5.0.49 |
Comparing to | |
See all releases |
Code changes from version 5.0.48 to 5.0.49
- banner-1544x500.png +0 -0
- banner-772x250.png +0 -0
- google-language-translator.php +1468 -1487
- readme.txt +438 -434
banner-1544x500.png
ADDED
Binary file
|
banner-772x250.png
ADDED
Binary file
|
google-language-translator.php
CHANGED
@@ -1,1488 +1,1469 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
Plugin
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
Author:
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
//ini_set('
|
13 |
-
//
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
'
|
26 |
-
'
|
27 |
-
'
|
28 |
-
'
|
29 |
-
'
|
30 |
-
'
|
31 |
-
'
|
32 |
-
'
|
33 |
-
'
|
34 |
-
'
|
35 |
-
'
|
36 |
-
'
|
37 |
-
'
|
38 |
-
'
|
39 |
-
'zh-
|
40 |
-
'
|
41 |
-
'
|
42 |
-
'
|
43 |
-
'
|
44 |
-
'
|
45 |
-
'
|
46 |
-
'
|
47 |
-
'
|
48 |
-
'
|
49 |
-
'
|
50 |
-
'
|
51 |
-
'
|
52 |
-
'
|
53 |
-
'
|
54 |
-
'
|
55 |
-
'
|
56 |
-
'
|
57 |
-
'
|
58 |
-
'
|
59 |
-
'
|
60 |
-
'
|
61 |
-
'
|
62 |
-
'
|
63 |
-
'
|
64 |
-
'
|
65 |
-
'
|
66 |
-
'
|
67 |
-
'
|
68 |
-
'
|
69 |
-
'
|
70 |
-
'
|
71 |
-
'
|
72 |
-
'
|
73 |
-
'
|
74 |
-
'
|
75 |
-
'
|
76 |
-
'
|
77 |
-
'
|
78 |
-
'
|
79 |
-
'
|
80 |
-
'
|
81 |
-
'
|
82 |
-
'
|
83 |
-
'
|
84 |
-
'
|
85 |
-
'
|
86 |
-
'
|
87 |
-
'
|
88 |
-
'
|
89 |
-
'
|
90 |
-
'
|
91 |
-
'
|
92 |
-
'
|
93 |
-
'
|
94 |
-
'
|
95 |
-
'
|
96 |
-
'
|
97 |
-
'
|
98 |
-
'
|
99 |
-
'
|
100 |
-
'
|
101 |
-
'
|
102 |
-
'
|
103 |
-
'
|
104 |
-
'
|
105 |
-
'
|
106 |
-
'
|
107 |
-
'
|
108 |
-
'
|
109 |
-
'
|
110 |
-
'
|
111 |
-
'
|
112 |
-
'
|
113 |
-
'
|
114 |
-
'
|
115 |
-
'
|
116 |
-
'
|
117 |
-
'
|
118 |
-
'
|
119 |
-
'
|
120 |
-
'
|
121 |
-
'
|
122 |
-
'
|
123 |
-
'
|
124 |
-
'
|
125 |
-
'
|
126 |
-
'
|
127 |
-
'
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
add_action(
|
138 |
-
add_action('
|
139 |
-
add_action('
|
140 |
-
|
141 |
-
add_shortcode( '
|
142 |
-
|
143 |
-
add_filter('
|
144 |
-
add_filter('
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
add_option('
|
154 |
-
add_option('
|
155 |
-
add_option('
|
156 |
-
add_option('
|
157 |
-
add_option('
|
158 |
-
add_option('
|
159 |
-
add_option('
|
160 |
-
add_option('
|
161 |
-
add_option('
|
162 |
-
add_option('
|
163 |
-
add_option('
|
164 |
-
add_option('
|
165 |
-
add_option('
|
166 |
-
add_option('
|
167 |
-
add_option('
|
168 |
-
add_option('
|
169 |
-
add_option('
|
170 |
-
add_option('
|
171 |
-
add_option('
|
172 |
-
add_option('
|
173 |
-
|
174 |
-
delete_option('
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
delete_option('
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
add_action(
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
wp_enqueue_script( 'scripts
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
wp_enqueue_script( 'scripts',
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
$lang
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
"
|
278 |
-
"
|
279 |
-
"
|
280 |
-
"
|
281 |
-
"
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
$
|
286 |
-
$
|
287 |
-
$
|
288 |
-
$
|
289 |
-
$
|
290 |
-
$
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
$
|
315 |
-
$
|
316 |
-
$
|
317 |
-
$
|
318 |
-
$
|
319 |
-
$
|
320 |
-
$
|
321 |
-
$
|
322 |
-
$
|
323 |
-
|
324 |
-
$
|
325 |
-
$
|
326 |
-
$
|
327 |
-
$
|
328 |
-
$
|
329 |
-
$
|
330 |
-
$
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
$str.='<
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
$
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
$
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
$str.='</
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
$
|
414 |
-
$
|
415 |
-
$
|
416 |
-
$
|
417 |
-
$
|
418 |
-
$
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
$
|
423 |
-
$str
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
$
|
445 |
-
$
|
446 |
-
$
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
$
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
$
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
$str.='</
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
$
|
539 |
-
$
|
540 |
-
$
|
541 |
-
$
|
542 |
-
$
|
543 |
-
$
|
544 |
-
|
545 |
-
$
|
546 |
-
$
|
547 |
-
$
|
548 |
-
$
|
549 |
-
$
|
550 |
-
$
|
551 |
-
$
|
552 |
-
$
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
$
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
$
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
$str.='</
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
$
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
$
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
$
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
$
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
$html
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
$
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
<option value="
|
810 |
-
<option value="
|
811 |
-
|
812 |
-
<option value="
|
813 |
-
<option value="
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
$
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
$
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
$
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
<option value="
|
860 |
-
<option value=""
|
861 |
-
<option value="
|
862 |
-
<option value="
|
863 |
-
<option value="
|
864 |
-
<option value="
|
865 |
-
|
866 |
-
<option value="
|
867 |
-
|
868 |
-
<option value="
|
869 |
-
|
870 |
-
<option value="
|
871 |
-
|
872 |
-
<option value="
|
873 |
-
|
874 |
-
<option value="
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
$
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
$
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
$
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
<option value="
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
$
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
<option value="
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
<option value="
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
<input type="radio" name="googlelanguagetranslator_flags_alignment" id="
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
$html
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
$html
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
<option value="
|
1063 |
-
|
1064 |
-
<option value="
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
<option value="
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
<option value="
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
<option value="
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
$
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
$html
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
<td
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
<td
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
<
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
<td
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
<td
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
<td
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
<td class="flagdisplay"
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
<
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
<td
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
<td
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
<
|
1316 |
-
<td
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
<td
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
<td
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
<
|
1334 |
-
|
1335 |
-
|
1336 |
-
<td>
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
<td style="width:
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
<li style="list-style:square outside"
|
1448 |
-
<li style="list-style:square outside"
|
1449 |
-
|
1450 |
-
<li style="list-style:square outside"
|
1451 |
-
|
1452 |
-
<li style="list-style:square outside"
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
</div> <!-- .inside -->
|
1463 |
-
</div> <!-- .postbox -->
|
1464 |
-
</div> <!-- .metabox-holder -->
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
<div class="inside">If you find our plugin useful, help keep it actively developed by clicking the donate button <br /><br />
|
1470 |
-
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
1471 |
-
<input type="hidden" name="cmd" value="_donations">
|
1472 |
-
<input type="hidden" name="business" value="robertmyrick@hotmail.com">
|
1473 |
-
<input type="hidden" name="lc" value="US">
|
1474 |
-
<input type="hidden" name="item_name" value="Support Studio 88 Design and help us bring you more Wordpress goodies! Any donation is kindly appreciated. Thank you!">
|
1475 |
-
<input type="hidden" name="no_note" value="0">
|
1476 |
-
<input type="hidden" name="currency_code" value="USD">
|
1477 |
-
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
|
1478 |
-
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
1479 |
-
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
1480 |
-
</form>
|
1481 |
-
</div> <!-- .inside -->
|
1482 |
-
</div> <!-- .postbox -->
|
1483 |
-
</div> <!-- .metabox-holder -->
|
1484 |
-
</div> <!-- .wrap -->
|
1485 |
-
<?php
|
1486 |
-
}
|
1487 |
-
}
|
1488 |
Â
$google_language_translator = new google_language_translator();
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Google Language Translator
|
4 |
+
Plugin URI: https://gtranslate.io/?xyz=998
|
5 |
+
Version: 5.0.49
|
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: Translate AI Multilingual Solutions
|
8 |
+
Author URI: https://gtranslate.io
|
9 |
+
*/
|
10 |
+
|
11 |
+
//ini_set('display_errors', 1);
|
12 |
+
//ini_set('display_startup_errors', 1);
|
13 |
+
//error_reporting(E_ALL);
|
14 |
+
|
15 |
+
include( plugin_dir_path( __FILE__ ) . 'widget.php');
|
16 |
+
|
17 |
+
class google_language_translator {
|
18 |
+
|
19 |
+
public $languages_array;
|
20 |
+
|
21 |
+
public function __construct() {
|
22 |
+
|
23 |
+
$this->languages_array = array (
|
24 |
+
'af' => 'Afrikaans',
|
25 |
+
'sq' => 'Albanian',
|
26 |
+
'am' => 'Amharic',
|
27 |
+
'ar' => 'Arabic',
|
28 |
+
'hy' => 'Armenian',
|
29 |
+
'az' => 'Azerbaijani',
|
30 |
+
'eu' => 'Basque',
|
31 |
+
'be' => 'Belarusian',
|
32 |
+
'bn' => 'Bengali',
|
33 |
+
'bs' => 'Bosnian',
|
34 |
+
'bg' => 'Bulgarian',
|
35 |
+
'ca' => 'Catalan',
|
36 |
+
'ceb' => 'Cebuano',
|
37 |
+
'ny' => 'Chichewa',
|
38 |
+
'zh-CN' => 'Chinese (Simplified)',
|
39 |
+
'zh-TW' => 'Chinese (Traditional)',
|
40 |
+
'co' => 'Corsican',
|
41 |
+
'hr' => 'Croatian',
|
42 |
+
'cs' => 'Czech',
|
43 |
+
'da' => 'Danish',
|
44 |
+
'nl' => 'Dutch',
|
45 |
+
'en' => 'English',
|
46 |
+
'eo' => 'Esperanto',
|
47 |
+
'et' => 'Estonian',
|
48 |
+
'tl' => 'Filipino',
|
49 |
+
'fi' => 'Finnish',
|
50 |
+
'fr' => 'French',
|
51 |
+
'fy' => 'Frisian',
|
52 |
+
'gl' => 'Galician',
|
53 |
+
'ka' => 'Georgian',
|
54 |
+
'de' => 'German',
|
55 |
+
'el' => 'Greek',
|
56 |
+
'gu' => 'Gujarati',
|
57 |
+
'ht' => 'Haitian',
|
58 |
+
'ha' => 'Hausa',
|
59 |
+
'haw' => 'Hawaiian',
|
60 |
+
'iw' => 'Hebrew',
|
61 |
+
'hi' => 'Hindi',
|
62 |
+
'hmn' => 'Hmong',
|
63 |
+
'hu' => 'Hungarian',
|
64 |
+
'is' => 'Icelandic',
|
65 |
+
'ig' => 'Igbo',
|
66 |
+
'id' => 'Indonesian',
|
67 |
+
'ga' => 'Irish',
|
68 |
+
'it' => 'Italian',
|
69 |
+
'ja' => 'Japanese',
|
70 |
+
'jw' => 'Javanese',
|
71 |
+
'kn' => 'Kannada',
|
72 |
+
'kk' => 'Kazakh',
|
73 |
+
'km' => 'Khmer',
|
74 |
+
'ko' => 'Korean',
|
75 |
+
'ku' => 'Kurdish',
|
76 |
+
'ky' => 'Kyrgyz',
|
77 |
+
'lo' => 'Lao',
|
78 |
+
'la' => 'Latin',
|
79 |
+
'lv' => 'Latvian',
|
80 |
+
'lt' => 'Lithuanian',
|
81 |
+
'lb' => 'Luxembourgish',
|
82 |
+
'mk' => 'Macedonian',
|
83 |
+
'mg' => 'Malagasy',
|
84 |
+
'ml' => 'Malayalam',
|
85 |
+
'ms' => 'Malay',
|
86 |
+
'mt' => 'Maltese',
|
87 |
+
'mi' => 'Maori',
|
88 |
+
'mr' => 'Marathi',
|
89 |
+
'mn' => 'Mongolian',
|
90 |
+
'my' => 'Myanmar (Burmese)',
|
91 |
+
'ne' => 'Nepali',
|
92 |
+
'no' => 'Norwegian',
|
93 |
+
'ps' => 'Pashto',
|
94 |
+
'fa' => 'Persian',
|
95 |
+
'pl' => 'Polish',
|
96 |
+
'pt' => 'Portuguese',
|
97 |
+
'pa' => 'Punjabi',
|
98 |
+
'ro' => 'Romanian',
|
99 |
+
'ru' => 'Russian',
|
100 |
+
'sr' => 'Serbian',
|
101 |
+
'sn' => 'Shona',
|
102 |
+
'st' => 'Sesotho',
|
103 |
+
'sd' => 'Sindhi',
|
104 |
+
'si' => 'Sinhala',
|
105 |
+
'sk' => 'Slovak',
|
106 |
+
'sl' => 'Slovenian',
|
107 |
+
'sm' => 'Samoan',
|
108 |
+
'gd' => 'Scots Gaelic',
|
109 |
+
'so' => 'Somali',
|
110 |
+
'es' => 'Spanish',
|
111 |
+
'su' => 'Sundanese',
|
112 |
+
'sw' => 'Swahili',
|
113 |
+
'sv' => 'Swedish',
|
114 |
+
'tg' => 'Tajik',
|
115 |
+
'ta' => 'Tamil',
|
116 |
+
'te' => 'Telugu',
|
117 |
+
'th' => 'Thai',
|
118 |
+
'tr' => 'Turkish',
|
119 |
+
'uk' => 'Ukrainian',
|
120 |
+
'ur' => 'Urdu',
|
121 |
+
'uz' => 'Uzbek',
|
122 |
+
'vi' => 'Vietnamese',
|
123 |
+
'cy' => 'Welsh',
|
124 |
+
'xh' => 'Xhosa',
|
125 |
+
'yi' => 'Yiddish',
|
126 |
+
'yo' => 'Yoruba',
|
127 |
+
'zu' => 'Zulu',
|
128 |
+
);
|
129 |
+
|
130 |
+
$plugin_data = get_file_data(__FILE__, array('Version' => 'Version'), false);
|
131 |
+
define('PLUGIN_VER', $plugin_data['Version']);
|
132 |
+
|
133 |
+
register_activation_hook( __FILE__, array(&$this,'glt_activate'));
|
134 |
+
register_deactivation_hook( __FILE__, array(&$this,'glt_deactivate'));
|
135 |
+
|
136 |
+
add_action( 'admin_menu', array( &$this, 'add_my_admin_menus'));
|
137 |
+
add_action('admin_init',array(&$this, 'initialize_settings'));
|
138 |
+
add_action('wp_head',array(&$this, 'load_css'));
|
139 |
+
add_action('wp_footer',array(&$this, 'footer_script'));
|
140 |
+
add_shortcode( 'google-translator',array(&$this, 'google_translator_shortcode'));
|
141 |
+
add_shortcode( 'glt', array(&$this, 'google_translator_menu_language'));
|
142 |
+
add_filter('widget_text','do_shortcode');
|
143 |
+
add_filter('walker_nav_menu_start_el', array(&$this,'menu_shortcodes') , 10 , 2);
|
144 |
+
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'glt_settings_link') );
|
145 |
+
|
146 |
+
if (!is_admin()) {
|
147 |
+
add_action('wp_enqueue_scripts',array(&$this, 'flags'));
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
public function glt_activate() {
|
152 |
+
add_option('googlelanguagetranslator_active', 1);
|
153 |
+
add_option('googlelanguagetranslator_language','en');
|
154 |
+
add_option('googlelanguagetranslator_flags', 1);
|
155 |
+
add_option('language_display_settings',array ('en' => 1));
|
156 |
+
add_option('googlelanguagetranslator_translatebox','yes');
|
157 |
+
add_option('googlelanguagetranslator_display','Vertical');
|
158 |
+
add_option('googlelanguagetranslator_toolbar','Yes');
|
159 |
+
add_option('googlelanguagetranslator_showbranding','Yes');
|
160 |
+
add_option('googlelanguagetranslator_flags_alignment','flags_left');
|
161 |
+
add_option('googlelanguagetranslator_analytics', 0);
|
162 |
+
add_option('googlelanguagetranslator_analytics_id','');
|
163 |
+
add_option('googlelanguagetranslator_css','');
|
164 |
+
add_option('googlelanguagetranslator_multilanguage',0);
|
165 |
+
add_option('googlelanguagetranslator_floating_widget','yes');
|
166 |
+
add_option('googlelanguagetranslator_flag_size','18');
|
167 |
+
add_option('googlelanguagetranslator_flags_order','');
|
168 |
+
add_option('googlelanguagetranslator_english_flag_choice','');
|
169 |
+
add_option('googlelanguagetranslator_spanish_flag_choice','');
|
170 |
+
add_option('googlelanguagetranslator_portuguese_flag_choice','');
|
171 |
+
add_option('googlelanguagetranslator_floating_widget_text', 'Translate »');
|
172 |
+
add_option('googlelanguagetranslator_floating_widget_text_allow_translation', 0);
|
173 |
+
delete_option('googlelanguagetranslator_manage_translations',0);
|
174 |
+
delete_option('flag_display_settings');
|
175 |
+
}
|
176 |
+
|
177 |
+
public function glt_deactivate() {
|
178 |
+
delete_option('flag_display_settings');
|
179 |
+
delete_option('googlelanguagetranslator_language_option');
|
180 |
+
}
|
181 |
+
|
182 |
+
public function glt_settings_link ( $links ) {
|
183 |
+
$settings_link = array(
|
184 |
+
'<a href="' . admin_url( 'options-general.php?page=google_language_translator' ) . '">Settings</a>',
|
185 |
+
);
|
186 |
+
return array_merge( $links, $settings_link );
|
187 |
+
}
|
188 |
+
|
189 |
+
public function add_my_admin_menus(){
|
190 |
+
$p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', array(&$this, 'page_layout_cb'));
|
191 |
+
|
192 |
+
add_action( 'load-' . $p, array(&$this, 'load_admin_js' ));
|
193 |
+
}
|
194 |
+
|
195 |
+
public function load_admin_js(){
|
196 |
+
add_action( 'admin_enqueue_scripts', array(&$this, 'enqueue_admin_js' ));
|
197 |
+
add_action('admin_footer',array(&$this, 'footer_script'));
|
198 |
+
}
|
199 |
+
|
200 |
+
public function enqueue_admin_js(){
|
201 |
+
wp_enqueue_script( 'jquery-ui-core');
|
202 |
+
wp_enqueue_script( 'jquery-ui-sortable');
|
203 |
+
wp_enqueue_style( 'wp-color-picker' );
|
204 |
+
wp_enqueue_script( 'scripts-admin', plugins_url('js/scripts-admin.js',__FILE__), array('jquery', 'wp-color-picker'), PLUGIN_VER, true);
|
205 |
+
wp_enqueue_script( 'scripts', plugins_url('js/scripts.js',__FILE__), array('jquery', 'wp-color-picker'), PLUGIN_VER, true);
|
206 |
+
wp_enqueue_script( 'scripts-google', '//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit', array('jquery'), null, true);
|
207 |
+
|
208 |
+
wp_enqueue_style( 'style.css', plugins_url('css/style.css', __FILE__),'', PLUGIN_VER,'');
|
209 |
+
|
210 |
+
if (get_option ('googlelanguagetranslator_floating_widget') == 'yes') {
|
211 |
+
wp_enqueue_style( 'glt-toolbar-styles', plugins_url('css/toolbar.css', __FILE__),'', PLUGIN_VER,'' );
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
public function flags() {
|
216 |
+
wp_enqueue_script( 'scripts', plugins_url('js/scripts.js',__FILE__), array('jquery'), PLUGIN_VER, true);
|
217 |
+
wp_enqueue_script( 'scripts-google', '//translate.google.com/translate_a/element.js?cb=GoogleLanguageTranslatorInit', array('jquery'), null, true);
|
218 |
+
wp_enqueue_style( 'google-language-translator', plugins_url('css/style.css', __FILE__), '', PLUGIN_VER, '');
|
219 |
+
|
220 |
+
if (get_option ('googlelanguagetranslator_floating_widget') == 'yes') {
|
221 |
+
wp_enqueue_style( 'glt-toolbar-styles', plugins_url('css/toolbar.css', __FILE__), '', PLUGIN_VER, '');
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
public function load_css() {
|
226 |
+
include( plugin_dir_path( __FILE__ ) . '/css/style.php');
|
227 |
+
}
|
228 |
+
|
229 |
+
public function google_translator_shortcode() {
|
230 |
+
|
231 |
+
if (get_option('googlelanguagetranslator_display')=='Vertical' || get_option('googlelanguagetranslator_display')=='SIMPLE'){
|
232 |
+
return $this->googlelanguagetranslator_vertical();
|
233 |
+
}
|
234 |
+
elseif(get_option('googlelanguagetranslator_display')=='Horizontal'){
|
235 |
+
return $this->googlelanguagetranslator_horizontal();
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
public function googlelanguagetranslator_included_languages() {
|
240 |
+
$get_language_choices = get_option ('language_display_settings');
|
241 |
+
|
242 |
+
foreach ($get_language_choices as $key=>$value):
|
243 |
+
if ($value == 1):
|
244 |
+
$items[] = $key;
|
245 |
+
endif;
|
246 |
+
endforeach;
|
247 |
+
|
248 |
+
$comma_separated = implode(",",array_values($items));
|
249 |
+
$lang = ", includedLanguages:'".$comma_separated."'";
|
250 |
+
return $lang;
|
251 |
+
}
|
252 |
+
|
253 |
+
public function analytics() {
|
254 |
+
if ( get_option('googlelanguagetranslator_analytics') == 1 ) {
|
255 |
+
$analytics_id = get_option('googlelanguagetranslator_analytics_id');
|
256 |
+
$analytics = "gaTrack: true, gaId: '".$analytics_id."'";
|
257 |
+
|
258 |
+
if (!empty ($analytics_id) ):
|
259 |
+
return ', '.$analytics;
|
260 |
+
endif;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
public function menu_shortcodes( $item_output,$item ) {
|
265 |
+
if ( !empty($item->description)) {
|
266 |
+
$output = do_shortcode($item->description);
|
267 |
+
|
268 |
+
if ( $output != $item->description )
|
269 |
+
$item_output = $output;
|
270 |
+
}
|
271 |
+
return $item_output;
|
272 |
+
}
|
273 |
+
|
274 |
+
public function google_translator_menu_language($atts, $content = '') {
|
275 |
+
extract(shortcode_atts(array(
|
276 |
+
"language" => 'Spanish',
|
277 |
+
"label" => 'Spanish',
|
278 |
+
"image" => 'no',
|
279 |
+
"text" => 'yes',
|
280 |
+
"image_size" => '24',
|
281 |
+
"label" => 'Español'
|
282 |
+
), $atts));
|
283 |
+
|
284 |
+
$default_language = get_option('googlelanguagetranslator_language');
|
285 |
+
$english_flag_choice = get_option('googlelanguagetranslator_english_flag_choice');
|
286 |
+
$spanish_flag_choice = get_option('googlelanguagetranslator_spanish_flag_choice');
|
287 |
+
$portuguese_flag_choice = get_option('googlelanguagetranslator_portuguese_flag_choice');
|
288 |
+
$language_code = array_search($language,$this->languages_array);
|
289 |
+
$language_name = $language;
|
290 |
+
$language_name_flag = $language_name;
|
291 |
+
|
292 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
293 |
+
$language_name_flag = 'canada';
|
294 |
+
}
|
295 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
296 |
+
$language_name_flag = 'united-states';
|
297 |
+
}
|
298 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
299 |
+
$language_name_flag = 'mexico';
|
300 |
+
}
|
301 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
302 |
+
$language_name_flag = 'brazil';
|
303 |
+
}
|
304 |
+
|
305 |
+
return "<a class='nturl notranslate ".$language_code." ".$language_name_flag." single-language flag' title='".$language."'>".($image=='yes' ? "<span class='flag size".$image_size."'></span>" : '') .($text=='yes' ? $label : '')."</a>";
|
306 |
+
}
|
307 |
+
|
308 |
+
public function footer_script() {
|
309 |
+
global $vertical;
|
310 |
+
global $horizontal;
|
311 |
+
global $shortcode_started;
|
312 |
+
$layout = get_option('googlelanguagetranslator_display');
|
313 |
+
$default_language = get_option('googlelanguagetranslator_language');
|
314 |
+
$language_choices = $this->googlelanguagetranslator_included_languages();
|
315 |
+
$new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
|
316 |
+
$new_languages_array = explode(",",$new_languages_array_string);
|
317 |
+
$new_languages_array_codes = array_values($new_languages_array);
|
318 |
+
$new_languages_array_count = count($new_languages_array);
|
319 |
+
$english_flag_choice = get_option('googlelanguagetranslator_english_flag_choice');
|
320 |
+
$spanish_flag_choice = get_option('googlelanguagetranslator_spanish_flag_choice');
|
321 |
+
$portuguese_flag_choice = get_option('googlelanguagetranslator_portuguese_flag_choice');
|
322 |
+
$show_flags = get_option('googlelanguagetranslator_flags');
|
323 |
+
$flag_width = get_option('googlelanguagetranslator_flag_size');
|
324 |
+
$get_language_choices = get_option('language_display_settings');
|
325 |
+
$floating_widget = get_option ('googlelanguagetranslator_floating_widget');
|
326 |
+
$floating_widget_text = get_option ('googlelanguagetranslator_floating_widget_text');
|
327 |
+
$floating_widget_text_translation_allowed = get_option ('googlelanguagetranslator_floating_widget_text_allow_translation');
|
328 |
+
$is_active = get_option ( 'googlelanguagetranslator_active' );
|
329 |
+
$is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
|
330 |
+
$str = '';
|
331 |
+
|
332 |
+
if( $is_active == 1) {
|
333 |
+
if ($floating_widget=='yes') {
|
334 |
+
$str.='<div id="glt-translate-trigger"><span'.($floating_widget_text_translation_allowed != 1 ? ' class="notranslate"' : ' class="translate"').'>'.(empty($floating_widget_text) ? 'Translate »' : $floating_widget_text).'</span></div>';
|
335 |
+
$str.='<div id="glt-toolbar"></div>';
|
336 |
+
} //endif $floating_widget
|
337 |
+
|
338 |
+
if ((($layout=='SIMPLE' && !isset($vertical)) || ($layout=='Vertical' && !isset($vertical)) || (isset($vertical) && $show_flags==0)) || (($layout=='Horizontal' && !isset($horizontal)) || (isset($horizontal) && $show_flags==0))):
|
339 |
+
|
340 |
+
$str.='<div id="flags" style="display:none" class="size'.$flag_width.'">';
|
341 |
+
$str.='<ul id="sortable" class="ui-sortable">';
|
342 |
+
if (empty($new_languages_array_string)) {
|
343 |
+
foreach ($this->languages_array as $key=>$value) {
|
344 |
+
$language_code = $key;
|
345 |
+
$language_name = $value;
|
346 |
+
$language_name_flag = $language_name;
|
347 |
+
if (!empty($get_language_choices[$language_code]) && $get_language_choices[$language_code]==1) {
|
348 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
349 |
+
$language_name_flag = 'canada';
|
350 |
+
}
|
351 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
352 |
+
$language_name_flag = 'united-states';
|
353 |
+
}
|
354 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
355 |
+
$language_name_flag = 'mexico';
|
356 |
+
}
|
357 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
358 |
+
$language_name_flag = 'brazil';
|
359 |
+
}
|
360 |
+
$str.='<li id="'.$language_name.'"><a title="'.$language_name.'" class="nturl notranslate '.$language_code.' flag '.$language_name_flag.'"></a>';
|
361 |
+
} //empty
|
362 |
+
}//foreach
|
363 |
+
} else {
|
364 |
+
if ($new_languages_array_count != count($get_language_choices)):
|
365 |
+
foreach ($get_language_choices as $key => $value) {
|
366 |
+
$language_code = $key;
|
367 |
+
$language_name = $this->languages_array[$key];
|
368 |
+
$language_name_flag = $language_name;
|
369 |
+
|
370 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
371 |
+
$language_name_flag = 'canada';
|
372 |
+
}
|
373 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
374 |
+
$language_name_flag = 'united-states';
|
375 |
+
}
|
376 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
377 |
+
$language_name_flag = 'mexico';
|
378 |
+
}
|
379 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
380 |
+
$language_name_flag = 'brazil';
|
381 |
+
}
|
382 |
+
$str.='<li id="'.$language_name.'"><a title="'.$language_name.'" class="nturl notranslate '.$language_code.' flag '.$language_name_flag.'"></a>';
|
383 |
+
} //foreach
|
384 |
+
else:
|
385 |
+
foreach ($new_languages_array_codes as $value) {
|
386 |
+
$language_name = $value;
|
387 |
+
$language_code = array_search ($language_name, $this->languages_array);
|
388 |
+
$language_name_flag = $language_name;
|
389 |
+
|
390 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
391 |
+
$language_name_flag = 'canada';
|
392 |
+
}
|
393 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
394 |
+
$language_name_flag = 'united-states';
|
395 |
+
}
|
396 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
397 |
+
$language_name_flag = 'mexico';
|
398 |
+
}
|
399 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
400 |
+
$language_name_flag = 'brazil';
|
401 |
+
}
|
402 |
+
$str.='<li id="'.$language_name.'"><a title="'.$language_name.'" class="nturl notranslate '.$language_code.' flag '.$language_name_flag.'"></a>';
|
403 |
+
}//foreach
|
404 |
+
endif;
|
405 |
+
}//endif
|
406 |
+
$str.='</ul>';
|
407 |
+
$str.='</div>';
|
408 |
+
|
409 |
+
endif; //layout
|
410 |
+
}
|
411 |
+
|
412 |
+
$language_choices = $this->googlelanguagetranslator_included_languages();
|
413 |
+
$layout = get_option('googlelanguagetranslator_display');
|
414 |
+
$is_multilanguage = get_option('googlelanguagetranslator_multilanguage');
|
415 |
+
$horizontal_layout = ', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL';
|
416 |
+
$simple_layout = ', layout: google.translate.TranslateElement.InlineLayout.SIMPLE';
|
417 |
+
$auto_display = ', autoDisplay: false';
|
418 |
+
$default_language = get_option('googlelanguagetranslator_language');
|
419 |
+
|
420 |
+
if ($is_multilanguage == 1):
|
421 |
+
$multilanguagePage = ', multilanguagePage:true';
|
422 |
+
$str.="<div id='glt-footer'>".(!isset($vertical) && !isset($horizontal) ? '<div id="google_language_translator" class="default-language-'.$default_language.'"></div>' : '')."</div><script>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $multilanguagePage . $this->analytics()."}, 'google_language_translator');}</script>";
|
423 |
+
echo $str;
|
424 |
+
elseif ($is_multilanguage == 0):
|
425 |
+
$str.="<div id='glt-footer'>".(!isset($vertical) && !isset($horizontal) ? '<div id="google_language_translator" class="default-language-'.$default_language.'"></div>' : '')."</div><script>function GoogleLanguageTranslatorInit() { new google.translate.TranslateElement({pageLanguage: '".$default_language."'".$language_choices . ($layout=='Horizontal' ? $horizontal_layout : ($layout=='SIMPLE' ? $simple_layout : '')) . $auto_display . $this->analytics()."}, 'google_language_translator');}</script>";
|
426 |
+
echo $str;
|
427 |
+
endif; //is_multilanguage
|
428 |
+
}
|
429 |
+
|
430 |
+
public function googlelanguagetranslator_vertical() {
|
431 |
+
global $started;
|
432 |
+
global $vertical;
|
433 |
+
$vertical = 1;
|
434 |
+
$started = false;
|
435 |
+
$new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
|
436 |
+
$new_languages_array = explode(",",$new_languages_array_string);
|
437 |
+
$new_languages_array_codes = array_values($new_languages_array);
|
438 |
+
$new_languages_array_count = count($new_languages_array);
|
439 |
+
$get_language_choices = get_option ('language_display_settings');
|
440 |
+
$show_flags = get_option('googlelanguagetranslator_flags');
|
441 |
+
$flag_width = get_option('googlelanguagetranslator_flag_size');
|
442 |
+
$default_language_code = get_option('googlelanguagetranslator_language');
|
443 |
+
$english_flag_choice = get_option('googlelanguagetranslator_english_flag_choice');
|
444 |
+
$spanish_flag_choice = get_option('googlelanguagetranslator_spanish_flag_choice');
|
445 |
+
$portuguese_flag_choice = get_option('googlelanguagetranslator_portuguese_flag_choice');
|
446 |
+
$is_active = get_option ( 'googlelanguagetranslator_active' );
|
447 |
+
$language_choices = $this->googlelanguagetranslator_included_languages();
|
448 |
+
$floating_widget = get_option ('googlelanguagetranslator_floating_widget');
|
449 |
+
$str = '';
|
450 |
+
|
451 |
+
if ($is_active==1):
|
452 |
+
if ($show_flags==1):
|
453 |
+
$str.='<div id="flags" class="size'.$flag_width.'">';
|
454 |
+
$str.='<ul id="sortable" class="ui-sortable" style="float:left">';
|
455 |
+
|
456 |
+
if (empty($new_languages_array_string)):
|
457 |
+
foreach ($this->languages_array as $key=>$value) {
|
458 |
+
$language_code = $key;
|
459 |
+
$language_name = $value;
|
460 |
+
$language_name_flag = $language_name;
|
461 |
+
|
462 |
+
if (!empty($get_language_choices[$language_code]) && $get_language_choices[$language_code]==1) {
|
463 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
464 |
+
$language_name_flag = 'canada';
|
465 |
+
}
|
466 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
467 |
+
$language_name_flag = 'united-states';
|
468 |
+
}
|
469 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
470 |
+
$language_name_flag = 'mexico';
|
471 |
+
}
|
472 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
473 |
+
$language_name_flag = 'brazil';
|
474 |
+
}
|
475 |
+
$str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code." ".$language_name_flag."'></a></li>";
|
476 |
+
} //endif
|
477 |
+
}//foreach
|
478 |
+
else:
|
479 |
+
if ($new_languages_array_count != count($get_language_choices)):
|
480 |
+
foreach ($get_language_choices as $key => $value) {
|
481 |
+
$language_code = $key;
|
482 |
+
$language_name = $this->languages_array[$key];
|
483 |
+
$language_name_flag = $language_name;
|
484 |
+
|
485 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
486 |
+
$language_name_flag = 'canada';
|
487 |
+
}
|
488 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
489 |
+
$language_name_flag = 'united-states';
|
490 |
+
}
|
491 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
492 |
+
$language_name_flag = 'mexico';
|
493 |
+
}
|
494 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
495 |
+
$language_name_flag = 'brazil';
|
496 |
+
}
|
497 |
+
|
498 |
+
$str.='<li id="'.$language_name.'"><a title="'.$language_name.'" class="nturl notranslate '.$language_code.' flag '.$language_name_flag.'"></a>';
|
499 |
+
} //foreach
|
500 |
+
else:
|
501 |
+
foreach ($new_languages_array_codes as $value) {
|
502 |
+
$language_name = $value;
|
503 |
+
$language_code = array_search ($language_name, $this->languages_array);
|
504 |
+
$language_name_flag = $language_name;
|
505 |
+
|
506 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
507 |
+
$language_name_flag = 'canada';
|
508 |
+
}
|
509 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
510 |
+
$language_name_flag = 'united-states';
|
511 |
+
}
|
512 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
513 |
+
$language_name_flag = 'mexico';
|
514 |
+
}
|
515 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
516 |
+
$language_name_flag = 'brazil';
|
517 |
+
}
|
518 |
+
$str.='<li id="'.$language_name.'"><a title="'.$language_name.'" class="nturl notranslate '.$language_code.' flag '.$language_name_flag.'"></a>';
|
519 |
+
}//foreach
|
520 |
+
endif;
|
521 |
+
endif;
|
522 |
+
|
523 |
+
$str.='</ul>';
|
524 |
+
$str.='</div>';
|
525 |
+
|
526 |
+
endif; //show_flags
|
527 |
+
|
528 |
+
$str.='<div id="google_language_translator" class="default-language-'.$default_language_code.'"></div>'; return $str;
|
529 |
+
|
530 |
+
endif;
|
531 |
+
} // End glt_vertical
|
532 |
+
|
533 |
+
public function googlelanguagetranslator_horizontal() {
|
534 |
+
global $started;
|
535 |
+
global $horizontal;
|
536 |
+
$horizontal = 1;
|
537 |
+
$started = false;
|
538 |
+
$new_languages_array_string = get_option('googlelanguagetranslator_flags_order');
|
539 |
+
$new_languages_array = explode(",",$new_languages_array_string);
|
540 |
+
$new_languages_array_codes = array_values($new_languages_array);
|
541 |
+
$new_languages_array_count = count($new_languages_array);
|
542 |
+
$get_language_choices = get_option ('language_display_settings');
|
543 |
+
$show_flags = get_option('googlelanguagetranslator_flags');
|
544 |
+
$flag_width = get_option('googlelanguagetranslator_flag_size');
|
545 |
+
$default_language_code = get_option('googlelanguagetranslator_language');
|
546 |
+
$english_flag_choice = get_option('googlelanguagetranslator_english_flag_choice');
|
547 |
+
$spanish_flag_choice = get_option('googlelanguagetranslator_spanish_flag_choice');
|
548 |
+
$portuguese_flag_choice = get_option('googlelanguagetranslator_portuguese_flag_choice');
|
549 |
+
$is_active = get_option ( 'googlelanguagetranslator_active' );
|
550 |
+
$language_choices = $this->googlelanguagetranslator_included_languages();
|
551 |
+
$floating_widget = get_option ('googlelanguagetranslator_floating_widget');
|
552 |
+
$str = '';
|
553 |
+
|
554 |
+
if ($is_active==1):
|
555 |
+
if ($show_flags==1):
|
556 |
+
$str.='<div id="flags" class="size'.$flag_width.'">';
|
557 |
+
$str.='<ul id="sortable" class="ui-sortable" style="float:left">';
|
558 |
+
|
559 |
+
if (empty($new_languages_array_string)):
|
560 |
+
foreach ($this->languages_array as $key=>$value) {
|
561 |
+
$language_code = $key;
|
562 |
+
$language_name = $value;
|
563 |
+
$language_name_flag = $language_name;
|
564 |
+
|
565 |
+
if (!empty($get_language_choices[$language_code]) && $get_language_choices[$language_code]==1) {
|
566 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
567 |
+
$language_name_flag = 'canada';
|
568 |
+
}
|
569 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
570 |
+
$language_name_flag = 'united-states';
|
571 |
+
}
|
572 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
573 |
+
$language_name_flag = 'mexico';
|
574 |
+
}
|
575 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
576 |
+
$language_name_flag = 'brazil';
|
577 |
+
}
|
578 |
+
$str.="<li id='".$language_name."'><a title='".$language_name."' class='notranslate flag ".$language_code." ".$language_name_flag."'></a></li>";
|
579 |
+
} //endif
|
580 |
+
}//foreach
|
581 |
+
else:
|
582 |
+
if ($new_languages_array_count != count($get_language_choices)):
|
583 |
+
foreach ($get_language_choices as $key => $value) {
|
584 |
+
$language_code = $key;
|
585 |
+
$language_name = $this->languages_array[$key];
|
586 |
+
$language_name_flag = $language_name;
|
587 |
+
|
588 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
589 |
+
$language_name_flag = 'canada';
|
590 |
+
}
|
591 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
592 |
+
$language_name_flag = 'united-states';
|
593 |
+
}
|
594 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
595 |
+
$language_name_flag = 'mexico';
|
596 |
+
}
|
597 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
598 |
+
$language_name_flag = 'brazil';
|
599 |
+
}
|
600 |
+
$str.='<li id="'.$language_name.'"><a title="'.$language_name.'" class="nturl notranslate '.$language_code.' flag '.$language_name_flag.'"></a>';
|
601 |
+
} //foreach
|
602 |
+
else:
|
603 |
+
foreach ($new_languages_array_codes as $value) {
|
604 |
+
$language_name = $value;
|
605 |
+
$language_code = array_search ($language_name, $this->languages_array);
|
606 |
+
$language_name_flag = $language_name;
|
607 |
+
|
608 |
+
if ( $language_name == 'English' && $english_flag_choice == 'canadian_flag') {
|
609 |
+
$language_name_flag = 'canada';
|
610 |
+
}
|
611 |
+
if ( $language_name == "English" && $english_flag_choice == 'us_flag') {
|
612 |
+
$language_name_flag = 'united-states';
|
613 |
+
}
|
614 |
+
if ( $language_name == 'Spanish' && $spanish_flag_choice == 'mexican_flag') {
|
615 |
+
$language_name_flag = 'mexico';
|
616 |
+
}
|
617 |
+
if ( $language_name == 'Portuguese' && $portuguese_flag_choice == 'brazilian_flag') {
|
618 |
+
$language_name_flag = 'brazil';
|
619 |
+
}
|
620 |
+
$str.='<li id="'.$language_name.'"><a title="'.$language_name.'" class="nturl notranslate '.$language_code.' flag '.$language_name_flag.'"></a>';
|
621 |
+
}//foreach
|
622 |
+
endif;
|
623 |
+
endif;
|
624 |
+
$str.='</ul>';
|
625 |
+
$str.='</div>';
|
626 |
+
|
627 |
+
endif; //show_flags
|
628 |
+
|
629 |
+
$str.='<div id="google_language_translator" class="default-language-'.$default_language_code.'"></div>'; return $str;
|
630 |
+
|
631 |
+
endif;
|
632 |
+
} // End glt_horizontal
|
633 |
+
|
634 |
+
public function initialize_settings() {
|
635 |
+
add_settings_section('glt_settings','Settings','','google_language_translator');
|
636 |
+
|
637 |
+
$settings_name_array = array ('googlelanguagetranslator_active','googlelanguagetranslator_language','language_display_settings','googlelanguagetranslator_flags','googlelanguagetranslator_translatebox','googlelanguagetranslator_display','glt_language_switcher_width','glt_language_switcher_text_color','glt_language_switcher_bg_color','googlelanguagetranslator_toolbar','googlelanguagetranslator_showbranding','googlelanguagetranslator_flags_alignment','googlelanguagetranslator_analytics','googlelanguagetranslator_analytics_id','googlelanguagetranslator_css','googlelanguagetranslator_multilanguage','googlelanguagetranslator_floating_widget','googlelanguagetranslator_flag_size','googlelanguagetranslator_flags_order','googlelanguagetranslator_english_flag_choice','googlelanguagetranslator_spanish_flag_choice','googlelanguagetranslator_portuguese_flag_choice','googlelanguagetranslator_floating_widget_text','glt_floating_widget_text_color','googlelanguagetranslator_floating_widget_text_allow_translation','glt_floating_widget_position','glt_floating_widget_bg_color');
|
638 |
+
|
639 |
+
foreach ($settings_name_array as $setting) {
|
640 |
+
add_settings_field( $setting,'',$setting.'_cb','google_language_translator','glt_settings');
|
641 |
+
register_setting( 'google_language_translator',$setting);
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
public function googlelanguagetranslator_active_cb() {
|
646 |
+
$option_name = 'googlelanguagetranslator_active' ;
|
647 |
+
$new_value = 1;
|
648 |
+
if ( get_option( $option_name ) === false ) {
|
649 |
+
|
650 |
+
// The option does not exist, so we update it.
|
651 |
+
update_option( $option_name, $new_value );
|
652 |
+
}
|
653 |
+
|
654 |
+
$options = get_option (''.$option_name.'');
|
655 |
+
|
656 |
+
$html = '<input type="checkbox" name="googlelanguagetranslator_active" id="googlelanguagetranslator_active" value="1" '.checked(1,$options,false).'/> Check this box to activate';
|
657 |
+
echo $html;
|
658 |
+
}
|
659 |
+
|
660 |
+
public function googlelanguagetranslator_language_cb() {
|
661 |
+
|
662 |
+
$option_name = 'googlelanguagetranslator_language';
|
663 |
+
$new_value = 'en';
|
664 |
+
|
665 |
+
if ( get_option( $option_name ) === false ) {
|
666 |
+
|
667 |
+
// The option does not exist, so we update it.
|
668 |
+
update_option( $option_name, $new_value );
|
669 |
+
}
|
670 |
+
|
671 |
+
$options = get_option (''.$option_name.''); ?>
|
672 |
+
|
673 |
+
<select name="googlelanguagetranslator_language" id="googlelanguagetranslator_language">
|
674 |
+
|
675 |
+
<?php
|
676 |
+
|
677 |
+
foreach ($this->languages_array as $key => $value) {
|
678 |
+
$language_code = $key;
|
679 |
+
$language_name = $value; ?>
|
680 |
+
<option value="<?php echo $language_code; ?>" <?php if($options==''.$language_code.''){echo "selected";}?>><?php echo $language_name; ?></option>
|
681 |
+
<?php } ?>
|
682 |
+
</select>
|
683 |
+
<?php
|
684 |
+
}
|
685 |
+
|
686 |
+
public function language_display_settings_cb() {
|
687 |
+
$default_language_code = get_option('googlelanguagetranslator_language');
|
688 |
+
$option_name = 'language_display_settings';
|
689 |
+
$new_value = array(''.$default_language_code.'' => 1);
|
690 |
+
|
691 |
+
if ( get_option( $option_name ) == false ) {
|
692 |
+
// The option does not exist, so we update it.
|
693 |
+
update_option( $option_name, $new_value );
|
694 |
+
}
|
695 |
+
|
696 |
+
$get_language_choices = get_option (''.$option_name.''); ?>
|
697 |
+
|
698 |
+
<script>jQuery(document).ready(function($) { $('.select-all-languages').on('click',function(e) { e.preventDefault(); $('.languages').find('input:checkbox').prop('checked', true); }); $('.clear-all-languages').on('click',function(e) { e.preventDefault();
|
699 |
+
$('.languages').find('input:checkbox').prop('checked', false); }); }); </script>
|
700 |
+
|
701 |
+
<?php
|
702 |
+
|
703 |
+
foreach ($this->languages_array as $key => $value) {
|
704 |
+
$language_code = $key;
|
705 |
+
$language_name = $value;
|
706 |
+
$language_code_array[] = $key;
|
707 |
+
|
708 |
+
if (!isset($get_language_choices[''.$language_code.''])) {
|
709 |
+
$get_language_choices[''.$language_code.''] = 0;
|
710 |
+
}
|
711 |
+
|
712 |
+
$items[] = $get_language_choices[''.$language_code.''];
|
713 |
+
$language_codes = $language_code_array;
|
714 |
+
$item_count = count($items);
|
715 |
+
|
716 |
+
if ($item_count == 1 || $item_count == 27 || $item_count == 53 || $item_count == 79) { ?>
|
717 |
+
<div class="languages" style="width:25%; float:left">
|
718 |
+
<?php } ?>
|
719 |
+
<div><input type="checkbox" name="language_display_settings[<?php echo $language_code; ?>]" value="1"<?php checked( 1,$get_language_choices[''.$language_code.'']); ?>/><?php echo $language_name; ?></div>
|
720 |
+
<?php
|
721 |
+
if ($item_count == 26 || $item_count == 52 || $item_count == 78 || $item_count == 104) { ?>
|
722 |
+
</div>
|
723 |
+
<?php }
|
724 |
+
} ?>
|
725 |
+
<div class="clear"></div>
|
726 |
+
<?php
|
727 |
+
}
|
728 |
+
|
729 |
+
public function googlelanguagetranslator_flags_cb() {
|
730 |
+
|
731 |
+
$option_name = 'googlelanguagetranslator_flags' ;
|
732 |
+
$new_value = 1;
|
733 |
+
|
734 |
+
if ( get_option( $option_name ) === false ) {
|
735 |
+
|
736 |
+
// The option does not exist, so we update it.
|
737 |
+
update_option( $option_name, $new_value );
|
738 |
+
}
|
739 |
+
|
740 |
+
$options = get_option (''.$option_name.'');
|
741 |
+
|
742 |
+
$html = '<input type="checkbox" name="googlelanguagetranslator_flags" id="googlelanguagetranslator_flags" value="1" '.checked(1,$options,false).'/> Check to show flags';
|
743 |
+
|
744 |
+
echo $html;
|
745 |
+
}
|
746 |
+
|
747 |
+
public function googlelanguagetranslator_floating_widget_cb() {
|
748 |
+
|
749 |
+
$option_name = 'googlelanguagetranslator_floating_widget' ;
|
750 |
+
$new_value = 'yes';
|
751 |
+
|
752 |
+
if ( get_option( $option_name ) === false ) {
|
753 |
+
|
754 |
+
// The option does not exist, so we update it.
|
755 |
+
update_option( $option_name, $new_value );
|
756 |
+
}
|
757 |
+
|
758 |
+
$options = get_option (''.$option_name.''); ?>
|
759 |
+
|
760 |
+
<select name="googlelanguagetranslator_floating_widget" id="googlelanguagetranslator_floating_widget" style="width:170px">
|
761 |
+
<option value="yes" <?php if($options=='yes'){echo "selected";}?>>Yes, show widget</option>
|
762 |
+
<option value="no" <?php if($options=='no'){echo "selected";}?>>No, hide widget</option>
|
763 |
+
</select>
|
764 |
+
<?php }
|
765 |
+
|
766 |
+
public function googlelanguagetranslator_floating_widget_text_cb() {
|
767 |
+
|
768 |
+
$option_name = 'googlelanguagetranslator_floating_widget_text' ;
|
769 |
+
$new_value = 'Translate »';
|
770 |
+
|
771 |
+
if ( get_option( $option_name ) === false ) {
|
772 |
+
// The option does not exist, so we update it.
|
773 |
+
update_option( $option_name, $new_value );
|
774 |
+
}
|
775 |
+
|
776 |
+
$options = get_option (''.$option_name.''); ?>
|
777 |
+
|
778 |
+
<input type="text" name="googlelanguagetranslator_floating_widget_text" id="googlelanguagetranslator_floating_widget_text" value="<?php echo esc_attr($options); ?>" style="width:170px"/>
|
779 |
+
|
780 |
+
<?php }
|
781 |
+
|
782 |
+
public function googlelanguagetranslator_floating_widget_text_allow_translation_cb() {
|
783 |
+
$option_name = 'googlelanguagetranslator_floating_widget_text_allow_translation' ;
|
784 |
+
$new_value = 0;
|
785 |
+
|
786 |
+
if ( get_option( $option_name ) === false ) {
|
787 |
+
// The option does not exist, so we update it.
|
788 |
+
update_option( $option_name, $new_value );
|
789 |
+
}
|
790 |
+
|
791 |
+
$options = get_option (''.$option_name.'');
|
792 |
+
|
793 |
+
$html = '<input type="checkbox" name="googlelanguagetranslator_floating_widget_text_allow_translation" id="googlelanguagetranslator_floating_widget_text_allow_translation" value="1" '.checked(1,$options,false).'/> Check to allow';
|
794 |
+
echo $html;
|
795 |
+
}
|
796 |
+
|
797 |
+
public function glt_floating_widget_position_cb() {
|
798 |
+
$option_name = 'glt_floating_widget_position';
|
799 |
+
$new_value = '';
|
800 |
+
|
801 |
+
if (get_option($option_name) === false):
|
802 |
+
update_option($option_name, $new_value);
|
803 |
+
endif;
|
804 |
+
|
805 |
+
$options = get_option(''.$option_name.''); ?>
|
806 |
+
|
807 |
+
<select name="glt_floating_widget_position" id="glt_floating_widget_position" style="width:170px">
|
808 |
+
<option value="bottom_left" <?php if($options=='bottom_left'){echo "selected";}?>>Bottom left</option>
|
809 |
+
<option value="bottom_center" <?php if($options=='bottom_center'){echo "selected";}?>>Bottom center</option>
|
810 |
+
<option value="bottom_right" <?php if($options=='bottom_right'){echo "selected";}?>>Bottom right</option>
|
811 |
+
<option value="top_left" <?php if($options=='top_left'){echo "selected";}?>>Top left</option>
|
812 |
+
<option value="top_center" <?php if($options=='top_center'){echo "selected";}?>>Top center</option>
|
813 |
+
<option value="top_right" <?php if($options=='top_right'){echo "selected";}?>>Top right</option>
|
814 |
+
</select>
|
815 |
+
<?php
|
816 |
+
}
|
817 |
+
|
818 |
+
public function glt_floating_widget_text_color_cb() {
|
819 |
+
$option_name = 'glt_floating_widget_text_color';
|
820 |
+
$new_value = '#ffffff';
|
821 |
+
|
822 |
+
if (get_option($option_name) === false):
|
823 |
+
update_option($option_name, $new_value);
|
824 |
+
endif;
|
825 |
+
|
826 |
+
$options = get_option(''.$option_name.''); ?>
|
827 |
+
|
828 |
+
<input type="text" name="glt_floating_widget_text_color" id="glt_floating_widget_text_color" class="color-field" value="<?php echo $options; ?>"/>
|
829 |
+
<?php
|
830 |
+
}
|
831 |
+
|
832 |
+
public function glt_floating_widget_bg_color_cb() {
|
833 |
+
$option_name = 'glt_floating_widget_bg_color';
|
834 |
+
$new_value = '#f89406';
|
835 |
+
|
836 |
+
if (get_option($option_name) === false):
|
837 |
+
update_option($option_name, $new_value);
|
838 |
+
endif;
|
839 |
+
|
840 |
+
$options = get_option(''.$option_name.''); ?>
|
841 |
+
|
842 |
+
<input type="text" name="glt_floating_widget_bg_color" id="glt_floating_widget_bg_color" class="color-field" value="<?php echo $options; ?>"/>
|
843 |
+
<?php
|
844 |
+
}
|
845 |
+
|
846 |
+
public function glt_language_switcher_width_cb() {
|
847 |
+
|
848 |
+
$option_name = 'glt_language_switcher_width' ;
|
849 |
+
$new_value = '';
|
850 |
+
|
851 |
+
if ( get_option( $option_name ) === false ) {
|
852 |
+
update_option( $option_name, $new_value );
|
853 |
+
}
|
854 |
+
|
855 |
+
$options = get_option (''.$option_name.''); ?>
|
856 |
+
|
857 |
+
<select name="glt_language_switcher_width" id="glt_language_switcher_width" style="width:110px;">
|
858 |
+
<option value="100%" <?php if($options=='100%'){echo "selected";}?>>100%</option>
|
859 |
+
<option value="">-------</option>
|
860 |
+
<option value="150px" <?php if($options=='150px'){echo "selected";}?>>150px</option>
|
861 |
+
<option value="160px" <?php if($options=='160px'){echo "selected";}?>>160px</option>
|
862 |
+
<option value="170px" <?php if($options=='170px'){echo "selected";}?>>170px</option>
|
863 |
+
<option value="180px" <?php if($options=='180px'){echo "selected";}?>>180px</option>
|
864 |
+
<option value="190px" <?php if($options=='190px'){echo "selected";}?>>190px</option>
|
865 |
+
<option value="200px" <?php if($options=='200px'){echo "selected";}?>>200px</option>
|
866 |
+
<option value="210px" <?php if($options=='210px'){echo "selected";}?>>210px</option>
|
867 |
+
<option value="220px" <?php if($options=='220px'){echo "selected";}?>>220px</option>
|
868 |
+
<option value="230px" <?php if($options=='230px'){echo "selected";}?>>230px</option>
|
869 |
+
<option value="240px" <?php if($options=='240px'){echo "selected";}?>>240px</option>
|
870 |
+
<option value="250px" <?php if($options=='250px'){echo "selected";}?>>250px</option>
|
871 |
+
<option value="260px" <?php if($options=='260px'){echo "selected";}?>>260px</option>
|
872 |
+
<option value="270px" <?php if($options=='270px'){echo "selected";}?>>270px</option>
|
873 |
+
<option value="280px" <?php if($options=='280px'){echo "selected";}?>>280px</option>
|
874 |
+
<option value="290px" <?php if($options=='290px'){echo "selected";}?>>290px</option>
|
875 |
+
<option value="300px" <?php if($options=='300px'){echo "selected";}?>>300px</option>
|
876 |
+
</select>
|
877 |
+
<?php }
|
878 |
+
|
879 |
+
public function glt_language_switcher_text_color_cb() {
|
880 |
+
$option_name = 'glt_language_switcher_text_color';
|
881 |
+
$new_value = '#32373c';
|
882 |
+
|
883 |
+
if (get_option($option_name) === false):
|
884 |
+
update_option($option_name, $new_value);
|
885 |
+
endif;
|
886 |
+
|
887 |
+
$options = get_option(''.$option_name.''); ?>
|
888 |
+
|
889 |
+
<input type="text" name="glt_language_switcher_text_color" id="glt_language_switcher_text_color" class="color-field" value="<?php echo $options; ?>"/>
|
890 |
+
<?php
|
891 |
+
}
|
892 |
+
|
893 |
+
public function glt_language_switcher_bg_color_cb() {
|
894 |
+
$option_name = 'glt_language_switcher_bg_color';
|
895 |
+
$new_value = '';
|
896 |
+
|
897 |
+
if (get_option($option_name) === false):
|
898 |
+
update_option($option_name, $new_value);
|
899 |
+
endif;
|
900 |
+
|
901 |
+
$options = get_option(''.$option_name.''); ?>
|
902 |
+
|
903 |
+
<input type="text" name="glt_language_switcher_bg_color" id="glt_language_switcher_bg_color" class="color-field" value="<?php echo $options; ?>"/>
|
904 |
+
<?php
|
905 |
+
}
|
906 |
+
|
907 |
+
public function googlelanguagetranslator_translatebox_cb() {
|
908 |
+
|
909 |
+
$option_name = 'googlelanguagetranslator_translatebox' ;
|
910 |
+
$new_value = 'yes';
|
911 |
+
|
912 |
+
if ( get_option( $option_name ) === false ) {
|
913 |
+
|
914 |
+
// The option does not exist, so we update it.
|
915 |
+
update_option( $option_name, $new_value );
|
916 |
+
}
|
917 |
+
|
918 |
+
$options = get_option (''.$option_name.''); ?>
|
919 |
+
|
920 |
+
<select name="googlelanguagetranslator_translatebox" id="googlelanguagetranslator_translatebox" style="width:190px">
|
921 |
+
<option value="yes" <?php if($options=='yes'){echo "selected";}?>>Show language switcher</option>
|
922 |
+
<option value="no" <?php if($options=='no'){echo "selected";}?>>Hide language switcher</option>
|
923 |
+
</select>
|
924 |
+
<?php }
|
925 |
+
|
926 |
+
public function googlelanguagetranslator_display_cb() {
|
927 |
+
|
928 |
+
$option_name = 'googlelanguagetranslator_display' ;
|
929 |
+
$new_value = 'Vertical';
|
930 |
+
|
931 |
+
if ( get_option( $option_name ) === false ) {
|
932 |
+
|
933 |
+
// The option does not exist, so we update it.
|
934 |
+
update_option( $option_name, $new_value );
|
935 |
+
}
|
936 |
+
|
937 |
+
$options = get_option (''.$option_name.''); ?>
|
938 |
+
|
939 |
+
<select name="googlelanguagetranslator_display" id="googlelanguagetranslator_display" style="width:170px;">
|
940 |
+
<option value="Vertical" <?php if(get_option('googlelanguagetranslator_display')=='Vertical'){echo "selected";}?>>Vertical</option>
|
941 |
+
<option value="Horizontal" <?php if(get_option('googlelanguagetranslator_display')=='Horizontal'){echo "selected";}?>>Horizontal</option>
|
942 |
+
<?php
|
943 |
+
$browser_lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';
|
944 |
+
if (!empty($get_http_accept_language)):
|
945 |
+
$get_http_accept_language = explode(",",$browser_lang);
|
946 |
+
else:
|
947 |
+
$get_http_accept_language = explode(",",$browser_lang);
|
948 |
+
endif;
|
949 |
+
$bestlang = $get_http_accept_language[0];
|
950 |
+
$bestlang_prefix = substr($get_http_accept_language[0],0,2);
|
951 |
+
|
952 |
+
if ($bestlang_prefix == 'en'): ?>
|
953 |
+
<option value="SIMPLE" <?php if (get_option('googlelanguagetranslator_display')=='SIMPLE'){echo "selected";}?>>SIMPLE</option>
|
954 |
+
<?php endif; ?>
|
955 |
+
</select>
|
956 |
+
<?php }
|
957 |
+
|
958 |
+
public function googlelanguagetranslator_toolbar_cb() {
|
959 |
+
|
960 |
+
$option_name = 'googlelanguagetranslator_toolbar' ;
|
961 |
+
$new_value = 'Yes';
|
962 |
+
|
963 |
+
if ( get_option( $option_name ) === false ) {
|
964 |
+
|
965 |
+
// The option does not exist, so we update it.
|
966 |
+
update_option( $option_name, $new_value );
|
967 |
+
}
|
968 |
+
|
969 |
+
$options = get_option (''.$option_name.''); ?>
|
970 |
+
|
971 |
+
<select name="googlelanguagetranslator_toolbar" id="googlelanguagetranslator_toolbar" style="width:170px;">
|
972 |
+
<option value="Yes" <?php if(get_option('googlelanguagetranslator_toolbar')=='Yes'){echo "selected";}?>>Yes</option>
|
973 |
+
<option value="No" <?php if(get_option('googlelanguagetranslator_toolbar')=='No'){echo "selected";}?>>No</option>
|
974 |
+
</select>
|
975 |
+
<?php }
|
976 |
+
|
977 |
+
public function googlelanguagetranslator_showbranding_cb() {
|
978 |
+
|
979 |
+
$option_name = 'googlelanguagetranslator_showbranding' ;
|
980 |
+
$new_value = 'Yes';
|
981 |
+
|
982 |
+
if ( get_option( $option_name ) === false ) {
|
983 |
+
|
984 |
+
// The option does not exist, so we update it.
|
985 |
+
update_option( $option_name, $new_value );
|
986 |
+
}
|
987 |
+
|
988 |
+
$options = get_option (''.$option_name.''); ?>
|
989 |
+
|
990 |
+
<select name="googlelanguagetranslator_showbranding" id="googlelanguagetranslator_showbranding" style="width:170px;">
|
991 |
+
<option value="Yes" <?php if(get_option('googlelanguagetranslator_showbranding')=='Yes'){echo "selected";}?>>Yes</option>
|
992 |
+
<option value="No" <?php if(get_option('googlelanguagetranslator_showbranding')=='No'){echo "selected";}?>>No</option>
|
993 |
+
</select>
|
994 |
+
<?php }
|
995 |
+
|
996 |
+
public function googlelanguagetranslator_flags_alignment_cb() {
|
997 |
+
|
998 |
+
$option_name = 'googlelanguagetranslator_flags_alignment' ;
|
999 |
+
$new_value = 'flags_left';
|
1000 |
+
|
1001 |
+
if ( get_option( $option_name ) === false ) {
|
1002 |
+
|
1003 |
+
// The option does not exist, so we update it.
|
1004 |
+
update_option( $option_name, 'flags_left' );
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
$options = get_option (''.$option_name.''); ?>
|
1008 |
+
|
1009 |
+
<input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_left" value="flags_left" <?php if($options=='flags_left'){echo "checked";}?>/> Align Left<br/>
|
1010 |
+
<input type="radio" name="googlelanguagetranslator_flags_alignment" id="flags_right" value="flags_right" <?php if($options=='flags_right'){echo "checked";}?>/> Align Right
|
1011 |
+
<?php }
|
1012 |
+
|
1013 |
+
public function googlelanguagetranslator_analytics_cb() {
|
1014 |
+
|
1015 |
+
$option_name = 'googlelanguagetranslator_analytics' ;
|
1016 |
+
$new_value = 0;
|
1017 |
+
|
1018 |
+
if ( get_option( $option_name ) === false ) {
|
1019 |
+
|
1020 |
+
// The option does not exist, so we update it.
|
1021 |
+
update_option( $option_name, $new_value );
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
$options = get_option (''.$option_name.'');
|
1025 |
+
|
1026 |
+
$html = '<input type="checkbox" name="googlelanguagetranslator_analytics" id="googlelanguagetranslator_analytics" value="1" '.checked(1,$options,false).'/> Activate Google Analytics tracking?';
|
1027 |
+
echo $html;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
public function googlelanguagetranslator_analytics_id_cb() {
|
1031 |
+
|
1032 |
+
$option_name = 'googlelanguagetranslator_analytics_id' ;
|
1033 |
+
$new_value = '';
|
1034 |
+
|
1035 |
+
if ( get_option( $option_name ) === false ) {
|
1036 |
+
|
1037 |
+
// The option does not exist, so we update it.
|
1038 |
+
update_option( $option_name, $new_value );
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
$options = get_option (''.$option_name.'');
|
1042 |
+
|
1043 |
+
$html = '<input type="text" name="googlelanguagetranslator_analytics_id" id="googlelanguagetranslator_analytics_id" value="'.$options.'" />';
|
1044 |
+
echo $html;
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
public function googlelanguagetranslator_flag_size_cb() {
|
1048 |
+
|
1049 |
+
$option_name = 'googlelanguagetranslator_flag_size' ;
|
1050 |
+
$new_value = '18';
|
1051 |
+
|
1052 |
+
if ( get_option( $option_name ) === false ) {
|
1053 |
+
|
1054 |
+
// The option does not exist, so we update it.
|
1055 |
+
update_option( $option_name, $new_value );
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
$options = get_option (''.$option_name.''); ?>
|
1059 |
+
|
1060 |
+
<select name="googlelanguagetranslator_flag_size" id="googlelanguagetranslator_flag_size" style="width:110px;">
|
1061 |
+
<option value="16" <?php if($options=='16'){echo "selected";}?>>16px</option>
|
1062 |
+
<option value="18" <?php if($options=='18'){echo "selected";}?>>18px</option>
|
1063 |
+
<option value="20" <?php if($options=='20'){echo "selected";}?>>20px</option>
|
1064 |
+
<option value="22" <?php if($options=='22'){echo "selected";}?>>22px</option>
|
1065 |
+
<option value="24" <?php if($options=='24'){echo "selected";}?>>24px</option>
|
1066 |
+
</select>
|
1067 |
+
<?php }
|
1068 |
+
|
1069 |
+
public function googlelanguagetranslator_flags_order_cb() {
|
1070 |
+
$option_name = 'googlelanguagetranslator_flags_order';
|
1071 |
+
$new_value = '';
|
1072 |
+
|
1073 |
+
if ( get_option ( $option_name ) === false ) {
|
1074 |
+
|
1075 |
+
// The option does not exist, so we update it.
|
1076 |
+
update_option( $option_name, $new_value );
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
$options = get_option ( ''.$option_name.'' ); ?>
|
1080 |
+
|
1081 |
+
<input type="hidden" id="order" name="googlelanguagetranslator_flags_order" value="<?php print_r(get_option('googlelanguagetranslator_flags_order')); ?>" />
|
1082 |
+
<?php
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
public function googlelanguagetranslator_english_flag_choice_cb() {
|
1086 |
+
$option_name = 'googlelanguagetranslator_english_flag_choice';
|
1087 |
+
$new_value = 'us_flag';
|
1088 |
+
|
1089 |
+
if ( get_option ( $option_name ) === false ) {
|
1090 |
+
|
1091 |
+
// The option does not exist, so we update it.
|
1092 |
+
update_option( $option_name, $new_value );
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
$options = get_option ( ''.$option_name.'' ); ?>
|
1096 |
+
|
1097 |
+
<select name="googlelanguagetranslator_english_flag_choice" id="googlelanguagetranslator_english_flag_choice">
|
1098 |
+
<option value="us_flag" <?php if($options=='us_flag'){echo "selected";}?>>U.S. Flag</option>
|
1099 |
+
<option value="uk_flag" <?php if ($options=='uk_flag'){echo "selected";}?>>U.K Flag</option>
|
1100 |
+
<option value="canadian_flag" <?php if ($options=='canadian_flag'){echo "selected";}?>>Canadian Flag</option>
|
1101 |
+
</select>
|
1102 |
+
<?php
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
public function googlelanguagetranslator_spanish_flag_choice_cb() {
|
1106 |
+
$option_name = 'googlelanguagetranslator_spanish_flag_choice';
|
1107 |
+
$new_value = 'spanish_flag';
|
1108 |
+
|
1109 |
+
if ( get_option ( $option_name ) === false ) {
|
1110 |
+
|
1111 |
+
// The option does not exist, so we update it.
|
1112 |
+
update_option( $option_name, $new_value );
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
$options = get_option ( ''.$option_name.'' ); ?>
|
1116 |
+
|
1117 |
+
<select name="googlelanguagetranslator_spanish_flag_choice" id="googlelanguagetranslator_spanish_flag_choice">
|
1118 |
+
<option value="spanish_flag" <?php if($options=='spanish_flag'){echo "selected";}?>>Spanish Flag</option>
|
1119 |
+
<option value="mexican_flag" <?php if ($options=='mexican_flag'){echo "selected";}?>>Mexican Flag</option>
|
1120 |
+
</select>
|
1121 |
+
<?php
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
public function googlelanguagetranslator_portuguese_flag_choice_cb() {
|
1125 |
+
$option_name = 'googlelanguagetranslator_portuguese_flag_choice';
|
1126 |
+
$new_value = 'portuguese_flag';
|
1127 |
+
|
1128 |
+
if ( get_option ( $option_name ) === false ) {
|
1129 |
+
|
1130 |
+
// The option does not exist, so we update it.
|
1131 |
+
update_option( $option_name, $new_value );
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
$options = get_option ( ''.$option_name.'' ); ?>
|
1135 |
+
|
1136 |
+
<select name="googlelanguagetranslator_portuguese_flag_choice" id="googlelanguagetranslator_spanish_flag_choice">
|
1137 |
+
<option value="portuguese_flag" <?php if($options=='portuguese_flag'){echo "selected";}?>>Portuguese Flag</option>
|
1138 |
+
<option value="brazilian_flag" <?php if ($options=='brazilian_flag'){echo "selected";}?>>Brazilian Flag</option>
|
1139 |
+
</select>
|
1140 |
+
<?php
|
1141 |
+
}
|
1142 |
+
|
1143 |
+
public function googlelanguagetranslator_css_cb() {
|
1144 |
+
|
1145 |
+
$option_name = 'googlelanguagetranslator_css' ;
|
1146 |
+
$new_value = '';
|
1147 |
+
|
1148 |
+
if ( get_option( $option_name ) === false ) {
|
1149 |
+
|
1150 |
+
// The option does not exist, so we update it.
|
1151 |
+
update_option( $option_name, $new_value );
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
$options = get_option (''.$option_name.'');
|
1155 |
+
|
1156 |
+
$html = '<textarea style="width:100%; height:200px" name="googlelanguagetranslator_css" id="googlelanguagetranslator_css">'.$options.'</textarea>';
|
1157 |
+
echo $html;
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
public function googlelanguagetranslator_multilanguage_cb() {
|
1161 |
+
|
1162 |
+
$option_name = 'googlelanguagetranslator_multilanguage' ;
|
1163 |
+
$new_value = 0;
|
1164 |
+
|
1165 |
+
if ( get_option( $option_name ) === false ) {
|
1166 |
+
|
1167 |
+
// The option does not exist, so we update it.
|
1168 |
+
update_option( $option_name, $new_value );
|
1169 |
+
}
|
1170 |
+
|
1171 |
+
$options = get_option (''.$option_name.'');
|
1172 |
+
|
1173 |
+
$html = '<input type="checkbox" name="googlelanguagetranslator_multilanguage" id="googlelanguagetranslator_multilanguage" value="1" '.checked(1,$options,false).'/> Turn on multilanguage mode?';
|
1174 |
+
echo $html;
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
public function googlelanguagetranslator_exclude_translation_cb() {
|
1178 |
+
|
1179 |
+
$option_name = 'googlelanguagetranslator_exclude_translation';
|
1180 |
+
$new_value = '';
|
1181 |
+
|
1182 |
+
if (get_option($option_name) === false ) {
|
1183 |
+
// The option does not exist, so we update it.
|
1184 |
+
update_option( $option_name, $new_value );
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
$options = get_option (''.$option_name.'');
|
1188 |
+
|
1189 |
+
$html = '<input type="text" name="'.$option_name.'" id="'.$option_name.'" value="'.$options.'" />';
|
1190 |
+
|
1191 |
+
echo $html;
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
public function page_layout_cb() {
|
1195 |
+
include( plugin_dir_path( __FILE__ ) . '/css/style.php'); add_thickbox(); ?>
|
1196 |
+
<div id="glt-settings" class="wrap">
|
1197 |
+
<div id="icon-options-general" class="icon32"></div>
|
1198 |
+
<h2><span class="notranslate">Google Language Translator</span></h2>
|
1199 |
+
<form action="<?php echo admin_url( '/options.php'); ?>" method="post">
|
1200 |
+
<div class="metabox-holder has-right-sidebar" style="float:left; width:65%">
|
1201 |
+
<div class="postbox glt-main-settings" style="width: 100%">
|
1202 |
+
<h3 class="notranslate">Main Settings</h3>
|
1203 |
+
<?php settings_fields('google_language_translator'); ?>
|
1204 |
+
<table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
|
1205 |
+
<tr>
|
1206 |
+
<td style="width:60%" class="notranslate">Plugin Status:</td>
|
1207 |
+
<td class="notranslate"><?php $this->googlelanguagetranslator_active_cb(); ?></td>
|
1208 |
+
</tr>
|
1209 |
+
|
1210 |
+
<tr class="notranslate">
|
1211 |
+
<td>Choose the original language of your website</td>
|
1212 |
+
<td><?php $this->googlelanguagetranslator_language_cb(); ?></td>
|
1213 |
+
</tr>
|
1214 |
+
|
1215 |
+
<tr class="notranslate">
|
1216 |
+
<td colspan="2">What languages will be active? (<a class="select-all-languages" href="#">Select All</a> | <a class="clear-all-languages" href="#">Clear</a>)</td>
|
1217 |
+
</tr>
|
1218 |
+
|
1219 |
+
<tr class="notranslate languages">
|
1220 |
+
<td colspan="2"><?php $this->language_display_settings_cb(); ?></td>
|
1221 |
+
</tr>
|
1222 |
+
</table>
|
1223 |
+
</div> <!-- .postbox -->
|
1224 |
+
|
1225 |
+
<div class="postbox glt-layout-settings" style="width: 100%">
|
1226 |
+
<h3 class="notranslate">Language Switcher Settings</h3>
|
1227 |
+
<table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
|
1228 |
+
|
1229 |
+
<tr class="notranslate">
|
1230 |
+
<td class="choose_flags_intro">Language switcher width: <strong style="color:red">NEW!</strong></td>
|
1231 |
+
<td class="choose_flags_intro"><?php $this->glt_language_switcher_width_cb(); ?></td>
|
1232 |
+
</tr>
|
1233 |
+
|
1234 |
+
<tr class="notranslate">
|
1235 |
+
<td class="choose_flags_intro">Language switcher text color: <strong style="color:red">NEW!</strong></td>
|
1236 |
+
<td class="choose_flags_intro"><?php $this->glt_language_switcher_text_color_cb(); ?></td>
|
1237 |
+
</tr>
|
1238 |
+
|
1239 |
+
<tr class="notranslate">
|
1240 |
+
<td class="choose_flags_intro">Language switcher background color: <strong style="color:red">NEW!</strong></td>
|
1241 |
+
<td class="choose_flags_intro"><?php $this->glt_language_switcher_bg_color_cb(); ?></td>
|
1242 |
+
</tr>
|
1243 |
+
|
1244 |
+
<tr class="notranslate">
|
1245 |
+
<td class="choose_flags_intro">Show flag images?<br/>(Display up to 104 flags above the language switcher)</td>
|
1246 |
+
<td class="choose_flags_intro"><?php $this->googlelanguagetranslator_flags_cb(); ?></td>
|
1247 |
+
</tr>
|
1248 |
+
|
1249 |
+
<tr class="notranslate">
|
1250 |
+
<td>Show or hide the langauge switcher?</td>
|
1251 |
+
<td><?php $this->googlelanguagetranslator_translatebox_cb(); ?></td>
|
1252 |
+
</tr>
|
1253 |
+
|
1254 |
+
<tr class="notranslate">
|
1255 |
+
<td>Layout option:</td>
|
1256 |
+
<td><?php $this->googlelanguagetranslator_display_cb(); ?></td>
|
1257 |
+
</tr>
|
1258 |
+
|
1259 |
+
<tr class="notranslate">
|
1260 |
+
<td>Show Google Toolbar?</td>
|
1261 |
+
<td><?php $this->googlelanguagetranslator_toolbar_cb(); ?></td>
|
1262 |
+
</tr>
|
1263 |
+
|
1264 |
+
<tr class="notranslate">
|
1265 |
+
<td>Show Google Branding? <a href="https://developers.google.com/translate/v2/attribution" target="_blank">Learn more</a></td>
|
1266 |
+
<td><?php $this->googlelanguagetranslator_showbranding_cb(); ?></td>
|
1267 |
+
</tr>
|
1268 |
+
|
1269 |
+
<tr class="alignment notranslate">
|
1270 |
+
<td class="flagdisplay">Align the translator left or right?</td>
|
1271 |
+
<td class="flagdisplay"><?php $this->googlelanguagetranslator_flags_alignment_cb(); ?></td>
|
1272 |
+
</tr>
|
1273 |
+
</table>
|
1274 |
+
</div> <!-- .postbox -->
|
1275 |
+
|
1276 |
+
<div class="postbox glt-floating-widget-settings" style="width: 100%">
|
1277 |
+
<h3 class="notranslate">Floating Widget Settings</h3>
|
1278 |
+
<table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
|
1279 |
+
<tr class="floating_widget_show notranslate">
|
1280 |
+
<td>Show floating translation widget?</td>
|
1281 |
+
<td><?php $this->googlelanguagetranslator_floating_widget_cb(); ?></td>
|
1282 |
+
</tr>
|
1283 |
+
|
1284 |
+
<tr class="floating-widget floating-widget-custom-text notranslate hidden">
|
1285 |
+
<td>Custom text for the floating widget:</td>
|
1286 |
+
<td><?php $this->googlelanguagetranslator_floating_widget_text_cb(); ?></td>
|
1287 |
+
</tr>
|
1288 |
+
|
1289 |
+
<tr class="floating-widget floating-widget-text-translate notranslate hidden">
|
1290 |
+
<td>Allow floating widget text to translate?:</td>
|
1291 |
+
<td><?php $this->googlelanguagetranslator_floating_widget_text_allow_translation_cb(); ?></td>
|
1292 |
+
</tr>
|
1293 |
+
|
1294 |
+
<tr class="floating-widget floating-widget-position notranslate hidden">
|
1295 |
+
<td>Floating Widget Position: <strong style="color:red">NEW!</strong></td>
|
1296 |
+
<td><?php $this->glt_floating_widget_position_cb(); ?></td>
|
1297 |
+
</tr>
|
1298 |
+
|
1299 |
+
<tr class="floating-widget floating-widget-text-color notranslate hidden">
|
1300 |
+
<td>Floating Widget Text Color: <strong style="color:red">NEW!</strong></td>
|
1301 |
+
<td><?php $this->glt_floating_widget_text_color_cb(); ?></td>
|
1302 |
+
</tr>
|
1303 |
+
|
1304 |
+
<tr class="floating-widget floating-widget-color notranslate hidden">
|
1305 |
+
<td>Floating Widget Background Color <strong style="color:red">NEW!</strong></td>
|
1306 |
+
<td><?php $this->glt_floating_widget_bg_color_cb(); ?></td>
|
1307 |
+
</tr>
|
1308 |
+
</table>
|
1309 |
+
</div> <!-- .postbox -->
|
1310 |
+
|
1311 |
+
<div class="postbox glt-behavior-settings" style="width: 100%">
|
1312 |
+
<h3 class="notranslate">Behavior Settings</h3>
|
1313 |
+
<table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
|
1314 |
+
<tr class="multilanguage notranslate">
|
1315 |
+
<td>Multilanguage Page option? <a href="#TB_inline?width=200&height=150&inlineId=multilanguage-page-description" title="What is the Multi-Language Page Option?" class="thickbox">Learn more</a><div id="multilanguage-page-description" style="display:none"><p>If you activate this setting, Google will translate all text into a single language when requested by your user, even if text is written in multiple languages. In most cases, this setting is not recommended, although for certain websites it might be necessary.</p></div></td>
|
1316 |
+
<td><?php $this->googlelanguagetranslator_multilanguage_cb(); ?></td>
|
1317 |
+
</tr>
|
1318 |
+
|
1319 |
+
<tr class="notranslate">
|
1320 |
+
<td>Google Analytics:</td>
|
1321 |
+
<td><?php $this->googlelanguagetranslator_analytics_cb(); ?></td>
|
1322 |
+
</tr>
|
1323 |
+
|
1324 |
+
<tr class="analytics notranslate">
|
1325 |
+
<td>Google Analytics ID (Ex. 'UA-11117410-2')</td>
|
1326 |
+
<td><?php $this->googlelanguagetranslator_analytics_id_cb(); ?></td>
|
1327 |
+
</tr>
|
1328 |
+
</table>
|
1329 |
+
</div> <!-- .postbox -->
|
1330 |
+
|
1331 |
+
<div class="postbox glt-usage-settings" style="width: 100%">
|
1332 |
+
<h3 class="notranslate">Usage</h3>
|
1333 |
+
<table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
|
1334 |
+
<tr class="notranslate">
|
1335 |
+
<td>For usage in pages/posts/sidebar:</td>
|
1336 |
+
<td><code>[google-translator]</code></td>
|
1337 |
+
</tr>
|
1338 |
+
|
1339 |
+
<tr class="notranslate">
|
1340 |
+
<td style="width:40%">For usage in header/footer/page templates:</td>
|
1341 |
+
<td style="width:60%"><code><?php echo do_shortcode('[google-translator]'); ?></code></td>
|
1342 |
+
</tr>
|
1343 |
+
|
1344 |
+
<tr class="notranslate">
|
1345 |
+
<td colspan="2">Single language usage in menus/pages/posts</td>
|
1346 |
+
</tr>
|
1347 |
+
|
1348 |
+
<tr class="notranslate">
|
1349 |
+
<td colspan="2"><code>[glt language="Spanish" label="Español" image="yes" text="yes" image_size="24"]</code></td>
|
1350 |
+
</tr>
|
1351 |
+
|
1352 |
+
<tr class="notranslate">
|
1353 |
+
<td colspan="2">
|
1354 |
+
<a href="#TB_inline?width=200&height=450&inlineId=single-language-shortcode-description" title="How to place a single language in your Wordpress menu" class="thickbox">How to place a single language in your Wordpress menu</a>
|
1355 |
+
<div id="single-language-shortcode-description" style="display:none">
|
1356 |
+
<p>For menu usage, you need to create a new menu, or use an existing menu, by navigating to "Appearance > Menus".</p>
|
1357 |
+
<p>First you will need to enable "descriptions" for your menu items, which can be found in a tab labeled "Screen Options" in the upper-right area of the page.</p>
|
1358 |
+
<p>Once descriptions are enabled, follow these steps:<br/>
|
1359 |
+
<ol>
|
1360 |
+
<li>Create a new menu item using "Link" as the menu item type.</li>
|
1361 |
+
<li>Use <code style="border:none">#</code> for the URL</li>
|
1362 |
+
<li>Enter a navigation label of your choice. This label does not appear on your website - it is meant only to help you identify the menu item.</li>
|
1363 |
+
<li>Place the following shortcode into the "description" field, and modify it to display the language and navigation label of your choice:</li>
|
1364 |
+
</ol>
|
1365 |
+
<p><code>[glt language="Spanish" label="Español"]</code></p>
|
1366 |
+
</div> <!-- .single-language-shortcode-description -->
|
1367 |
+
</td>
|
1368 |
+
</tr>
|
1369 |
+
|
1370 |
+
<tr class="notranslate">
|
1371 |
+
<td colspan="2">
|
1372 |
+
<?php
|
1373 |
+
if (isset($_POST['submit'])) {
|
1374 |
+
if (empty($_POST['submit']) && !check_admin_referer( 'glt-save-settings', 'glt-save-settings-nonce' )) {
|
1375 |
+
wp_die();
|
1376 |
+
}
|
1377 |
+
}
|
1378 |
+
wp_nonce_field('glt-save-settings, glt-save-settings-nonce', false);
|
1379 |
+
submit_button(); ?>
|
1380 |
+
</td>
|
1381 |
+
</tr>
|
1382 |
+
</table>
|
1383 |
+
</div> <!-- .postbox -->
|
1384 |
+
</div> <!-- .metbox-holder -->
|
1385 |
+
|
1386 |
+
<div class="metabox-holder" style="float:right; clear:right; width:33%">
|
1387 |
+
<div class="postbox glt-preview-settings">
|
1388 |
+
<h3 class="notranslate">Preview</h3>
|
1389 |
+
<table style="width:100%">
|
1390 |
+
<tr>
|
1391 |
+
<td style="box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; padding:15px 15px; margin:0px"><span class="notranslate"> Drag & drop flags to change their position.<br/><br/>(Note: flag order resets when flags are added/removed)</span><br/><br/><?php echo do_shortcode('[google-translator]'); ?><p class="hello"><span class="notranslate">Translated text:</span> <span>Hello</span></p>
|
1392 |
+
</td>
|
1393 |
+
</tr>
|
1394 |
+
</table>
|
1395 |
+
</div> <!-- .postbox -->
|
1396 |
+
</div> <!-- .metabox-holder -->
|
1397 |
+
|
1398 |
+
<div class="metabox-holder box-right notranslate" style="float: right; width: 33%; clear:right">
|
1399 |
+
<div class="postbox glt-advanced-settings">
|
1400 |
+
<h3>Advanced Settings</h3>
|
1401 |
+
<div class="inside">
|
1402 |
+
<table style="border-collapse:separate" width="100%" border="0" cellspacing="8" cellpadding="0" class="form-table">
|
1403 |
+
<tr class="notranslate">
|
1404 |
+
<td class="advanced">Select flag size:</td>
|
1405 |
+
<td class="advanced"><?php $this->googlelanguagetranslator_flag_size_cb(); ?></td>
|
1406 |
+
</tr>
|
1407 |
+
|
1408 |
+
<tr class="notranslate">
|
1409 |
+
<td class="advanced">Flag for English:</td>
|
1410 |
+
<td class="advanced"><?php $this->googlelanguagetranslator_english_flag_choice_cb(); ?></td>
|
1411 |
+
</tr>
|
1412 |
+
|
1413 |
+
<tr class="notranslate">
|
1414 |
+
<td class="advanced">Flag for Spanish:</td>
|
1415 |
+
<td class="advanced"><?php $this->googlelanguagetranslator_spanish_flag_choice_cb(); ?></td>
|
1416 |
+
</tr>
|
1417 |
+
|
1418 |
+
<tr class="notranslate">
|
1419 |
+
<td class="advanced">Flag for Portuguese:</td>
|
1420 |
+
<td class="advanced"><?php $this->googlelanguagetranslator_portuguese_flag_choice_cb(); ?></td>
|
1421 |
+
</tr>
|
1422 |
+
</table>
|
1423 |
+
</div> <!-- .inside -->
|
1424 |
+
</div> <!-- .postbox -->
|
1425 |
+
</div> <!-- .metabox-holder -->
|
1426 |
+
|
1427 |
+
|
1428 |
+
<div class="metabox-holder box-right notranslate" style="float: right; width: 33%;">
|
1429 |
+
<div class="postbox glt-css-settings">
|
1430 |
+
<h3>Add CSS Styles</h3>
|
1431 |
+
<div class="inside">
|
1432 |
+
<p>You can apply any necessary CSS styles below:</p>
|
1433 |
+
<?php $this->googlelanguagetranslator_css_cb(); ?>
|
1434 |
+
</div> <!-- .inside -->
|
1435 |
+
</div> <!-- .postbox -->
|
1436 |
+
</div> <!-- .metabox-holder -->
|
1437 |
+
<?php $this->googlelanguagetranslator_flags_order_cb(); ?>
|
1438 |
+
</form>
|
1439 |
+
|
1440 |
+
<div class="metabox-holder box-right notranslate" style="float: right; width: 33%;">
|
1441 |
+
<div class="postbox">
|
1442 |
+
<h3>Enable SEO features with GTranslate</h3>
|
1443 |
+
<div class="inside">
|
1444 |
+
<a class="wp-studio-logo" href="https://gtranslate.io/?xyz=3167#pricing" target="_blank"><img style="width:177px;" src="<?php echo plugins_url( 'images/gt_logo.svg' , __FILE__ ); ?>"></a><br />
|
1445 |
+
<ul id="features" style="margin-left:15px">
|
1446 |
+
<li style="list-style:square outside"><?php _e('Search engine indexing', 'gtranslate'); ?></li>
|
1447 |
+
<li style="list-style:square outside"><?php _e('Search engine friendly (SEF) URLs', 'gtranslate'); ?></li>
|
1448 |
+
<li style="list-style:square outside"><?php _e('Human level neural translations', 'gtranslate'); ?></li>
|
1449 |
+
<li style="list-style:square outside"><?php _e('Edit translations manually', 'gtranslate'); ?></li>
|
1450 |
+
<li style="list-style:square outside"><?php _e('Meta data translation (keywords, page description, etc...)', 'gtranslate'); ?></li>
|
1451 |
+
<li style="list-style:square outside"><?php _e('URL/slug translation', 'gtranslate'); ?></li>
|
1452 |
+
<li style="list-style:square outside"><?php _e('Language hosting (custom domain like example.fr, example.es)', 'gtranslate'); ?></li>
|
1453 |
+
<li style="list-style:square outside"><?php _e('Seamless updates', 'gtranslate'); ?></li>
|
1454 |
+
<li style="list-style:square outside"><?php _e('Increased international traffic and AdSense revenue', 'gtranslate'); ?></li>
|
1455 |
+
<li style="list-style:square outside"><?php _e('Works in China', 'gtranslate'); ?></li>
|
1456 |
+
<li style="list-style:square outside"><?php _e('Priority Live Chat support', 'gtranslate'); ?></li>
|
1457 |
+
</ul>
|
1458 |
+
|
1459 |
+
<p><?php _e('Prices starting from <b>$5.99/month</b>!', 'gtranslate'); ?></p>
|
1460 |
+
|
1461 |
+
<a href="https://gtranslate.io/?xyz=3167#pricing" target="_blank" class="button-primary"><?php _e('Try Now (15 days free)', 'gtranslate'); ?></a> <a href="https://gtranslate.io/?xyz=3167#faq" target="_blank" class="button-primary"><?php _e('FAQ', 'gtranslate'); ?></a> <a href="https://gtranslate.io/?xyz=3167#contact" target="_blank" class="button-primary"><?php _e('Live Chat', 'gtranslate'); ?></a>
|
1462 |
+
</div> <!-- .inside -->
|
1463 |
+
</div> <!-- .postbox -->
|
1464 |
+
</div> <!-- .metabox-holder -->
|
1465 |
+
</div> <!-- .wrap -->
|
1466 |
+
<?php
|
1467 |
+
}
|
1468 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1469 |
Â
$google_language_translator = new google_language_translator();
|
readme.txt
CHANGED
@@ -1,434 +1,438 @@
|
|
1 |
-
=== Google Language Translator ===
|
2 |
-
Contributors:
|
3 |
-
Donate link:
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
-
|
61 |
-
|
62 |
-
5.0.
|
63 |
-
- Added new setting:
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
-
|
103 |
-
|
104 |
-
5.0.
|
105 |
-
- Fixed
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
-
|
110 |
-
|
111 |
-
|
112 |
-
-
|
113 |
-
|
114 |
-
|
115 |
-
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
-
|
123 |
-
|
124 |
-
5.0.
|
125 |
-
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
-
|
130 |
-
|
131 |
-
5.0.
|
132 |
-
-
|
133 |
-
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
-
|
147 |
-
-
|
148 |
-
|
149 |
-
5.0.
|
150 |
-
- Added
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
- Added
|
161 |
-
|
162 |
-
5.0.
|
163 |
-
- Added
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
- Fixed
|
200 |
-
|
201 |
-
5.0.
|
202 |
-
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
-
|
221 |
-
-
|
222 |
-
|
223 |
-
4.0.
|
224 |
-
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
- Fixed the
|
229 |
-
|
230 |
-
4.0.
|
231 |
-
|
232 |
-
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
-
|
237 |
-
-
|
238 |
-
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
-
|
256 |
-
|
257 |
-
4.0.
|
258 |
-
|
259 |
-
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
- Fixed
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
- Added
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
-
|
287 |
-
-
|
288 |
-
-
|
289 |
-
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
-
|
294 |
-
|
295 |
-
3.0.
|
296 |
-
|
297 |
-
-
|
298 |
-
|
299 |
-
3.0.
|
300 |
-
|
301 |
-
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
-
|
320 |
-
|
321 |
-
3.0.
|
322 |
-
|
323 |
-
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
- Added
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
-
|
353 |
-
|
354 |
-
-
|
355 |
-
|
356 |
-
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
-
|
361 |
-
|
362 |
-
2.
|
363 |
-
|
364 |
-
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
-
|
371 |
-
|
372 |
-
2.
|
373 |
-
|
374 |
-
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
- Added
|
379 |
-
|
380 |
-
- Added the "
|
381 |
-
|
382 |
-
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
- Added
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
- Added
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
-
|
407 |
-
|
408 |
-
- Added
|
409 |
-
|
410 |
-
-
|
411 |
-
|
412 |
-
- Added
|
413 |
-
|
414 |
-
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
1.
|
421 |
-
|
422 |
-
1.
|
423 |
-
|
424 |
-
1.
|
425 |
-
|
426 |
-
1.
|
427 |
-
|
428 |
-
1.
|
429 |
-
|
430 |
-
1.
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
1.
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
=== Google Language Translator ===
|
2 |
+
Contributors: edo888
|
3 |
+
Donate link: https://gtranslate.io/?xyz=998#pricing
|
4 |
+
Author: Translate AI Multilingual Solutions
|
5 |
+
Author URI: https://gtranslate.io/?xyz=998
|
6 |
+
Tags: translate wordpress, translate, translator, translation, language, multi language
|
7 |
+
Requires at least: 2.9
|
8 |
+
Tested up to: 5.2.2
|
9 |
+
Stable tag: 5.0.49
|
10 |
+
|
11 |
+
Google Language Translator plugin allows you to insert Google Translate widget anywhere on your website using shortcode.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
Settings include: inline or vertical layout, show/hide specific languages, hide/show Google toolbar, and hide/show Google branding. Add the shortcode to pages, posts, and widgets.
|
16 |
+
|
17 |
+
== Installation ==
|
18 |
+
|
19 |
+
1. Download the zip folder named google-language-translator.zip
|
20 |
+
2. Unzip the folder and put it in the plugins directory of your wordpress installation. (wp-content/plugins).
|
21 |
+
3. Activate the plugin through the plugin window in the admin panel.
|
22 |
+
4. Go to Settings > Google Language Translator, enable the plugin, and then choose your settings.
|
23 |
+
5. Copy the shortcode and paste it into a page, post or widget.
|
24 |
+
6. Do not use the shortcode twice on a single page - it will not work.
|
25 |
+
|
26 |
+
== Frequently Asked Questions ==
|
27 |
+
|
28 |
+
Q: What should I do if the translate widget does not show on my website?
|
29 |
+
|
30 |
+
1. Make sure that the plugin is installed and activated.
|
31 |
+
2. Verify that a check mark is placed in the activation setting located at "Settings > Google Language Translator".
|
32 |
+
3. Verify that the native Wordpress function, wp_footer(), is included in your theme's footer file.
|
33 |
+
4. Verify that "Show Language Box?" setting is enabled at "Settings > Google Language Translator".
|
34 |
+
5. Use your browser's web tools to ensure that CSS styles are not hiding the translation widget.
|
35 |
+
6. Contact support at http://www.wp-studio.net/submit-ticket.
|
36 |
+
|
37 |
+
Q: What should I do if there are no languages being displayed in the language box?
|
38 |
+
|
39 |
+
1. Make sure that the plugin is installed and activated.
|
40 |
+
2. Verify that a check mark is placed in the activation setting located at "Settings > Google Language Translator".
|
41 |
+
3. Verify that Adobe Flash is installed in your web browser. Google uses Flash in order to display their language box.
|
42 |
+
4. Contact support at http://www.wp-studio.net/submit-ticket.
|
43 |
+
|
44 |
+
Q: Can I exclude certain areas of my website from being translated?
|
45 |
+
|
46 |
+
A: Yes! Add the "notranslate" class to the HTML element containing your text. For example, the following text will be excluded from translation: <span class="notranslate">Hello World!</span>
|
47 |
+
|
48 |
+
== Changelog ==
|
49 |
+
|
50 |
+
5.0.49
|
51 |
+
- Added new contributor to the plugin's readme.txt.
|
52 |
+
|
53 |
+
5.0.48
|
54 |
+
- Added new setting: Floating Widget Text Color.
|
55 |
+
|
56 |
+
5.0.47
|
57 |
+
- Fixed an undefined index error in google-language-translator.php.
|
58 |
+
|
59 |
+
5.0.46
|
60 |
+
- Added new setting: Language Switcher Background Color.
|
61 |
+
|
62 |
+
5.0.45
|
63 |
+
- Added new setting: Floating Widget background color.
|
64 |
+
- Removed border-radius from the floating widget for a more standard look and feel. Please email me if you need the CSS to add back rounded edges.
|
65 |
+
|
66 |
+
5.0.44
|
67 |
+
- Added new setting: Language Switcher Text Color.
|
68 |
+
|
69 |
+
5.0.43
|
70 |
+
- Added new setting: Floating Widget position.
|
71 |
+
|
72 |
+
5.0.42
|
73 |
+
- Added new setting: langauge switcher width.
|
74 |
+
- Removed most javascript away from the document body, and into an external javascript file, scripts.js.
|
75 |
+
- Added plugin version information to be appended to script and stylesheet files.
|
76 |
+
|
77 |
+
5.0.41
|
78 |
+
- Re-factored code in google-language-translator.php to remove the duplicate id "flags".
|
79 |
+
|
80 |
+
5.0.40
|
81 |
+
- Fixed a minor 'undefined index' error in google-language-translator.php
|
82 |
+
|
83 |
+
5.0.39
|
84 |
+
- Fixed a CSS issue associated with the settings panel changes from the previous update.
|
85 |
+
|
86 |
+
5.0.38
|
87 |
+
- Fixed a CSS issue associated with the settings panel changes from the previous update. Flags were not aligning properly with align left/right settings.
|
88 |
+
|
89 |
+
5.0.37
|
90 |
+
- Made some additional adjustments in code for the settings page.
|
91 |
+
|
92 |
+
5.0.36
|
93 |
+
- Removed undefined variable PHP errors.
|
94 |
+
|
95 |
+
5.0.35
|
96 |
+
- Updated the plugin to delete an unused option from the database, used in the settings panel.
|
97 |
+
|
98 |
+
5.0.34
|
99 |
+
- Updated the settings panel to function more logically. Now users choose the languages they want, and can turn on/off flags associated with those langauges.
|
100 |
+
|
101 |
+
5.0.33
|
102 |
+
- Removed a deprecated jQuery function, and replaced with updated code in the footer_script() function.
|
103 |
+
|
104 |
+
5.0.32
|
105 |
+
- Fixed the issue with menu translation not working on some mobile devices.
|
106 |
+
- Moved element.js script to the footer.
|
107 |
+
|
108 |
+
5.0.31
|
109 |
+
- Fixed an issue with menu shortcode not displaying the correct flag choice (i.e. for English/Spanish/Portuguese flags).
|
110 |
+
|
111 |
+
5.0.30
|
112 |
+
- Organized the settings page into sections.
|
113 |
+
- Upgraded Wordpress.org plugin banner.
|
114 |
+
- Added additional attributes to single language shortcodes. Users now have ability to display flag images, change flag sizes, or show/hide the text label.
|
115 |
+
- Changed Chinese (Traditional) language flag to the Flag of Taiwan.
|
116 |
+
- Fixed a minor display issue with the Google Analytics setting in Wordpress Dashboard.
|
117 |
+
|
118 |
+
5.0.29
|
119 |
+
- Fixed CSS display issues with the floating widget.
|
120 |
+
|
121 |
+
5.0.28
|
122 |
+
- Fixed CSS display issues with the floating widget.
|
123 |
+
|
124 |
+
5.0.27
|
125 |
+
- Removed toolbar.js and flags.js and combined to existing files (to improve efficiency of page load and http requests).
|
126 |
+
- Added new setting to allow or prevent floating widget text to translate.
|
127 |
+
|
128 |
+
5.0.26
|
129 |
+
- Fixed a small error in adding the setting for Floating Widget text.
|
130 |
+
|
131 |
+
5.0.25
|
132 |
+
- Added new setting for custom text in the Floating Widget.
|
133 |
+
- Removed "notranslate" class from the Floating Widget text to allow for translation.
|
134 |
+
|
135 |
+
5.0.24
|
136 |
+
- Improved functionality for flags. Users are now returned to original language when the flag is displayed. The Google Toolbar will be hidden once returning back to the original language. The Google Toolbar will appear again when another translation is made.
|
137 |
+
- Fixed the issue with flags not functioning with SIMPLE layout.
|
138 |
+
- Removed SIMPLE layout option (which was not working properly) for browsers not using English browsers. The coding challenge for implementing this option is difficult and must be postponed until we find a practical solution.
|
139 |
+
|
140 |
+
5.0.23
|
141 |
+
- Reverted back to an older version of flags.js. We still have some bugs to work out before releasing the updated version. We apologize for the inconvenience.
|
142 |
+
|
143 |
+
5.0.22
|
144 |
+
- Changed a line of text on the settings page.
|
145 |
+
- Removed a line of redundant javascript to reduce unnecessary page load.
|
146 |
+
- Fixed an HTML attribute issue displaying in the menu shortcode.
|
147 |
+
- Improved functionality for flags. The flag for default language will now be disabled once users click it's flag. Flag will be re-enabled once user makes another translation.
|
148 |
+
|
149 |
+
5.0.21
|
150 |
+
- Added 6 new languages with their associated flags: Hawaiian, Kurdish, Kyrgyz, Luxembourgish, Pashto, and Shona. You can now use these langauges using the menu shortcode, as well.
|
151 |
+
- Added a "Select All / Clear All" feature to the settings page. No more finger cramps!
|
152 |
+
|
153 |
+
5.0.20
|
154 |
+
- Added Corsican as a new language with its associated flag.
|
155 |
+
|
156 |
+
5.0.19
|
157 |
+
- Added Frisian as a new language with its associated flag.
|
158 |
+
|
159 |
+
5.0.18
|
160 |
+
- Added Sindhi as a new language with its associated flag.
|
161 |
+
|
162 |
+
5.0.17
|
163 |
+
- Added Samoan as a new language with its associated flag.
|
164 |
+
- Added mobile-responsive CSS to the GLT settings page.
|
165 |
+
|
166 |
+
5.0.16
|
167 |
+
- Added Xhosa as a new language with its associated flag.
|
168 |
+
|
169 |
+
5.0.15
|
170 |
+
- Added Amharic as a new language with its associated flag.
|
171 |
+
|
172 |
+
5.0.14
|
173 |
+
- Fixed a file naming error in google-language-translator.php. This caused flags not to display - we apologize for the inconvenience.
|
174 |
+
|
175 |
+
5.0.13
|
176 |
+
- Renamed some of the wp_enqueue_script calls to include more unique file names, thus avoiding conflict with other plugins overriding these files.
|
177 |
+
- Corrected some file paths to be more accurate/secure.
|
178 |
+
- Removed WP Helpdesk logo from the settings page. We are no longer offering these services officially.
|
179 |
+
|
180 |
+
5.0.12
|
181 |
+
- Revert malicious changes made in 5.0.10
|
182 |
+
|
183 |
+
5.0.11
|
184 |
+
- Fixed incorrect link
|
185 |
+
|
186 |
+
5.0.10
|
187 |
+
- Tested up to 4.6
|
188 |
+
|
189 |
+
5.0.09
|
190 |
+
- Turned off error reporting. I apologize for the inconvenience.
|
191 |
+
|
192 |
+
5.0.08
|
193 |
+
- Added a new popup-style layout". You can find this new layout in the settings page located in "Settings > Google Language Translator".
|
194 |
+
|
195 |
+
5.0.07
|
196 |
+
- Changed the flag for Chinese(Traditional) to the Taiwanese flag. Requested long ago by a few users - thanks for your months of patience!
|
197 |
+
|
198 |
+
5.0.06
|
199 |
+
- Fixed a XSS Cross Scripting Vulnerability in the plugin, as requested by Wordpress.org. Unnecessary code (during testing) was being posted to the settings page, so the code was removed.
|
200 |
+
|
201 |
+
5.0.05
|
202 |
+
- Added 3 new options to the settings page: English, Spanish, and Portuguese flag image variations.
|
203 |
+
- Fixed an error with the Floating Widget: order of flags was not being honored in certain cases.
|
204 |
+
|
205 |
+
5.0.04
|
206 |
+
- Corrected the text on the settings page to reflect 91 total flags, instead of 81 flags.
|
207 |
+
|
208 |
+
5.0.03
|
209 |
+
- Added 10 new languages and associated flags: Chichewa, Kazakh, Malagasy, Malayalam, Myanmar(Burmese), Sesotho, Sinhala, Sundanese, Tajik, and Uzbek.
|
210 |
+
|
211 |
+
5.0.02
|
212 |
+
- Updated the Tamil flag to use the Indian flag, instead of Tamil Tigers flag.
|
213 |
+
|
214 |
+
5.0.01
|
215 |
+
- Updated style.css to reflect the syntax error connecting to the Chinese flag.
|
216 |
+
|
217 |
+
5.0.0
|
218 |
+
- Wordpress security updates added to the settings page [wp_nonce_field()].
|
219 |
+
- Removed 3 outside Javascript files - these files are now called upon directly from Wordpress CMS.
|
220 |
+
- Unpacked flags.js p,a,c,k,e,r code. Unknowingly, this method of coding violated Wordpress plugin policy.
|
221 |
+
- Updated pricing display for GLT Premium. It was displaying $15 previously, but the price had increased since the last update.
|
222 |
+
|
223 |
+
4.0.9
|
224 |
+
- Replaced: incorrect Catalonian flag image, with the correct image. I apologize for any inconvenience.
|
225 |
+
- Fixed: Floating Widget issue - previously it loaded 2 times when shortcode was added, which caused it not to work.
|
226 |
+
|
227 |
+
4.0.8
|
228 |
+
- Fixed the small syntax issue related to the Google Analytics tracking number - it was another cause of the language box not displaying.
|
229 |
+
|
230 |
+
4.0.7
|
231 |
+
- Fixed a CSS error in the settings panel display.
|
232 |
+
- Fixed the coding issue when "Specific Languages" option is chosen - the shortcode was not displaying the language dropdown.
|
233 |
+
|
234 |
+
4.0.6
|
235 |
+
|
236 |
+
- Removed: "onclick" events from diplaying directly inside HTML. Converted those events to jQuery.
|
237 |
+
- Fixed the shortcode that allows adding single languages to Wordpress menus. (New example is shown on settings page.)
|
238 |
+
- Consolidated all flag images into image sprites!
|
239 |
+
- Re-designed 10 flag images to match the quality of the other flags.
|
240 |
+
- Fixed the incorrect "alt" tags associated with flag images. The "alt" tag now displays the language name.
|
241 |
+
- Modified text on the settings page - also added some lightbox pop-ups to help explain settings.
|
242 |
+
- New updates have also been provided for our Premium version (currently version 4.0.1) located at http://www.wp-studio.net/
|
243 |
+
|
244 |
+
4.0.5
|
245 |
+
|
246 |
+
- Fixed: Display bug when using single language shortcode.
|
247 |
+
- Added: New link on the Plugins menu page, which links directly to Google Language Translator settings.
|
248 |
+
|
249 |
+
|
250 |
+
4.0.4
|
251 |
+
|
252 |
+
- Added NEW shortcode! Allows placement of single languages into the navigation menu, pages, and posts. See settings panel for usage details.
|
253 |
+
- Re-factored code in googlelanguagetranslator.php which reduced code to around 950 lines.
|
254 |
+
- Removed the "de-activation" hook, which previously deleted options when plugin de-activated. Added "uninstall" hook instead, so that settings will be preserved only when user deletes the plugin completely.
|
255 |
+
- Updated CSS styles for the flags area to prevent themes from overriding layouts.
|
256 |
+
|
257 |
+
4.0.3
|
258 |
+
|
259 |
+
- Adjusted CSS styles for the flag display.
|
260 |
+
|
261 |
+
4.0.2
|
262 |
+
|
263 |
+
- Eliminated all (or most) HTML validation errors. Big improvement!
|
264 |
+
- Re-factored more code to increase efficiency.
|
265 |
+
- Added de-activation hook to reset all plugin settings when plugin is de-activated. (CSS Overrides and Google Analytics ID setting will remain in place and won't be deleted.)
|
266 |
+
- Fixed the issue with flag language checkboxes. Users can remove English flag if so desired. Previously, English flag was alway required to stay checked, which was not most user-friendly.
|
267 |
+
|
268 |
+
4.0.1
|
269 |
+
|
270 |
+
- Fixed PHP errors that were neglected in upgrade to 4.0.
|
271 |
+
- Added conditionals to prevent scripts from loading when the floating widget is turned off.
|
272 |
+
|
273 |
+
4.0
|
274 |
+
|
275 |
+
- Added 2 new features: 1) Drag/drop flags to re-arrange their order, and 2) Custom flag sizes (16px to 24px).
|
276 |
+
- Re-factored code in google-language-translator.php. Languages are now loaded dynamically and are not hard-coded.
|
277 |
+
- GLT Premium is now released: Updates include multiple flags for English, Spanish, and Portuguese languages; customized URLs with 'lang' attribute; drag/drop flags to re-arrnage their order
|
278 |
+
|
279 |
+
3.0.9
|
280 |
+
|
281 |
+
- Added a title field to the Google Language Translator widget.
|
282 |
+
- Removed "unexpected text characters" error upon activation (due to error in activation hook).
|
283 |
+
|
284 |
+
3.0.8
|
285 |
+
|
286 |
+
- Added 9 new languages into the plugin (Hausa, Igbo, Maori, Mongolian, Nepali, Punjabi, Somali, Yoruba, Zulu).
|
287 |
+
- Corrected an "undefined variable" error that was being generated in Vertical and Horizontal layouts.
|
288 |
+
- Re-structured coding once again into an Object-Oriented approach.
|
289 |
+
- Moved all functions of the base class into 'googlelanguagetranslator.php' and the widget into 'widget.php'.
|
290 |
+
- Moved all javascript files into it's own JS folder.
|
291 |
+
- Fixed an display issue with "Edit Translations" - they were being hidden when "No branding" option was chosen.
|
292 |
+
- Corrected various "comma" errors in the string that outputs the script for loading the translator.
|
293 |
+
- Changed Changelog in readme.txt to show most recent changes first, instead of last.
|
294 |
+
|
295 |
+
3.0.7
|
296 |
+
|
297 |
+
- Removed an unnecessary CSS file, left over from development. Sorry for any inconvenience if you received display errors.
|
298 |
+
|
299 |
+
3.0.6
|
300 |
+
|
301 |
+
- Corrected a small display error in displaying the floating widget correctly.
|
302 |
+
|
303 |
+
3.0.5
|
304 |
+
|
305 |
+
- 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.
|
306 |
+
- Fixed the issue with Dashboard styles loading on the wrong pages. This was causing some annoying display issues on the Wordpress Dashboard.
|
307 |
+
|
308 |
+
3.0.4
|
309 |
+
|
310 |
+
- Re-factored/re-arranged more code in google languagetransltor.php by placing them into separate files.
|
311 |
+
- 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.
|
312 |
+
- Removed style2.php file, which is unnecessary and was being used in testing.
|
313 |
+
|
314 |
+
3.0.3
|
315 |
+
|
316 |
+
- Re-factored/re-arranged some of the code in googlelanguagetranslator.php by placing them into separate files.
|
317 |
+
- Fixed a minor coding issue in glt_widget.php - this was generating an error in Wordpress when debugging.
|
318 |
+
- Moved all CSS code into a single file. The result is nice, clean inline CSS code that is now called only once.
|
319 |
+
- Fixed some additional CSS display issues.
|
320 |
+
|
321 |
+
3.0.2
|
322 |
+
|
323 |
+
- Adjusted additional minor invalid HTML issues on the settings page, and also in the front-end plugin display.
|
324 |
+
|
325 |
+
3.0.1
|
326 |
+
|
327 |
+
- Changed the url request to Google to allow both unsecured and secured page translations. Previously, some users experienced errors when trying to use the translator on "https://" (secured) pages.
|
328 |
+
- Adjusted some minor spacing issues in the settings page HTML (caused some annoying red HTML errors when using "View Source" in right-click menu).
|
329 |
+
- Removed old CSS styles that were added in the previous 3.0 update - the styles were added when Google servers were being updated, and were producing major translation dislay issues until their update was complete. Now the styles I added are no longer needed.
|
330 |
+
|
331 |
+
3.0
|
332 |
+
|
333 |
+
- Correct a small CSS error that affected the showing/hiding of the Google toolbar.
|
334 |
+
|
335 |
+
2.9
|
336 |
+
|
337 |
+
***IMPORTANT: Google's most recent server update is producing display issues for website translation tool. There are major display issues with the translation toolbar and also the translations editing interface. Version 2.9 temporarily hides the edit translation functionality until Google decides to fix this issue, although you can still edit translations directly through your Google account at translate.google.com. Please direct any support requests through Wordpress.org and we will be happy to assist you.
|
338 |
+
|
339 |
+
- Fixed Google Translation toolbar display issue
|
340 |
+
- Fixed the Edit Translation interface by hiding it temporarily until Google fixes this
|
341 |
+
- Removed some unneeded styles from the style sheet.
|
342 |
+
- Fixed some CSS issues for the Google Branding display, which was affected by Google's most recent update
|
343 |
+
|
344 |
+
2.8
|
345 |
+
|
346 |
+
- Added an option to allow users to manage their own translations directly through their Google Translate account (free). When activated, users can hover over the text of their website, and edit the translations from the webpage directly. Google will remember these translations, and then serve them to users once the edits are made. Users must install the Google Translate Customization meta tag provided through Google Translate here: translate.google.com/manager/website/settings. To obtain this meta tag, users need to configure the Google Translate tool directly from this website (although they will not use this because the plugin provides it), then the user can obtain the meta tag on the "Get Code" screen, which is displayed after configuring the Google Translate tool on this webpage.
|
347 |
+
- Added an option to allow users to turn on/off Google's multilanguagePage option, that when activated, the original website content will be a forced translation, instead of original content (but only after a translation is made.)
|
348 |
+
- Added more flexible styles to the settings page, so that left and right panels display nicely to the user.
|
349 |
+
|
350 |
+
2.7
|
351 |
+
|
352 |
+
- Added Google Analytics tracking capability to the plugin.
|
353 |
+
|
354 |
+
- Added a "CSS Styles" box in the settings panel.
|
355 |
+
|
356 |
+
- Changed the Catalonian flag to its correct flag image.
|
357 |
+
|
358 |
+
- Fixed coding issues that previously updated options incorrectly, which is why many users experienced display issues. All options are now initialized upon plugin activation, which should fix this issue permanently.
|
359 |
+
|
360 |
+
- Fixed a glitch in our usage of the translate API. Previously, when the user clicked the default language, it would toggle back and forth between the default language and "Afrikaans" language. Now, users will see the correct language displayed at all times, no matter how many times it is clicked.
|
361 |
+
|
362 |
+
2.6
|
363 |
+
|
364 |
+
- Added defaults to all options to ensure there are no more issues with the translator displaying upon installation. Again, sorry for any inconvenience.
|
365 |
+
|
366 |
+
2.5
|
367 |
+
|
368 |
+
- Eliminated an internal Wordpress error being generated from a coding mistake.
|
369 |
+
|
370 |
+
- Added a default option for the Translator alingment. Previously, this was causing the plugin to disapppear.
|
371 |
+
|
372 |
+
2.4
|
373 |
+
|
374 |
+
- Found a couple of small display errors in the settings page after uploading version 2.3. Sorry for any inconvenience!
|
375 |
+
|
376 |
+
2.3
|
377 |
+
|
378 |
+
- Added a "Preview" area on the settings page that allows you to see your settings in action.
|
379 |
+
|
380 |
+
- Added custom flag support for all languages (custom flags available ONLY when selecting the "ALL Languages" setting.
|
381 |
+
|
382 |
+
- Added an option that allows left/right alignment of the translation tool.
|
383 |
+
|
384 |
+
- Added the "Google Language Translator" widget.
|
385 |
+
|
386 |
+
- Updated googlelanguagetranslator.php to properly register setting in the admin settings panel.
|
387 |
+
|
388 |
+
2.2
|
389 |
+
|
390 |
+
- Added language "Portuguese" and "German" to the Original Language drop-down option on the settings page.
|
391 |
+
|
392 |
+
- Changed flag image for the English language (changed United States flag to the United Kingdom flag).
|
393 |
+
|
394 |
+
- Added link in the settings panel that points to Google's Attribution Policy.
|
395 |
+
|
396 |
+
2.1
|
397 |
+
|
398 |
+
- Added language "Dutch" to the Original Language drop-down option on the settings page.
|
399 |
+
|
400 |
+
- Added a new CSS class that more accurately hides the "Powered by" text when hiding Google's branding. In previous version, the "Powered by" text was actually disguised by setting it's color to "transparent", but now we have set it's font-size to 0px instead.
|
401 |
+
|
402 |
+
2.0 Corrected some immediate errors in the 1.9 update.
|
403 |
+
|
404 |
+
1.9
|
405 |
+
|
406 |
+
- Added 7 flag image choices that, when clicked by website visitors, will change the language displayed, both on the website, AND in the drop-down box (flag language choices are limited to those provided in this plugin).
|
407 |
+
|
408 |
+
- Added 6 additional languages to the translator, as provided in Google's most recent updates ( new languages include Bosnian, Cebuano, Khmer, Marathi, Hmong, Javanese ).
|
409 |
+
|
410 |
+
- Corrected a minor technical issue where the Czech option (on the backend) was incorrectly displaying the Croatian language on the front end.
|
411 |
+
|
412 |
+
- Added jQuery functionality to the settings panel to improve the user experience.
|
413 |
+
|
414 |
+
- Added an option for users to display/hide the flag images.
|
415 |
+
|
416 |
+
- Added an option for users to display/hide the translate box when flags are displayed.
|
417 |
+
|
418 |
+
- Removed the settings.css file - I found a better way of displaying the options without CSS.
|
419 |
+
|
420 |
+
1.8 Modified google-language-translator.php to display the correct output to the browser when horizontal layout is selected. Previously, it was not displaying at all.
|
421 |
+
|
422 |
+
1.7 Modified google-language-translator.php so that jQuery and CSS styles were enqueued properly onto the settings page only. Previously, jQuery functionality and CSS styles were being added to all pages of the Wordpresss Dashboard, which was causing functionality and display issues for some users.
|
423 |
+
|
424 |
+
1.6 Added "Specific Language" support to the plugin settings, which allows the user to choose specific languages that are displayed to website visitors.
|
425 |
+
|
426 |
+
1.5 Added "Original Language" support to the plugin settings, which allows the user to choose the original language of their website, which ultimately removes the original language as a choice in the language drop-down presented to website visitors.
|
427 |
+
|
428 |
+
1.4 Corrected display problems associated with CSS styles not being placed correctly in wp_head.
|
429 |
+
|
430 |
+
1.3 HTML display problem in the sidebar area now fixed. Previously, inserting the [google-translator] plugin into a text widget caused it to display above the widget, instead of inside of it.
|
431 |
+
|
432 |
+
1.2 Shortcode support is now available for adding [google-translator] to text widgets. I apologize for any inconvenience this may have caused.
|
433 |
+
|
434 |
+
1.1 The shortcode supplied on the settings page was updated to display '[google-translator]'.
|
435 |
+
|
436 |
+
== Screenshots ==
|
437 |
+
|
438 |
+
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.
|