Version Description
- New Globe widget look added
- Plugin localization added
- Language list reordering added
Download this release
Release Info
Developer | edo888 |
Plugin | Translate WordPress with GTranslate |
Version | 2.8.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.21 to 2.8.1
- 24/Morocco.png +0 -0
- 24/af.png +0 -0
- 24/am.png +0 -0
- 24/ar.png +0 -0
- 24/az.png +0 -0
- 24/be.png +0 -0
- 24/bg.png +0 -0
- 24/bn.png +0 -0
- 24/bs.png +0 -0
- 24/ca.png +0 -0
- 24/ceb.png +0 -0
- 24/co.png +0 -0
- 24/cs.png +0 -0
- 24/cy.png +0 -0
- 24/da.png +0 -0
- 24/de.png +0 -0
- 24/el.png +0 -0
- 24/en-us.png +0 -0
- 24/en.png +0 -0
- 24/eo.png +0 -0
- 24/es-mx.png +0 -0
- 24/es.png +0 -0
- 24/et.png +0 -0
- 24/eu.png +0 -0
- 24/fa.png +0 -0
- 24/fi.png +0 -0
- 24/fr.png +0 -0
- 24/fy.png +0 -0
- 24/ga.png +0 -0
- 24/gd.png +0 -0
- 24/gl.png +0 -0
- 24/gu.png +0 -0
- 24/ha.png +0 -0
- 24/haw.png +0 -0
- 24/hi.png +0 -0
- 24/hmn.png +0 -0
- 24/hr.png +0 -0
- 24/ht.png +0 -0
- 24/hu.png +0 -0
- 24/hy.png +0 -0
- 24/id.png +0 -0
- 24/ig.png +0 -0
- 24/is.png +0 -0
- 24/it.png +0 -0
- 24/iw.png +0 -0
- 24/ja.png +0 -0
- 24/jw.png +0 -0
- 24/ka.png +0 -0
- 24/kk.png +0 -0
- 24/km.png +0 -0
- 24/kn.png +0 -0
- 24/ko.png +0 -0
- 24/ku.png +0 -0
- 24/ky.png +0 -0
- 24/la.png +0 -0
- 24/lb.png +0 -0
- 24/lo.png +0 -0
- 24/lt.png +0 -0
- 24/lv.png +0 -0
- 24/mg.png +0 -0
- 24/mi.png +0 -0
- 24/mk.png +0 -0
- 24/ml.png +0 -0
- 24/mn.png +0 -0
- 24/mr.png +0 -0
- 24/ms.png +0 -0
- 24/mt.png +0 -0
- 24/my.png +0 -0
- 24/ne.png +0 -0
- 24/nl.png +0 -0
- 24/no.png +0 -0
- 24/ny.png +0 -0
- 24/pa.png +0 -0
- 24/pl.png +0 -0
- 24/ps.png +0 -0
- 24/pt-br.png +0 -0
- 24/pt.png +0 -0
- 24/ro.png +0 -0
- 24/ru.png +0 -0
- 24/sd.png +0 -0
- 24/si.png +0 -0
- 24/sk.png +0 -0
- 24/sl.png +0 -0
- 24/sm.png +0 -0
- 24/sn.png +0 -0
- 24/so.png +0 -0
- 24/sq.png +0 -0
- 24/sr.png +0 -0
- 24/st.png +0 -0
- 24/su.png +0 -0
- 24/sv.png +0 -0
- 24/sw.png +0 -0
- 24/ta.png +0 -0
- 24/te.png +0 -0
- 24/tg.png +0 -0
- 24/th.png +0 -0
- 24/tl.png +0 -0
- 24/tr.png +0 -0
- 24/uk.png +0 -0
- 24/ur.png +0 -0
- 24/uz.png +0 -0
- 24/vi.png +0 -0
- 24/xh.png +0 -0
- 24/yi.png +0 -0
- 24/yo.png +0 -0
- 24/zh-CN.png +0 -0
- 24/zh-TW.png +0 -0
- 24/zu.png +0 -0
- gtglobe.svg +7 -0
- gtranslate.php +652 -638
- readme.txt +29 -10
24/Morocco.png
ADDED
Binary file
|
24/af.png
ADDED
Binary file
|
24/am.png
ADDED
Binary file
|
24/ar.png
ADDED
Binary file
|
24/az.png
ADDED
Binary file
|
24/be.png
ADDED
Binary file
|
24/bg.png
ADDED
Binary file
|
24/bn.png
ADDED
Binary file
|
24/bs.png
ADDED
Binary file
|
24/ca.png
ADDED
Binary file
|
24/ceb.png
ADDED
Binary file
|
24/co.png
ADDED
Binary file
|
24/cs.png
ADDED
Binary file
|
24/cy.png
ADDED
Binary file
|
24/da.png
ADDED
Binary file
|
24/de.png
ADDED
Binary file
|
24/el.png
ADDED
Binary file
|
24/en-us.png
ADDED
Binary file
|
24/en.png
ADDED
Binary file
|
24/eo.png
ADDED
Binary file
|
24/es-mx.png
ADDED
Binary file
|
24/es.png
ADDED
Binary file
|
24/et.png
ADDED
Binary file
|
24/eu.png
ADDED
Binary file
|
24/fa.png
ADDED
Binary file
|
24/fi.png
ADDED
Binary file
|
24/fr.png
ADDED
Binary file
|
24/fy.png
ADDED
Binary file
|
24/ga.png
ADDED
Binary file
|
24/gd.png
ADDED
Binary file
|
24/gl.png
ADDED
Binary file
|
24/gu.png
ADDED
Binary file
|
24/ha.png
ADDED
Binary file
|
24/haw.png
ADDED
Binary file
|
24/hi.png
ADDED
Binary file
|
24/hmn.png
ADDED
Binary file
|
24/hr.png
ADDED
Binary file
|
24/ht.png
ADDED
Binary file
|
24/hu.png
ADDED
Binary file
|
24/hy.png
ADDED
Binary file
|
24/id.png
ADDED
Binary file
|
24/ig.png
ADDED
Binary file
|
24/is.png
ADDED
Binary file
|
24/it.png
ADDED
Binary file
|
24/iw.png
ADDED
Binary file
|
24/ja.png
ADDED
Binary file
|
24/jw.png
ADDED
Binary file
|
24/ka.png
ADDED
Binary file
|
24/kk.png
ADDED
Binary file
|
24/km.png
ADDED
Binary file
|
24/kn.png
ADDED
Binary file
|
24/ko.png
ADDED
Binary file
|
24/ku.png
ADDED
Binary file
|
24/ky.png
ADDED
Binary file
|
24/la.png
ADDED
Binary file
|
24/lb.png
ADDED
Binary file
|
24/lo.png
ADDED
Binary file
|
24/lt.png
ADDED
Binary file
|
24/lv.png
ADDED
Binary file
|
24/mg.png
ADDED
Binary file
|
24/mi.png
ADDED
Binary file
|
24/mk.png
ADDED
Binary file
|
24/ml.png
ADDED
Binary file
|
24/mn.png
ADDED
Binary file
|
24/mr.png
ADDED
Binary file
|
24/ms.png
ADDED
Binary file
|
24/mt.png
ADDED
Binary file
|
24/my.png
ADDED
Binary file
|
24/ne.png
ADDED
Binary file
|
24/nl.png
ADDED
Binary file
|
24/no.png
ADDED
Binary file
|
24/ny.png
ADDED
Binary file
|
24/pa.png
ADDED
Binary file
|
24/pl.png
ADDED
Binary file
|
24/ps.png
ADDED
Binary file
|
24/pt-br.png
ADDED
Binary file
|
24/pt.png
ADDED
Binary file
|
24/ro.png
ADDED
Binary file
|
24/ru.png
ADDED
Binary file
|
24/sd.png
ADDED
Binary file
|
24/si.png
ADDED
Binary file
|
24/sk.png
ADDED
Binary file
|
24/sl.png
ADDED
Binary file
|
24/sm.png
ADDED
Binary file
|
24/sn.png
ADDED
Binary file
|
24/so.png
ADDED
Binary file
|
24/sq.png
ADDED
Binary file
|
24/sr.png
ADDED
Binary file
|
24/st.png
ADDED
Binary file
|
24/su.png
ADDED
Binary file
|
24/sv.png
ADDED
Binary file
|
24/sw.png
ADDED
Binary file
|
24/ta.png
ADDED
Binary file
|
24/te.png
ADDED
Binary file
|
24/tg.png
ADDED
Binary file
|
24/th.png
ADDED
Binary file
|
24/tl.png
ADDED
Binary file
|
24/tr.png
ADDED
Binary file
|
24/uk.png
ADDED
Binary file
|
24/ur.png
ADDED
Binary file
|
24/uz.png
ADDED
Binary file
|
24/vi.png
ADDED
Binary file
|
24/xh.png
ADDED
Binary file
|
24/yi.png
ADDED
Binary file
|
24/yo.png
ADDED
Binary file
|
24/zh-CN.png
ADDED
Binary file
|
24/zh-TW.png
ADDED
Binary file
|
24/zu.png
ADDED
Binary file
|
gtglobe.svg
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
|
2 |
+
<svg enable-background="new 0 0 32 32" id="Layer_1" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<g id="globe-2">
|
4 |
+
<polygon points="13.179,6.288 13.179,6.315 13.195,6.295 "/>
|
5 |
+
<path fill="#66aaff" d="M15.624,1.028c-7.811,0-14.167,6.355-14.167,14.167c0,7.812,6.356,14.167,14.167,14.167 c7.812,0,14.168-6.354,14.168-14.167C29.792,7.383,23.436,1.028,15.624,1.028z M28.567,15.195c0,0.248-0.022,0.49-0.037,0.735 c-0.091-0.23-0.229-0.53-0.262-0.659c-0.048-0.196-0.341-0.879-0.341-0.879s-0.293-0.39-0.488-0.488 c-0.194-0.098-0.341-0.342-0.683-0.536c-0.342-0.196-0.487-0.293-0.779-0.293c-0.294,0-0.585-0.391-0.928-0.586 c-0.342-0.194-0.39-0.097-0.39-0.097s0.39,0.585,0.39,0.731c0,0.146,0.438,0.39,0.879,0.292c0,0,0.292,0.537,0.438,0.683 c0.146,0.146-0.049,0.293-0.341,0.488c-0.293,0.194-0.244,0.146-0.392,0.292c-0.146,0.146-0.633,0.392-0.78,0.488 c-0.146,0.097-0.731,0.39-1.023,0.097c-0.143-0.141-0.099-0.438-0.195-0.634c-0.098-0.195-1.122-1.707-1.61-2.389 c-0.085-0.12-0.293-0.49-0.438-0.585c-0.146-0.099,0.342-0.099,0.342-0.099s0-0.342-0.049-0.585 c-0.05-0.244,0.049-0.585,0.049-0.585s-0.488,0.292-0.636,0.39c-0.145,0.098-0.292-0.194-0.486-0.439 c-0.195-0.243-0.391-0.537-0.439-0.781c-0.049-0.243,0.244-0.341,0.244-0.341l0.438-0.243c0,0,0.537-0.097,0.879-0.049 c0.341,0.049,0.877,0.098,0.877,0.098s0.146-0.342-0.049-0.488c-0.194-0.146-0.635-0.39-0.83-0.341 c-0.194,0.048,0.097-0.244,0.34-0.439l-0.54-0.098c0,0-0.491,0.244-0.638,0.293c-0.146,0.048-0.4,0.146-0.596,0.39 c-0.194,0.244,0.078,0.585-0.117,0.683c-0.194,0.098-0.326,0.146-0.473,0.194c-0.146,0.049-0.61,0-0.61,0 c-0.504,0-0.181,0.46-0.05,0.623l-0.39-0.476L18.564,8.88c0,0-0.416-0.292-0.611-0.389c-0.195-0.098-0.796-0.439-0.796-0.439 l0.042,0.439l0.565,0.572l0.05,0.013l0.294,0.39l-0.649,0.049V9.129c-0.612-0.148-0.452-0.3-0.521-0.347 c-0.145-0.097-0.484-0.342-0.484-0.342s-0.574,0.098-0.721,0.147c-0.147,0.049-0.188,0.195-0.479,0.292 c-0.294,0.098-0.426,0.244-0.523,0.39s-0.415,0.585-0.608,0.78c-0.196,0.196-0.558,0.146-0.704,0.146 c-0.147,0-0.851-0.195-0.851-0.195V9.173c0,0,0.095-0.464,0.047-0.61l0.427-0.072l0.713-0.147l0.209-0.147l0.3-0.39 c0,0-0.337-0.244-0.094-0.585c0.117-0.164,0.538-0.195,0.733-0.341c0.194-0.146,0.489-0.244,0.489-0.244s0.342-0.292,0.683-0.634 c0,0,0.244-0.147,0.536-0.245c0,0,0.83,0.732,0.977,0.732s0.683-0.341,0.683-0.341s0.146-0.438,0.098-0.585 c-0.049-0.146-0.293-0.634-0.293-0.634s-0.146,0.244-0.292,0.439s-0.244,0.439-0.244,0.439s-0.683-0.047-0.731-0.193 c-0.05-0.147-0.146-0.388-0.196-0.533c-0.047-0.147-0.438-0.142-0.729-0.044c-0.294,0.098,0.047-0.526,0.047-0.526 s0.294-0.368,0.488-0.368s0.635-0.25,0.828-0.298c0.196-0.049,0.783-0.272,1.025-0.272c0.244,0,0.537,0.105,0.684,0.105 s0.731,0,0.731,0l1.023-0.082c0,0,0.879,0.325,0.585,0.521c0,0,0.343,0.211,0.489,0.357c0.137,0.138,0.491-0.127,0.694-0.24 C26.127,6.525,28.567,10.576,28.567,15.195z M5.296,7.563c0,0.195-0.266,0.242,0,0.732c0.34,0.634,0.048,0.927,0.048,0.927 s-0.83,0.585-0.976,0.683c-0.146,0.098-0.536,0.634-0.293,0.487c0.244-0.146,0.536-0.292,0.293,0.098 c-0.244,0.391-0.683,1.024-0.78,1.269s-0.585,0.829-0.585,1.122c0,0.293-0.195,0.879-0.146,1.123 c0.033,0.17-0.075,0.671-0.16,0.877c0.066-2.742,0.989-5.269,2.513-7.336C5.26,7.55,5.296,7.563,5.296,7.563z M6.863,5.693 c1.193-1.101,2.591-1.979,4.133-2.573c-0.152,0.195-0.336,0.395-0.336,0.395s-0.341-0.001-0.976,0.683 C9.051,4.881,9.197,4.686,9.051,4.88S8.953,5.124,8.611,5.369C8.271,5.612,8.124,5.905,8.124,5.905L7.587,6.1L7.149,5.905 c0,0-0.392,0.147-0.343-0.049C6.82,5.804,6.841,5.75,6.863,5.693z M12.709,6.831l-0.194-0.292L12.709,6.1l0.47,0.188V5.417 l0.449-0.243l0.373,0.536l0.574,0.635l-0.381,0.292l-1.016,0.195V6.315L12.709,6.831z M19.051,11.416 c0.114-0.09,0.487,0.146,0.487,0.146s1.219,0.244,1.414,0.39c0.196,0.147,0.537,0.245,0.635,0.392 c0.098,0.146,0.438,0.585,0.486,0.731c0.05,0.146,0.294,0.684,0.343,0.878c0.049,0.195,0.195,0.683,0.341,0.927 c0.146,0.245,0.976,1.317,1.268,1.805l0.88-0.146c0,0-0.099,0.438-0.196,0.585c-0.097,0.146-0.39,0.536-0.536,0.731 c-0.147,0.195-0.341,0.488-0.634,0.731c-0.292,0.243-0.294,0.487-0.439,0.683c-0.146,0.195-0.342,0.634-0.342,0.634 s0.098,0.976,0.146,1.171s-0.341,0.731-0.341,0.731l-0.44,0.44l-0.588,0.779l0.048,0.731c0,0-0.444,0.343-0.689,0.537 c-0.242,0.194-0.204,0.341-0.399,0.537c-0.194,0.194-0.957,0.536-1.152,0.585s-1.271,0.195-1.271,0.195v-0.438l-0.022-0.488 c0,0-0.148-0.585-0.295-0.78s-0.083-0.489-0.327-0.732c-0.244-0.244-0.334-0.438-0.383-0.586c-0.049-0.146,0.053-0.584,0.053-0.584 s0.197-0.537,0.294-0.732c0.098-0.195,0.001-0.487-0.097-0.683s-0.145-0.684-0.145-0.829c0-0.146-0.392-0.391-0.538-0.537 c-0.146-0.146-0.097-0.342-0.097-0.535c0-0.197-0.146-0.635-0.098-0.977c0.049-0.341-0.438-0.098-0.731,0 c-0.293,0.098-0.487-0.098-0.487-0.391s-0.536-0.048-0.878,0.146c-0.343,0.195-0.732,0.195-1.124,0.342 c-0.389,0.146-0.583-0.146-0.583-0.146s-0.343-0.292-0.585-0.439c-0.245-0.146-0.489-0.438-0.685-0.682 c-0.194-0.245-0.683-0.977-0.73-1.268c-0.049-0.294,0-0.49,0-0.831s0-0.536,0.048-0.78c0.049-0.244,0.195-0.537,0.342-0.781 c0.146-0.244,0.683-0.536,0.828-0.634c0.146-0.097,0.488-0.389,0.488-0.585c0-0.195,0.196-0.292,0.292-0.488 c0.099-0.195,0.44-0.682,0.879-0.487c0,0,0.389-0.048,0.535-0.097s0.536-0.194,0.729-0.292c0.195-0.098,0.681-0.144,0.681-0.144 s0.384,0.153,0.53,0.153s0.622-0.085,0.622-0.085s0.22,0.707,0.22,0.854s0.146,0.292,0.391,0.39 C17.44,11.562,18.563,11.807,19.051,11.416z M24.66,20.977c0,0.146-0.049,0.537-0.098,0.732c-0.051,0.195-0.147,0.537-0.195,0.73 c-0.049,0.196-0.293,0.586-0.438,0.684c-0.146,0.098-0.391,0.391-0.536,0.439c-0.146,0.049-0.245-0.342-0.196-0.537 c0.05-0.195,0.293-0.731,0.293-0.731s0.049-0.292,0.097-0.488c0.05-0.194,0.635-0.438,0.635-0.438l0.391-0.732 C24.611,20.635,24.66,20.832,24.66,20.977z M3.015,18.071c0.063,0.016,0.153,0.062,0.28,0.175c0.184,0.16,0.293,0.242,0.537,0.341 c0.243,0.099,0.341,0.243,0.634,0.39c0.293,0.147,0.196,0.05,0.585,0.488c0.391,0.438,0.342,0.438,0.439,0.683 s0.244,0.487,0.342,0.635c0.098,0.146,0.39,0.243,0.536,0.341s0.39,0.195,0.536,0.195c0.147,0,0.586,0.439,0.83,0.487 c0.244,0.05,0.244,0.538,0.244,0.538l-0.244,0.682l-0.196,0.731l0.196,0.585c0,0-0.294,0.245-0.487,0.245 c-0.18,0-0.241,0.114-0.438,0.06C4.949,22.91,3.6,20.638,3.015,18.071z" />
|
6 |
+
</g>
|
7 |
+
</svg>
|
gtranslate.php
CHANGED
@@ -2,10 +2,11 @@
|
|
2 |
/*
|
3 |
Plugin Name: GTranslate
|
4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
5 |
-
Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://
|
6 |
-
Version: 2.
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
|
|
9 |
|
10 |
*/
|
11 |
|
@@ -32,6 +33,7 @@ register_deactivation_hook(__FILE__, array('GTranslate', 'deactivate'));
|
|
32 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array('GTranslate', 'settings_link'));
|
33 |
add_action('admin_menu', array('GTranslate', 'admin_menu'));
|
34 |
add_action('init', array('GTranslate', 'enqueue_scripts'));
|
|
|
35 |
add_shortcode('GTranslate', array('GTranslate', 'get_widget_code'));
|
36 |
add_shortcode('gtranslate', array('GTranslate', 'get_widget_code'));
|
37 |
|
@@ -48,8 +50,8 @@ GTranslate::load_defaults($data);
|
|
48 |
if($data['show_in_primary_menu']) {
|
49 |
add_filter('wp_nav_menu_items', 'gtranslate_menu_item', 10, 2);
|
50 |
function gtranslate_menu_item($items, $args) {
|
51 |
-
|
52 |
-
|
53 |
return $items;
|
54 |
}
|
55 |
}
|
@@ -57,7 +59,7 @@ if($data['show_in_primary_menu']) {
|
|
57 |
class GTranslate extends WP_Widget {
|
58 |
public static function activate() {
|
59 |
$data = array(
|
60 |
-
'gtranslate_title' => 'Website Translator',
|
61 |
);
|
62 |
$data = get_option('GTranslate');
|
63 |
GTranslate::load_defaults($data);
|
@@ -70,15 +72,15 @@ class GTranslate extends WP_Widget {
|
|
70 |
}
|
71 |
|
72 |
public static function settings_link($links) {
|
73 |
-
$settings_link = array('<a href="' . admin_url('options-general.php?page=gtranslate_options') . '">Settings</a>');
|
74 |
return array_merge($links, $settings_link);
|
75 |
}
|
76 |
|
77 |
public static function control() {
|
78 |
$data = get_option('GTranslate');
|
79 |
?>
|
80 |
-
<p><label
|
81 |
-
<p
|
82 |
<?php
|
83 |
if (isset($_POST['gtranslate_title'])){
|
84 |
$data['gtranslate_title'] = esc_attr($_POST['gtranslate_title']);
|
@@ -94,6 +96,10 @@ class GTranslate extends WP_Widget {
|
|
94 |
wp_enqueue_script('jquery');
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
97 |
public function widget($args, $instance) {
|
98 |
$data = get_option('GTranslate');
|
99 |
GTranslate::load_defaults($data);
|
@@ -101,13 +107,13 @@ class GTranslate extends WP_Widget {
|
|
101 |
echo $args['before_widget'];
|
102 |
echo $args['before_title'] . $data['gtranslate_title'] . $args['after_title'];
|
103 |
if(empty($data['widget_code']))
|
104 |
-
|
105 |
else
|
106 |
echo $data['widget_code'];
|
107 |
|
108 |
if(isset($_SERVER['HTTP_X_GT_LANG']) and in_array($_SERVER['HTTP_X_GT_LANG'], array('en','ar','bg','zh-CN','zh-TW','zh-cn','zh-tw','hr','cs','da','nl','fi','fr','de','el','hi','it','ja','ko','no','pl','pt','ro','ru','es','sv','ca','tl','iw','id','lv','lt','sr','sk','sl','uk','vi','sq','et','gl','hu','mt','th','tr','fa','af','ms','sw','ga','cy','be','is','mk','yi','hy','az','eu','ka','ht','ur','bn','bs','ceb','eo','gu','ha','hmn','ig','jw','kn','km','lo','la','mi','mr','mn','ne','pa','so','ta','te','yo','zu','my','ny','kk','mg','ml','si','st','su','tg','uz','am','co','haw','ku','ky','lb','ps','sm','gd','sn','sd','fy','xh'))) {
|
109 |
-
|
110 |
-
|
111 |
|
112 |
echo $args['after_widget'];
|
113 |
}
|
@@ -119,13 +125,13 @@ class GTranslate extends WP_Widget {
|
|
119 |
echo $args['before_widget'];
|
120 |
echo $args['before_title'] . $data['gtranslate_title'] . $args['after_title'];
|
121 |
if(empty($data['widget_code']))
|
122 |
-
|
123 |
else
|
124 |
echo $data['widget_code'];
|
125 |
|
126 |
if(isset($_SERVER['HTTP_X_GT_LANG']) and in_array($_SERVER['HTTP_X_GT_LANG'], array('en','ar','bg','zh-CN','zh-TW','zh-cn','zh-tw','hr','cs','da','nl','fi','fr','de','el','hi','it','ja','ko','no','pl','pt','ro','ru','es','sv','ca','tl','iw','id','lv','lt','sr','sk','sl','uk','vi','sq','et','gl','hu','mt','th','tr','fa','af','ms','sw','ga','cy','be','is','mk','yi','hy','az','eu','ka','ht','ur','bn','bs','ceb','eo','gu','ha','hmn','ig','jw','kn','km','lo','la','mi','mr','mn','ne','pa','so','ta','te','yo','zu','my','ny','kk','mg','ml','si','st','su','tg','uz','am','co','haw','ku','ky','lb','ps','sm','gd','sn','sd','fy','xh'))) {
|
127 |
-
|
128 |
-
|
129 |
|
130 |
echo $args['after_widget'];
|
131 |
}
|
@@ -135,12 +141,12 @@ class GTranslate extends WP_Widget {
|
|
135 |
GTranslate::load_defaults($data);
|
136 |
|
137 |
if(empty($data['widget_code']))
|
138 |
-
return '<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.';
|
139 |
else {
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
}
|
145 |
}
|
146 |
|
@@ -150,32 +156,58 @@ class GTranslate extends WP_Widget {
|
|
150 |
}
|
151 |
|
152 |
public static function admin_menu() {
|
153 |
-
add_options_page('GTranslate Options', 'GTranslate', 'administrator', 'gtranslate_options', array('GTranslate', 'options'));
|
154 |
}
|
155 |
|
156 |
public static function options() {
|
157 |
?>
|
158 |
<div class="wrap">
|
159 |
<div id="icon-options-general" class="icon32"><br/></div>
|
160 |
-
<h2><img src="<?php echo plugins_url('gt-logo.png', __FILE__); ?>" border="0" title="GTranslate - your window to the world" alt="GTranslate"></h2>
|
161 |
<?php
|
162 |
if(isset($_POST['save']) and $_POST['save'])
|
163 |
GTranslate::control_options();
|
164 |
$data = get_option('GTranslate');
|
165 |
GTranslate::load_defaults($data);
|
166 |
|
|
|
|
|
167 |
$site_url = site_url();
|
168 |
$wp_plugin_url = plugins_url() . '/gtranslate';
|
169 |
|
170 |
extract($data);
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
#unset($data['widget_code']);
|
173 |
#echo '<pre>', print_r($data, true), '</pre>';
|
174 |
|
175 |
$script = <<<EOT
|
176 |
|
177 |
-
var
|
178 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
var languages_map = {en_x: 0, en_y: 0, ar_x: 100, ar_y: 0, bg_x: 200, bg_y: 0, zhCN_x: 300, zhCN_y: 0, zhTW_x: 400, zhTW_y: 0, hr_x: 500, hr_y: 0, cs_x: 600, cs_y: 0, da_x: 700, da_y: 0, nl_x: 0, nl_y: 100, fi_x: 100, fi_y: 100, fr_x: 200, fr_y: 100, de_x: 300, de_y: 100, el_x: 400, el_y: 100, hi_x: 500, hi_y: 100, it_x: 600, it_y: 100, ja_x: 700, ja_y: 100, ko_x: 0, ko_y: 200, no_x: 100, no_y: 200, pl_x: 200, pl_y: 200, pt_x: 300, pt_y: 200, ro_x: 400, ro_y: 200, ru_x: 500, ru_y: 200, es_x: 600, es_y: 200, sv_x: 700, sv_y: 200, ca_x: 0, ca_y: 300, tl_x: 100, tl_y: 300, iw_x: 200, iw_y: 300, id_x: 300, id_y: 300, lv_x: 400, lv_y: 300, lt_x: 500, lt_y: 300, sr_x: 600, sr_y: 300, sk_x: 700, sk_y: 300, sl_x: 0, sl_y: 400, uk_x: 100, uk_y: 400, vi_x: 200, vi_y: 400, sq_x: 300, sq_y: 400, et_x: 400, et_y: 400, gl_x: 500, gl_y: 400, hu_x: 600, hu_y: 400, mt_x: 700, mt_y: 400, th_x: 0, th_y: 500, tr_x: 100, tr_y: 500, fa_x: 200, fa_y: 500, af_x: 300, af_y: 500, ms_x: 400, ms_y: 500, sw_x: 500, sw_y: 500, ga_x: 600, ga_y: 500, cy_x: 700, cy_y: 500, be_x: 0, be_y: 600, is_x: 100, is_y: 600, mk_x: 200, mk_y: 600, yi_x: 300, yi_y: 600, hy_x: 400, hy_y: 600, az_x: 500, az_y: 600, eu_x: 600, eu_y: 600, ka_x: 700, ka_y: 600, ht_x: 0, ht_y: 700, ur_x: 100, ur_y: 700};
|
180 |
|
181 |
function RefreshDoWidgetCode() {
|
@@ -199,16 +231,25 @@ function RefreshDoWidgetCode() {
|
|
199 |
jQuery('#new_window_option').hide();
|
200 |
}
|
201 |
|
202 |
-
if(widget_look == 'dropdown' || widget_look == 'flags_dropdown') {
|
203 |
jQuery('#dropdown_languages_option').show();
|
204 |
} else {
|
205 |
jQuery('#dropdown_languages_option').hide();
|
206 |
}
|
207 |
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
if(widget_look == 'flags' || widget_look == 'flags_dropdown' || widget_look == 'dropdown_with_flags') {
|
209 |
jQuery('#flag_languages_option').show();
|
|
|
210 |
} else {
|
211 |
jQuery('#flag_languages_option').hide();
|
|
|
|
|
212 |
}
|
213 |
|
214 |
if(widget_look == 'flags' || widget_look == 'dropdown' || widget_look == 'dropdown_with_flags') {
|
@@ -228,10 +269,10 @@ function RefreshDoWidgetCode() {
|
|
228 |
|
229 |
if(translation_method == 'google_default') {
|
230 |
included_languages = '';
|
231 |
-
jQuery.each(
|
232 |
-
lang =
|
233 |
if(jQuery('#incl_langs'+lang+':checked').length) {
|
234 |
-
lang_name =
|
235 |
included_languages += ','+lang;
|
236 |
}
|
237 |
});
|
@@ -251,10 +292,10 @@ function RefreshDoWidgetCode() {
|
|
251 |
// Adding flags
|
252 |
if(widget_look == 'flags' || widget_look == 'flags_dropdown' /* jQuery('#show_flags:checked').length */) {
|
253 |
//console.log('adding flags');
|
254 |
-
jQuery.each(
|
255 |
lang = language_codes[i];
|
256 |
if(jQuery('#fincl_langs'+lang+':checked').length) {
|
257 |
-
lang_name =
|
258 |
flag_x = languages_map[lang.replace('-', '')+'_x'];
|
259 |
flag_y = languages_map[lang.replace('-', '')+'_y'];
|
260 |
|
@@ -265,11 +306,11 @@ function RefreshDoWidgetCode() {
|
|
265 |
href = (lang == default_language) ? '$site_url' : '$site_url'.replace('$site_url'.split('/').slice(2, 3)[0].replace('www.', ''), lang + '.' + '$site_url'.split('/').slice(2, 3)[0].replace('www.', '')).replace('://www.', '://');
|
266 |
|
267 |
if(lang == 'en' && jQuery('#alt_us:checked').length)
|
268 |
-
|
269 |
else if(lang == 'pt' && jQuery('#alt_br:checked').length)
|
270 |
-
|
271 |
else if(lang == 'es' && jQuery('#alt_mx:checked').length)
|
272 |
-
|
273 |
else
|
274 |
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl" style="background-position:-'+flag_x+'px -'+flag_y+'px;"><img src="{$wp_plugin_url}/blank.png" height="'+flag_size+'" width="'+flag_size+'" alt="'+lang_name+'" /></a>';
|
275 |
}
|
@@ -285,10 +326,10 @@ function RefreshDoWidgetCode() {
|
|
285 |
widget_preview += ' ';
|
286 |
widget_preview += '<select onchange="doGTranslate(this);">';
|
287 |
widget_preview += '<option value="">Select Language</option>';
|
288 |
-
jQuery.each(
|
289 |
-
lang =
|
290 |
if(jQuery('#incl_langs'+lang+':checked').length) {
|
291 |
-
lang_name =
|
292 |
widget_preview += '<option value="'+default_language+'|'+lang+'">'+lang_name+'</option>';
|
293 |
}
|
294 |
});
|
@@ -314,30 +355,118 @@ function RefreshDoWidgetCode() {
|
|
314 |
widget_code += default_language;
|
315 |
widget_code += '\',autoDisplay: false';
|
316 |
//if(analytics)
|
317 |
-
//
|
318 |
widget_code += "}, 'google_translate_element2');}"+new_line;
|
319 |
widget_code += '<\/script>';
|
320 |
widget_code += '<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"><\/script>'+new_line;
|
321 |
}
|
322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
if(widget_look == 'dropdown_with_flags') {
|
324 |
// Adding slider html
|
325 |
widget_preview += '<div class="switcher notranslate">'+new_line;
|
326 |
widget_preview += '<div class="selected">'+new_line;
|
327 |
if(default_language == 'en' && jQuery('#alt_us:checked').length)
|
328 |
-
|
329 |
else if(default_language == 'pt' && jQuery('#alt_br:checked').length)
|
330 |
-
|
331 |
else if(default_language == 'es' && jQuery('#alt_mx:checked').length)
|
332 |
-
|
333 |
else
|
334 |
-
|
335 |
widget_preview += '</div>'+new_line;
|
336 |
widget_preview += '<div class="option">'+new_line;
|
337 |
-
jQuery.each(
|
338 |
lang = language_codes[i];
|
339 |
if(jQuery('#fincl_langs'+lang+':checked').length) {
|
340 |
-
lang_name =
|
341 |
flag_x = languages_map[lang.replace('-', '')+'_x'];
|
342 |
flag_y = languages_map[lang.replace('-', '')+'_y'];
|
343 |
|
@@ -348,11 +477,11 @@ function RefreshDoWidgetCode() {
|
|
348 |
href = (lang == default_language) ? '$site_url' : '$site_url'.replace('$site_url'.split('/').slice(2, 3)[0].replace('www.', ''), lang + '.' + '$site_url'.split('/').slice(2, 3)[0].replace('www.', '')).replace('://www.', '://');
|
349 |
|
350 |
if(lang == 'en' && jQuery('#alt_us:checked').length)
|
351 |
-
|
352 |
else if(lang == 'pt' && jQuery('#alt_br:checked').length)
|
353 |
-
|
354 |
else if(lang == 'es' && jQuery('#alt_mx:checked').length)
|
355 |
-
|
356 |
else
|
357 |
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');jQuery(this).parent().parent().find(\'div.selected a\').html(jQuery(this).html());return false;" title="'+lang_name+'" class="nturl'+(default_language == lang ? ' selected' : '')+'"><span class="gflag" style="background-position:-'+flag_x+'px -'+flag_y+'px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+lang+'" /></span>'+lang_name+'</a>';
|
358 |
}
|
@@ -369,22 +498,23 @@ function RefreshDoWidgetCode() {
|
|
369 |
|
370 |
// Adding slider css
|
371 |
widget_preview += '<style type="text/css">'+new_line;
|
372 |
-
widget_preview += '<!--'+new_line;
|
373 |
widget_preview += 'span.gflag {font-size:16px;padding:1px 0;background-repeat:no-repeat;background-image:url($wp_plugin_url/16.png);}'+new_line;
|
374 |
widget_preview += 'span.gflag img {border:0;margin-top:2px;}'+new_line;
|
375 |
-
widget_preview += '.switcher {font-family:Arial;font-size:10pt;text-align:left;cursor:pointer;overflow:hidden;width:163px;line-height:
|
376 |
widget_preview += '.switcher a {text-decoration:none;display:block;font-size:10pt;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}'+new_line;
|
377 |
widget_preview += '.switcher a span.gflag {margin-right:3px;padding:0;display:block;float:left;}'+new_line;
|
378 |
widget_preview += '.switcher .selected {background:#FFFFFF url($wp_plugin_url/switcher.png) repeat-x;position:relative;z-index:9999;}'+new_line;
|
379 |
widget_preview += '.switcher .selected a {border:1px solid #CCCCCC;background:url($wp_plugin_url/arrow_down.png) 146px center no-repeat;color:#666666;padding:3px 5px;width:151px;}'+new_line;
|
380 |
widget_preview += '.switcher .selected a:hover {background:#F0F0F0 url($wp_plugin_url/arrow_down.png) 146px center no-repeat;}'+new_line;
|
381 |
-
widget_preview += '.switcher .option {position:relative;z-index:9998;border-left:1px solid #CCCCCC;border-right:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;background-color:#EEEEEE;display:none;width:161px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}'+new_line;
|
382 |
widget_preview += '.switcher .option a {color:#000;padding:3px 5px;}'+new_line;
|
383 |
widget_preview += '.switcher .option a:hover {background:#FFC;}'+new_line;
|
384 |
widget_preview += '.switcher .option a.selected {background:#FFC;}'+new_line;
|
385 |
widget_preview += '#selected_lang_name {float: none;}'+new_line;
|
386 |
widget_preview += '.l_name {float: none !important;margin: 0;}'+new_line;
|
387 |
-
widget_preview += '
|
|
|
|
|
388 |
widget_preview += '</style>'+new_line+new_line;
|
389 |
}
|
390 |
|
@@ -477,16 +607,25 @@ jQuery('#flag_size').val('$flag_size');
|
|
477 |
if(jQuery('#pro_version:checked').length || jQuery('#enterprise_version:checked').length)
|
478 |
jQuery('#new_window_option').show();
|
479 |
|
480 |
-
if('$widget_look' == 'dropdown' || '$widget_look' == 'flags_dropdown') {
|
481 |
jQuery('#dropdown_languages_option').show();
|
482 |
} else {
|
483 |
jQuery('#dropdown_languages_option').hide();
|
484 |
}
|
485 |
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
if('$widget_look' == 'flags' || '$widget_look' == 'flags_dropdown' || '$widget_look' == 'dropdown_with_flags') {
|
487 |
jQuery('#flag_languages_option').show();
|
|
|
488 |
} else {
|
489 |
jQuery('#flag_languages_option').hide();
|
|
|
|
|
490 |
}
|
491 |
|
492 |
if('$widget_look' == 'flags' || '$widget_look' == 'dropdown' || '$widget_look' == 'dropdown_with_flags') {
|
@@ -505,13 +644,35 @@ if(jQuery('#widget_code').val() == '')
|
|
505 |
RefreshDoWidgetCode();
|
506 |
else
|
507 |
ShowWidgetPreview(jQuery('#widget_code').val());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
EOT;
|
509 |
|
510 |
// selected languages
|
511 |
if(count($incl_langs) > 0)
|
512 |
-
$script .= "jQuery.each(languages, function(i, val) {jQuery('#incl_langs'+
|
513 |
if(count($fincl_langs) > 0)
|
514 |
-
$script .= "jQuery.each(languages, function(i, val) {jQuery('#fincl_langs'+
|
515 |
foreach($incl_langs as $lang)
|
516 |
$script .= "jQuery('#incl_langs$lang').attr('checked', true);\n";
|
517 |
foreach($fincl_langs as $lang)
|
@@ -528,7 +689,7 @@ foreach($alt_flags as $flag)
|
|
528 |
|
529 |
<div id="poststuff">
|
530 |
<div class="postbox">
|
531 |
-
<h3 id="settings"
|
532 |
<div class="inside">
|
533 |
<table style="width:100%;" cellpadding="4">
|
534 |
<!--tr>
|
@@ -542,145 +703,146 @@ foreach($alt_flags as $flag)
|
|
542 |
</td>
|
543 |
</tr-->
|
544 |
<tr>
|
545 |
-
<td class="option_name"
|
546 |
<td>
|
547 |
<select id="widget_look" name="widget_look" onChange="RefreshDoWidgetCode()">
|
548 |
-
<option value="flags_dropdown"
|
549 |
-
<option value="dropdown_with_flags"
|
550 |
-
<option value="dropdown"
|
551 |
-
<option value="flags"
|
|
|
552 |
</select>
|
553 |
</td>
|
554 |
</tr>
|
555 |
<tr>
|
556 |
-
<td class="option_name"
|
557 |
<td>
|
558 |
<select id="default_language" name="default_language" onChange="RefreshDoWidgetCode()">
|
559 |
-
<option value="af"
|
560 |
-
<option value="sq"
|
561 |
-
<option value="am"
|
562 |
-
<option value="ar"
|
563 |
-
<option value="hy"
|
564 |
-
<option value="az"
|
565 |
-
<option value="eu"
|
566 |
-
<option value="be"
|
567 |
-
<option value="bn"
|
568 |
-
<option value="bs"
|
569 |
-
<option value="bg"
|
570 |
-
<option value="ca"
|
571 |
-
<option value="ceb"
|
572 |
-
<option value="ny"
|
573 |
-
<option value="zh-CN"
|
574 |
-
<option value="zh-TW"
|
575 |
-
<option value="co"
|
576 |
-
<option value="hr"
|
577 |
-
<option value="cs"
|
578 |
-
<option value="da"
|
579 |
-
<option value="nl"
|
580 |
-
<option value="en" selected="selected"
|
581 |
-
<option value="eo"
|
582 |
-
<option value="et"
|
583 |
-
<option value="tl"
|
584 |
-
<option value="fi"
|
585 |
-
<option value="fr"
|
586 |
-
<option value="fy"
|
587 |
-
<option value="gl"
|
588 |
-
<option value="ka"
|
589 |
-
<option value="de"
|
590 |
-
<option value="el"
|
591 |
-
<option value="gu"
|
592 |
-
<option value="ht"
|
593 |
-
<option value="ha"
|
594 |
-
<option value="haw"
|
595 |
-
<option value="iw"
|
596 |
-
<option value="hi"
|
597 |
-
<option value="hmn"
|
598 |
-
<option value="hu"
|
599 |
-
<option value="is"
|
600 |
-
<option value="ig"
|
601 |
-
<option value="id"
|
602 |
-
<option value="ga"
|
603 |
-
<option value="it"
|
604 |
-
<option value="ja"
|
605 |
-
<option value="jw"
|
606 |
-
<option value="kn"
|
607 |
-
<option value="kk"
|
608 |
-
<option value="km"
|
609 |
-
<option value="ko"
|
610 |
-
<option value="ku"
|
611 |
-
<option value="ky"
|
612 |
-
<option value="lo"
|
613 |
-
<option value="la"
|
614 |
-
<option value="lv"
|
615 |
-
<option value="lt"
|
616 |
-
<option value="lb"
|
617 |
-
<option value="mk"
|
618 |
-
<option value="mg"
|
619 |
-
<option value="ms"
|
620 |
-
<option value="ml"
|
621 |
-
<option value="mt"
|
622 |
-
<option value="mi"
|
623 |
-
<option value="mr"
|
624 |
-
<option value="mn"
|
625 |
-
<option value="my"
|
626 |
-
<option value="ne"
|
627 |
-
<option value="no"
|
628 |
-
<option value="ps"
|
629 |
-
<option value="fa"
|
630 |
-
<option value="pl"
|
631 |
-
<option value="pt"
|
632 |
-
<option value="pa"
|
633 |
-
<option value="ro"
|
634 |
-
<option value="ru"
|
635 |
-
<option value="sm"
|
636 |
-
<option value="gd"
|
637 |
-
<option value="sr"
|
638 |
-
<option value="st"
|
639 |
-
<option value="sn"
|
640 |
-
<option value="sd"
|
641 |
-
<option value="si"
|
642 |
-
<option value="sk"
|
643 |
-
<option value="sl"
|
644 |
-
<option value="so"
|
645 |
-
<option value="es"
|
646 |
-
<option value="su"
|
647 |
-
<option value="sw"
|
648 |
-
<option value="sv"
|
649 |
-
<option value="tg"
|
650 |
-
<option value="ta"
|
651 |
-
<option value="te"
|
652 |
-
<option value="th"
|
653 |
-
<option value="tr"
|
654 |
-
<option value="uk"
|
655 |
-
<option value="ur"
|
656 |
-
<option value="uz"
|
657 |
-
<option value="vi"
|
658 |
-
<option value="cy"
|
659 |
-
<option value="xh"
|
660 |
-
<option value="yi"
|
661 |
-
<option value="yo"
|
662 |
-
<option value="zu"
|
663 |
</select>
|
664 |
</td>
|
665 |
</tr>
|
666 |
<tr>
|
667 |
-
<td class="option_name"
|
668 |
<td><input id="analytics" name="analytics" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
669 |
</tr>
|
670 |
<tr>
|
671 |
-
<td class="option_name">* Sub-directory URL structure
|
672 |
-
<td><input id="pro_version" name="pro_version" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/> <a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">* paid plans only
|
673 |
</tr>
|
674 |
<tr>
|
675 |
-
<td class="option_name">* Sub-domain URL structure
|
676 |
-
<td><input id="enterprise_version" name="enterprise_version" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/> <a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">* paid plans only
|
677 |
</tr>
|
678 |
<tr id="new_window_option" style="display:none;">
|
679 |
-
<td class="option_name"
|
680 |
<td><input id="new_window" name="new_window" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
681 |
</tr>
|
682 |
<tr>
|
683 |
-
<td class="option_name"
|
684 |
<td><input id="show_in_primary_menu" name="show_in_primary_menu" value="1" type="checkbox"/></td>
|
685 |
</tr>
|
686 |
|
@@ -689,7 +851,7 @@ foreach($alt_flags as $flag)
|
|
689 |
<td><input id="show_flags" name="show_flags" value="1" type="checkbox" checked="checked" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
690 |
</tr-->
|
691 |
<tr id="flag_size_option">
|
692 |
-
<td class="option_name"
|
693 |
<td>
|
694 |
<select id="flag_size" name="flag_size" onchange="RefreshDoWidgetCode()">
|
695 |
<option value="16" selected>16px</option>
|
@@ -699,86 +861,31 @@ foreach($alt_flags as $flag)
|
|
699 |
</td>
|
700 |
</tr>
|
701 |
<tr id="flag_languages_option" style="display:none;">
|
702 |
-
<td class="option_name" colspan="2"
|
703 |
|
704 |
<div style="overflow:hidden;">
|
705 |
-
|
706 |
-
|
707 |
-
<
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langszh-CN" name="fincl_langs[]" value="zh-CN"><label for="fincl_langszh-CN">Chinese (Simplified)</label><br />
|
716 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langszh-TW" name="fincl_langs[]" value="zh-TW"><label for="fincl_langszh-TW">Chinese (Traditional)</label><br />
|
717 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langshr" name="fincl_langs[]" value="hr"><label for="fincl_langshr">Croatian</label><br />
|
718 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langscs" name="fincl_langs[]" value="cs"><label for="fincl_langscs">Czech</label><br />
|
719 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsda" name="fincl_langs[]" value="da"><label for="fincl_langsda">Danish</label><br />
|
720 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsnl" name="fincl_langs[]" value="nl"><label for="fincl_langsnl">Dutch</label><br />
|
721 |
-
</div>
|
722 |
-
<div style="width:25%;float:left;">
|
723 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsen" name="fincl_langs[]" value="en" checked><label for="fincl_langsen">English</label><br />
|
724 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langset" name="fincl_langs[]" value="et"><label for="fincl_langset">Estonian</label><br />
|
725 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langstl" name="fincl_langs[]" value="tl"><label for="fincl_langstl">Filipino</label><br />
|
726 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsfi" name="fincl_langs[]" value="fi"><label for="fincl_langsfi">Finnish</label><br />
|
727 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsfr" name="fincl_langs[]" value="fr" checked><label for="fincl_langsfr">French</label><br />
|
728 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsgl" name="fincl_langs[]" value="gl"><label for="fincl_langsgl">Galician</label><br />
|
729 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langska" name="fincl_langs[]" value="ka"><label for="fincl_langska">Georgian</label><br />
|
730 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsde" name="fincl_langs[]" value="de" checked><label for="fincl_langsde">German</label><br />
|
731 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsel" name="fincl_langs[]" value="el"><label for="fincl_langsel">Greek</label><br />
|
732 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsht" name="fincl_langs[]" value="ht"><label for="fincl_langsht">Haitian Creole</label><br />
|
733 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsiw" name="fincl_langs[]" value="iw"><label for="fincl_langsiw">Hebrew</label><br />
|
734 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langshi" name="fincl_langs[]" value="hi"><label for="fincl_langshi">Hindi</label><br />
|
735 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langshu" name="fincl_langs[]" value="hu"><label for="fincl_langshu">Hungarian</label><br />
|
736 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsis" name="fincl_langs[]" value="is"><label for="fincl_langsis">Icelandic</label><br />
|
737 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsid" name="fincl_langs[]" value="id"><label for="fincl_langsid">Indonesian</label><br />
|
738 |
-
</div>
|
739 |
-
<div style="width:25%;float:left;">
|
740 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsga" name="fincl_langs[]" value="ga"><label for="fincl_langsga">Irish</label><br />
|
741 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsit" name="fincl_langs[]" value="it" checked><label for="fincl_langsit">Italian</label><br />
|
742 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsja" name="fincl_langs[]" value="ja"><label for="fincl_langsja">Japanese</label><br />
|
743 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsko" name="fincl_langs[]" value="ko"><label for="fincl_langsko">Korean</label><br />
|
744 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langslv" name="fincl_langs[]" value="lv"><label for="fincl_langslv">Latvian</label><br />
|
745 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langslt" name="fincl_langs[]" value="lt"><label for="fincl_langslt">Lithuanian</label><br />
|
746 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsmk" name="fincl_langs[]" value="mk"><label for="fincl_langsmk">Macedonian</label><br />
|
747 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsms" name="fincl_langs[]" value="ms"><label for="fincl_langsms">Malay</label><br />
|
748 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsmt" name="fincl_langs[]" value="mt"><label for="fincl_langsmt">Maltese</label><br />
|
749 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsno" name="fincl_langs[]" value="no"><label for="fincl_langsno">Norwegian</label><br />
|
750 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsfa" name="fincl_langs[]" value="fa"><label for="fincl_langsfa">Persian</label><br />
|
751 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langspl" name="fincl_langs[]" value="pl"><label for="fincl_langspl">Polish</label><br />
|
752 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langspt" name="fincl_langs[]" value="pt" checked><label for="fincl_langspt">Portuguese</label><br />
|
753 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsro" name="fincl_langs[]" value="ro"><label for="fincl_langsro">Romanian</label><br />
|
754 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsru" name="fincl_langs[]" value="ru" checked><label for="fincl_langsru">Russian</label><br />
|
755 |
-
</div>
|
756 |
-
<div style="width:25%;float:left;">
|
757 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langssr" name="fincl_langs[]" value="sr"><label for="fincl_langssr">Serbian</label><br />
|
758 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langssk" name="fincl_langs[]" value="sk"><label for="fincl_langssk">Slovak</label><br />
|
759 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langssl" name="fincl_langs[]" value="sl"><label for="fincl_langssl">Slovenian</label><br />
|
760 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langses" name="fincl_langs[]" value="es" checked><label for="fincl_langses">Spanish</label><br />
|
761 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langssw" name="fincl_langs[]" value="sw"><label for="fincl_langssw">Swahili</label><br />
|
762 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langssv" name="fincl_langs[]" value="sv"><label for="fincl_langssv">Swedish</label><br />
|
763 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsth" name="fincl_langs[]" value="th"><label for="fincl_langsth">Thai</label><br />
|
764 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langstr" name="fincl_langs[]" value="tr"><label for="fincl_langstr">Turkish</label><br />
|
765 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsuk" name="fincl_langs[]" value="uk"><label for="fincl_langsuk">Ukrainian</label><br />
|
766 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsur" name="fincl_langs[]" value="ur"><label for="fincl_langsur">Urdu</label><br />
|
767 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsvi" name="fincl_langs[]" value="vi"><label for="fincl_langsvi">Vietnamese</label><br />
|
768 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langscy" name="fincl_langs[]" value="cy"><label for="fincl_langscy">Welsh</label><br />
|
769 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langsyi" name="fincl_langs[]" value="yi"><label for="fincl_langsyi">Yiddish</label><br />
|
770 |
-
</div>
|
771 |
</div>
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
<
|
776 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="
|
777 |
-
<br
|
|
|
778 |
</td>
|
779 |
</tr>
|
780 |
<tr id="line_break_option" style="display:none;">
|
781 |
-
<td class="option_name"
|
782 |
<td><input id="add_new_line" name="add_new_line" value="1" type="checkbox" checked="checked" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
783 |
</tr>
|
784 |
<!--tr>
|
@@ -786,120 +893,18 @@ foreach($alt_flags as $flag)
|
|
786 |
<td><input id="show_dropdown" name="show_dropdown" value="1" type="checkbox" checked="checked" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
787 |
</tr-->
|
788 |
<tr id="dropdown_languages_option" style="display:none;">
|
789 |
-
<td class="option_name" colspan="2">
|
790 |
<div>
|
791 |
-
|
792 |
-
|
793 |
-
<
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsbs" name="incl_langs[]" value="bs" checked><label for="incl_langsbs">Bosnian</label><br />
|
802 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsbg" name="incl_langs[]" value="bg" checked><label for="incl_langsbg">Bulgarian</label><br />
|
803 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsca" name="incl_langs[]" value="ca" checked><label for="incl_langsca">Catalan</label><br />
|
804 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsceb" name="incl_langs[]" value="ceb" checked><label for="incl_langsceb">Cebuano</label><br />
|
805 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsny" name="incl_langs[]" value="ny" checked><label for="incl_langsny">Chichewa</label><br />
|
806 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langszh-CN" name="incl_langs[]" value="zh-CN" checked><label for="incl_langszh-CN">Chinese (Simplified)</label><br />
|
807 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langszh-TW" name="incl_langs[]" value="zh-TW" checked><label for="incl_langszh-TW">Chinese (Traditional)</label><br />
|
808 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsco" name="incl_langs[]" value="co" checked><label for="incl_langsco">Corsican</label><br />
|
809 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langshr" name="incl_langs[]" value="hr" checked><label for="incl_langshr">Croatian</label><br />
|
810 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langscs" name="incl_langs[]" value="cs" checked><label for="incl_langscs">Czech</label><br />
|
811 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsda" name="incl_langs[]" value="da" checked><label for="incl_langsda">Danish</label><br />
|
812 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsnl" name="incl_langs[]" value="nl" checked><label for="incl_langsnl">Dutch</label><br />
|
813 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsen" name="incl_langs[]" value="en" checked><label for="incl_langsen">English</label><br />
|
814 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langseo" name="incl_langs[]" value="eo" checked><label for="incl_langseo">Esperanto</label><br />
|
815 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langset" name="incl_langs[]" value="et" checked><label for="incl_langset">Estonian</label><br />
|
816 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langstl" name="incl_langs[]" value="tl" checked><label for="incl_langstl">Filipino</label><br />
|
817 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsfi" name="incl_langs[]" value="fi" checked><label for="incl_langsfi">Finnish</label><br />
|
818 |
-
</div>
|
819 |
-
<div style="width:25%;float:left;">
|
820 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsfr" name="incl_langs[]" value="fr" checked><label for="incl_langsfr">French</label><br />
|
821 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsfy" name="incl_langs[]" value="fy" checked><label for="incl_langsfy">Frisian</label><br />
|
822 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsgl" name="incl_langs[]" value="gl" checked><label for="incl_langsgl">Galician</label><br />
|
823 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langska" name="incl_langs[]" value="ka" checked><label for="incl_langska">Georgian</label><br />
|
824 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsde" name="incl_langs[]" value="de" checked><label for="incl_langsde">German</label><br />
|
825 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsel" name="incl_langs[]" value="el" checked><label for="incl_langsel">Greek</label><br />
|
826 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsgu" name="incl_langs[]" value="gu" checked><label for="incl_langsgu">Gujarati</label><br />
|
827 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsht" name="incl_langs[]" value="ht" checked><label for="incl_langsht">Haitian Creole</label><br />
|
828 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsha" name="incl_langs[]" value="ha" checked><label for="incl_langsha">Hausa</label><br />
|
829 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langshaw" name="incl_langs[]" value="haw" checked><label for="incl_langshaw">Hawaiian</label><br />
|
830 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsiw" name="incl_langs[]" value="iw" checked><label for="incl_langsiw">Hebrew</label><br />
|
831 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langshi" name="incl_langs[]" value="hi" checked><label for="incl_langshi">Hindi</label><br />
|
832 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langshmn" name="incl_langs[]" value="hmn" checked><label for="incl_langshmn">Hmong</label><br />
|
833 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langshu" name="incl_langs[]" value="hu" checked><label for="incl_langshu">Hungarian</label><br />
|
834 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsis" name="incl_langs[]" value="is" checked><label for="incl_langsis">Icelandic</label><br />
|
835 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsig" name="incl_langs[]" value="ig" checked><label for="incl_langsig">Igbo</label><br />
|
836 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsid" name="incl_langs[]" value="id" checked><label for="incl_langsid">Indonesian</label><br />
|
837 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsga" name="incl_langs[]" value="ga" checked><label for="incl_langsga">Irish</label><br />
|
838 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsit" name="incl_langs[]" value="it" checked><label for="incl_langsit">Italian</label><br />
|
839 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsja" name="incl_langs[]" value="ja" checked><label for="incl_langsja">Japanese</label><br />
|
840 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsjw" name="incl_langs[]" value="jw" checked><label for="incl_langsjw">Javanese</label><br />
|
841 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langskn" name="incl_langs[]" value="kn" checked><label for="incl_langskn">Kannada</label><br />
|
842 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langskk" name="incl_langs[]" value="kk" checked><label for="incl_langskk">Kazakh</label><br />
|
843 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langskm" name="incl_langs[]" value="km" checked><label for="incl_langskm">Khmer</label><br />
|
844 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsko" name="incl_langs[]" value="ko" checked><label for="incl_langsko">Korean</label><br />
|
845 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsku" name="incl_langs[]" value="ku" checked><label for="incl_langsku">Kurdish (Kurmanji)</label><br />
|
846 |
-
</div>
|
847 |
-
<div style="width:25%;float:left;">
|
848 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsky" name="incl_langs[]" value="ky" checked><label for="incl_langsky">Kyrgyz</label><br />
|
849 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langslo" name="incl_langs[]" value="lo" checked><label for="incl_langslo">Lao</label><br />
|
850 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsla" name="incl_langs[]" value="la" checked><label for="incl_langsla">Latin</label><br />
|
851 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langslv" name="incl_langs[]" value="lv" checked><label for="incl_langslv">Latvian</label><br />
|
852 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langslt" name="incl_langs[]" value="lt" checked><label for="incl_langslt">Lithuanian</label><br />
|
853 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langslb" name="incl_langs[]" value="lb" checked><label for="incl_langslb">Luxembourgish</label><br />
|
854 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsmk" name="incl_langs[]" value="mk" checked><label for="incl_langsmk">Macedonian</label><br />
|
855 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsmg" name="incl_langs[]" value="mg" checked><label for="incl_langsmg">Malagasy</label><br />
|
856 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsms" name="incl_langs[]" value="ms" checked><label for="incl_langsms">Malay</label><br />
|
857 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsml" name="incl_langs[]" value="ml" checked><label for="incl_langsml">Malayalam</label><br />
|
858 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsmt" name="incl_langs[]" value="mt" checked><label for="incl_langsmt">Maltese</label><br />
|
859 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsmi" name="incl_langs[]" value="mi" checked><label for="incl_langsmi">Maori</label><br />
|
860 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsmr" name="incl_langs[]" value="mr" checked><label for="incl_langsmr">Marathi</label><br />
|
861 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsmn" name="incl_langs[]" value="mn" checked><label for="incl_langsmn">Mongolian</label><br />
|
862 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsmy" name="incl_langs[]" value="my" checked><label for="incl_langsmy">Myanmar (Burmese)</label><br />
|
863 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsne" name="incl_langs[]" value="ne" checked><label for="incl_langsne">Nepali</label><br />
|
864 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsno" name="incl_langs[]" value="no" checked><label for="incl_langsno">Norwegian</label><br />
|
865 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsps" name="incl_langs[]" value="ps" checked><label for="incl_langsps">Pashto</label><br />
|
866 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsfa" name="incl_langs[]" value="fa" checked><label for="incl_langsfa">Persian</label><br />
|
867 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langspl" name="incl_langs[]" value="pl" checked><label for="incl_langspl">Polish</label><br />
|
868 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langspt" name="incl_langs[]" value="pt" checked><label for="incl_langspt">Portuguese</label><br />
|
869 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langspa" name="incl_langs[]" value="pa" checked><label for="incl_langspa">Punjabi</label><br />
|
870 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsro" name="incl_langs[]" value="ro" checked><label for="incl_langsro">Romanian</label><br />
|
871 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsru" name="incl_langs[]" value="ru" checked><label for="incl_langsru">Russian</label><br />
|
872 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssm" name="incl_langs[]" value="sm" checked><label for="incl_langssm">Samoan</label><br />
|
873 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsgd" name="incl_langs[]" value="gd" checked><label for="incl_langsgd">Scottish Gaelic</label><br />
|
874 |
-
</div>
|
875 |
-
<div style="width:25%;float:left;">
|
876 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssr" name="incl_langs[]" value="sr" checked><label for="incl_langssr">Serbian</label><br />
|
877 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsst" name="incl_langs[]" value="st" checked><label for="incl_langsst">Sesotho</label><br />
|
878 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssn" name="incl_langs[]" value="sn" checked><label for="incl_langssn">Shona</label><br />
|
879 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssd" name="incl_langs[]" value="sd" checked><label for="incl_langssd">Sindhi</label><br />
|
880 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssi" name="incl_langs[]" value="si" checked><label for="incl_langssi">Sinhala</label><br />
|
881 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssk" name="incl_langs[]" value="sk" checked><label for="incl_langssk">Slovak</label><br />
|
882 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssl" name="incl_langs[]" value="sl" checked><label for="incl_langssl">Slovenian</label><br />
|
883 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsso" name="incl_langs[]" value="so" checked><label for="incl_langsso">Somali</label><br />
|
884 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langses" name="incl_langs[]" value="es" checked><label for="incl_langses">Spanish</label><br />
|
885 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssu" name="incl_langs[]" value="su" checked><label for="incl_langssu">Sudanese</label><br />
|
886 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssw" name="incl_langs[]" value="sw" checked><label for="incl_langssw">Swahili</label><br />
|
887 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langssv" name="incl_langs[]" value="sv" checked><label for="incl_langssv">Swedish</label><br />
|
888 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langstg" name="incl_langs[]" value="tg" checked><label for="incl_langstg">Tajik</label><br />
|
889 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsta" name="incl_langs[]" value="ta" checked><label for="incl_langsta">Tamil</label><br />
|
890 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langste" name="incl_langs[]" value="te" checked><label for="incl_langste">Telugu</label><br />
|
891 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsth" name="incl_langs[]" value="th" checked><label for="incl_langsth">Thai</label><br />
|
892 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langstr" name="incl_langs[]" value="tr" checked><label for="incl_langstr">Turkish</label><br />
|
893 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsuk" name="incl_langs[]" value="uk" checked><label for="incl_langsuk">Ukrainian</label><br />
|
894 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsur" name="incl_langs[]" value="ur" checked><label for="incl_langsur">Urdu</label><br />
|
895 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsuz" name="incl_langs[]" value="uz" checked><label for="incl_langsuz">Uzbek</label><br />
|
896 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsvi" name="incl_langs[]" value="vi" checked><label for="incl_langsvi">Vietnamese</label><br />
|
897 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langscy" name="incl_langs[]" value="cy" checked><label for="incl_langscy">Welsh</label><br />
|
898 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsxh" name="incl_langs[]" value="xh" checked><label for="incl_langsxh">Xhosa</label><br />
|
899 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsyi" name="incl_langs[]" value="yi" checked><label for="incl_langsyi">Yiddish</label><br />
|
900 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langsyo" name="incl_langs[]" value="yo" checked><label for="incl_langsyo">Yoruba</label><br />
|
901 |
-
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langszu" name="incl_langs[]" value="zu" checked><label for="incl_langszu">Zulu</label><br />
|
902 |
-
</div>
|
903 |
</div>
|
904 |
</td>
|
905 |
</tr>
|
@@ -910,15 +915,17 @@ foreach($alt_flags as $flag)
|
|
910 |
|
911 |
<div id="poststuff">
|
912 |
<div class="postbox">
|
913 |
-
<h3 id="settings"
|
914 |
<div class="inside">
|
915 |
-
<span style="color:red;"
|
916 |
-
You can edit this if you wish
|
917 |
<textarea id="widget_code" name="widget_code" onchange="ShowWidgetPreview(this.value)" style="font-family:Monospace;font-size:11px;height:150px;width:565px;"><?php echo $widget_code; ?></textarea>
|
918 |
</div>
|
919 |
</div>
|
920 |
</div>
|
921 |
|
|
|
|
|
922 |
<?php wp_nonce_field('gtranslate-save'); ?>
|
923 |
<p class="submit"><input type="submit" class="button-primary" name="save" value="<?php _e('Save Changes'); ?>" /></p>
|
924 |
|
@@ -929,7 +936,7 @@ foreach($alt_flags as $flag)
|
|
929 |
<div class="postbox-container og_right_col">
|
930 |
<div id="poststuff">
|
931 |
<div class="postbox">
|
932 |
-
<h3 id="settings"
|
933 |
<div class="inside">
|
934 |
<div id="widget_preview"></div>
|
935 |
</div>
|
@@ -938,9 +945,9 @@ foreach($alt_flags as $flag)
|
|
938 |
|
939 |
<div id="poststuff">
|
940 |
<div class="postbox">
|
941 |
-
<h3 id="settings"
|
942 |
<div class="inside">
|
943 |
-
<p
|
944 |
|
945 |
<div id="fb-root"></div>
|
946 |
<script>(function(d, s, id) {
|
@@ -959,28 +966,28 @@ foreach($alt_flags as $flag)
|
|
959 |
|
960 |
<div id="poststuff">
|
961 |
<div class="postbox">
|
962 |
-
<h3 id="settings"
|
963 |
<div class="inside">
|
964 |
-
Upgrade to <a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">GTranslate Enterprise</a> to have the following features
|
965 |
<ul style="list-style-type: square;padding-left:40px;">
|
966 |
-
<li
|
967 |
-
<li
|
968 |
-
<li
|
969 |
-
<li
|
970 |
-
<li
|
971 |
-
<li
|
972 |
-
<li
|
973 |
-
<li
|
974 |
-
<li
|
975 |
</ul>
|
976 |
|
977 |
-
<a href="https://gtranslate.io/?xyz=998#pricing" target="_blank"
|
978 |
</div>
|
979 |
</div>
|
980 |
</div>
|
981 |
<div id="poststuff">
|
982 |
<div class="postbox">
|
983 |
-
<h3 id="settings"
|
984 |
<div class="inside">
|
985 |
<iframe src="//player.vimeo.com/video/30132555?title=1&byline=0&portrait=0" width="568" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
986 |
</div>
|
@@ -988,7 +995,7 @@ foreach($alt_flags as $flag)
|
|
988 |
</div>
|
989 |
<div id="poststuff">
|
990 |
<div class="postbox">
|
991 |
-
<h3 id="settings"
|
992 |
<div class="inside">
|
993 |
<iframe src="//player.vimeo.com/video/38686858?title=1&byline=0&portrait=0" width="568" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
994 |
</div>
|
@@ -1012,6 +1019,9 @@ foreach($alt_flags as $flag)
|
|
1012 |
table.form-table .dashicons-twitter { color: #55ACEE; }
|
1013 |
table.form-table .dashicons-rss { color: #FF6600; }
|
1014 |
table.form-table .dashicons-admin-site, table.form-table .dashicons-admin-generic { color: #666; }
|
|
|
|
|
|
|
1015 |
</style>
|
1016 |
|
1017 |
<!-- Live Chat for GTranslate -->
|
@@ -1039,8 +1049,10 @@ foreach($alt_flags as $flag)
|
|
1039 |
$data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array('en');
|
1040 |
$data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array('en');
|
1041 |
$data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
|
|
|
|
|
1042 |
|
1043 |
-
echo '<p style="color:red;">Changes Saved</p>';
|
1044 |
update_option('GTranslate', $data);
|
1045 |
}
|
1046 |
|
@@ -1063,99 +1075,101 @@ foreach($alt_flags as $flag)
|
|
1063 |
$data['incl_langs'] = isset($data['incl_langs']) ? $data['incl_langs'] : array();
|
1064 |
$data['fincl_langs'] = isset($data['fincl_langs']) ? $data['fincl_langs'] : array();
|
1065 |
$data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
|
|
|
|
|
1066 |
}
|
1067 |
}
|
1068 |
|
1069 |
class GTranslate_Notices {
|
1070 |
protected $prefix = 'gtranslate';
|
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 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
if ($admin_display_check == 0 and strtotime($admin_display_start) <= strtotime($current_date)) {
|
1155 |
-
|
1156 |
-
|
1157 |
|
1158 |
-
|
1159 |
echo '<div class="update-nag gt-admin-notice">';
|
1160 |
echo '<div class="gt-notice-logo"></div>';
|
1161 |
echo ' <p class="gt-notice-title">';
|
@@ -1170,187 +1184,187 @@ class GTranslate_Notices {
|
|
1170 |
echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>';
|
1171 |
echo '</div>';
|
1172 |
|
1173 |
-
|
1174 |
-
|
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 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
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 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
|
1265 |
public function gt_admin_notices() {
|
1266 |
-
|
1267 |
|
1268 |
$notices['one_week_support'] = array(
|
1269 |
-
'title' => 'Hey! How is it going?',
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
GTranslate::load_defaults($data);
|
1293 |
|
1294 |
$upgrade_tips_ignore = esc_url(add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'upgrade_tips')));
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
}
|
1352 |
|
1353 |
-
|
1354 |
-
|
1355 |
|
1356 |
}
|
2 |
/*
|
3 |
Plugin Name: GTranslate
|
4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
5 |
+
Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
|
6 |
+
Version: 2.8.1
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
9 |
+
Text Domain: gtranslate
|
10 |
|
11 |
*/
|
12 |
|
33 |
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array('GTranslate', 'settings_link'));
|
34 |
add_action('admin_menu', array('GTranslate', 'admin_menu'));
|
35 |
add_action('init', array('GTranslate', 'enqueue_scripts'));
|
36 |
+
add_action('plugins_loaded', array('GTranslate', 'load_textdomain'));
|
37 |
add_shortcode('GTranslate', array('GTranslate', 'get_widget_code'));
|
38 |
add_shortcode('gtranslate', array('GTranslate', 'get_widget_code'));
|
39 |
|
50 |
if($data['show_in_primary_menu']) {
|
51 |
add_filter('wp_nav_menu_items', 'gtranslate_menu_item', 10, 2);
|
52 |
function gtranslate_menu_item($items, $args) {
|
53 |
+
if($args->theme_location == 'primary')
|
54 |
+
$items .= '<li style="position:relative;" class="menu-item menu-item-gtranslate"><div style="position:absolute;">'.GTranslate::get_widget_code(false).'</div></li>';
|
55 |
return $items;
|
56 |
}
|
57 |
}
|
59 |
class GTranslate extends WP_Widget {
|
60 |
public static function activate() {
|
61 |
$data = array(
|
62 |
+
'gtranslate_title' => __('Website Translator', 'gtranslate'),
|
63 |
);
|
64 |
$data = get_option('GTranslate');
|
65 |
GTranslate::load_defaults($data);
|
72 |
}
|
73 |
|
74 |
public static function settings_link($links) {
|
75 |
+
$settings_link = array('<a href="' . admin_url('options-general.php?page=gtranslate_options') . '">'.__('Settings', 'gtranslate').'</a>');
|
76 |
return array_merge($links, $settings_link);
|
77 |
}
|
78 |
|
79 |
public static function control() {
|
80 |
$data = get_option('GTranslate');
|
81 |
?>
|
82 |
+
<p><label><?php _e('Title', 'gtranslate'); ?>: <input name="gtranslate_title" type="text" class="widefat" value="<?php echo $data['gtranslate_title']; ?>"/></label></p>
|
83 |
+
<p><?php _e('Please go to Settings -> GTranslate for configuration.', 'gtranslate'); ?></p>
|
84 |
<?php
|
85 |
if (isset($_POST['gtranslate_title'])){
|
86 |
$data['gtranslate_title'] = esc_attr($_POST['gtranslate_title']);
|
96 |
wp_enqueue_script('jquery');
|
97 |
}
|
98 |
|
99 |
+
public static function load_textdomain() {
|
100 |
+
load_plugin_textdomain('gtranslate');
|
101 |
+
}
|
102 |
+
|
103 |
public function widget($args, $instance) {
|
104 |
$data = get_option('GTranslate');
|
105 |
GTranslate::load_defaults($data);
|
107 |
echo $args['before_widget'];
|
108 |
echo $args['before_title'] . $data['gtranslate_title'] . $args['after_title'];
|
109 |
if(empty($data['widget_code']))
|
110 |
+
_e('<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.', 'gtranslate');
|
111 |
else
|
112 |
echo $data['widget_code'];
|
113 |
|
114 |
if(isset($_SERVER['HTTP_X_GT_LANG']) and in_array($_SERVER['HTTP_X_GT_LANG'], array('en','ar','bg','zh-CN','zh-TW','zh-cn','zh-tw','hr','cs','da','nl','fi','fr','de','el','hi','it','ja','ko','no','pl','pt','ro','ru','es','sv','ca','tl','iw','id','lv','lt','sr','sk','sl','uk','vi','sq','et','gl','hu','mt','th','tr','fa','af','ms','sw','ga','cy','be','is','mk','yi','hy','az','eu','ka','ht','ur','bn','bs','ceb','eo','gu','ha','hmn','ig','jw','kn','km','lo','la','mi','mr','mn','ne','pa','so','ta','te','yo','zu','my','ny','kk','mg','ml','si','st','su','tg','uz','am','co','haw','ku','ky','lb','ps','sm','gd','sn','sd','fy','xh'))) {
|
115 |
+
echo '<script>jQuery(document).ready(function() {jQuery(\'.switcher div.selected a\').html(jQuery(".switcher div.option a[onclick*=\'|'.esc_js($_SERVER['HTTP_X_GT_LANG']).'\']").html())});</script>';
|
116 |
+
}
|
117 |
|
118 |
echo $args['after_widget'];
|
119 |
}
|
125 |
echo $args['before_widget'];
|
126 |
echo $args['before_title'] . $data['gtranslate_title'] . $args['after_title'];
|
127 |
if(empty($data['widget_code']))
|
128 |
+
_e('<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.', 'gtranslate');
|
129 |
else
|
130 |
echo $data['widget_code'];
|
131 |
|
132 |
if(isset($_SERVER['HTTP_X_GT_LANG']) and in_array($_SERVER['HTTP_X_GT_LANG'], array('en','ar','bg','zh-CN','zh-TW','zh-cn','zh-tw','hr','cs','da','nl','fi','fr','de','el','hi','it','ja','ko','no','pl','pt','ro','ru','es','sv','ca','tl','iw','id','lv','lt','sr','sk','sl','uk','vi','sq','et','gl','hu','mt','th','tr','fa','af','ms','sw','ga','cy','be','is','mk','yi','hy','az','eu','ka','ht','ur','bn','bs','ceb','eo','gu','ha','hmn','ig','jw','kn','km','lo','la','mi','mr','mn','ne','pa','so','ta','te','yo','zu','my','ny','kk','mg','ml','si','st','su','tg','uz','am','co','haw','ku','ky','lb','ps','sm','gd','sn','sd','fy','xh'))) {
|
133 |
+
echo '<script>jQuery(document).ready(function() {jQuery(\'.switcher div.selected a\').html(jQuery(".switcher div.option a[onclick*=\'|'.esc_js($_SERVER['HTTP_X_GT_LANG']).'\']").html())});</script>';
|
134 |
+
}
|
135 |
|
136 |
echo $args['after_widget'];
|
137 |
}
|
141 |
GTranslate::load_defaults($data);
|
142 |
|
143 |
if(empty($data['widget_code']))
|
144 |
+
return __('<b>Notice:</b> Please configure GTranslate from WP-Admin -> Settings -> GTranslate to see it in action.', 'gtranslate');
|
145 |
else {
|
146 |
+
if(isset($_SERVER['HTTP_X_GT_LANG']) and in_array($_SERVER['HTTP_X_GT_LANG'], array('en','ar','bg','zh-CN','zh-TW','zh-cn','zh-tw','hr','cs','da','nl','fi','fr','de','el','hi','it','ja','ko','no','pl','pt','ro','ru','es','sv','ca','tl','iw','id','lv','lt','sr','sk','sl','uk','vi','sq','et','gl','hu','mt','th','tr','fa','af','ms','sw','ga','cy','be','is','mk','yi','hy','az','eu','ka','ht','ur','bn','bs','ceb','eo','gu','ha','hmn','ig','jw','kn','km','lo','la','mi','mr','mn','ne','pa','so','ta','te','yo','zu','my','ny','kk','mg','ml','si','st','su','tg','uz','am','co','haw','ku','ky','lb','ps','sm','gd','sn','sd','fy','xh'))) {
|
147 |
+
return $data['widget_code'] . '<script>jQuery(document).ready(function() {jQuery(\'.switcher div.selected a\').html(jQuery(".switcher div.option a[onclick*=\'|'.esc_js($_SERVER['HTTP_X_GT_LANG']).'\']").html())});</script>';
|
148 |
+
} else
|
149 |
+
return $data['widget_code'];
|
150 |
}
|
151 |
}
|
152 |
|
156 |
}
|
157 |
|
158 |
public static function admin_menu() {
|
159 |
+
add_options_page(__('GTranslate Options', 'gtranslate'), 'GTranslate', 'administrator', 'gtranslate_options', array('GTranslate', 'options'));
|
160 |
}
|
161 |
|
162 |
public static function options() {
|
163 |
?>
|
164 |
<div class="wrap">
|
165 |
<div id="icon-options-general" class="icon32"><br/></div>
|
166 |
+
<h2><img src="<?php echo plugins_url('gt-logo.png', __FILE__); ?>" border="0" title="<?php _e('GTranslate - your window to the world', 'gtranslate'); ?>" alt="GTranslate"></h2>
|
167 |
<?php
|
168 |
if(isset($_POST['save']) and $_POST['save'])
|
169 |
GTranslate::control_options();
|
170 |
$data = get_option('GTranslate');
|
171 |
GTranslate::load_defaults($data);
|
172 |
|
173 |
+
wp_enqueue_script('jquery-ui-sortable');
|
174 |
+
|
175 |
$site_url = site_url();
|
176 |
$wp_plugin_url = plugins_url() . '/gtranslate';
|
177 |
|
178 |
extract($data);
|
179 |
|
180 |
+
$gt_lang_array_json = '{"af":"Afrikaans","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","az":"Azerbaijani","eu":"Basque","be":"Belarusian","bn":"Bengali","bs":"Bosnian","bg":"Bulgarian","ca":"Catalan","ceb":"Cebuano","ny":"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","tl":"Filipino","fi":"Finnish","fr":"French","fy":"Frisian","gl":"Galician","ka":"Georgian","de":"German","el":"Greek","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jw":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","ko":"Korean","ku":"Kurdish (Kurmanji)","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Maori","mr":"Marathi","mn":"Mongolian","my":"Myanmar (Burmese)","ne":"Nepali","no":"Norwegian","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","ro":"Romanian","ru":"Russian","sm":"Samoan","gd":"Scottish Gaelic","sr":"Serbian","st":"Sesotho","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","es":"Spanish","su":"Sudanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","te":"Telugu","th":"Thai","tr":"Turkish","uk":"Ukrainian","ur":"Urdu","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"}';
|
181 |
+
$gt_lang_array = get_object_vars(json_decode($gt_lang_array_json));
|
182 |
+
|
183 |
+
if(!empty($language_codes))
|
184 |
+
$gt_lang_codes_json = json_encode(explode(',', $language_codes));
|
185 |
+
else
|
186 |
+
$gt_lang_codes_json = '[]';
|
187 |
+
|
188 |
+
if(!empty($language_codes2))
|
189 |
+
$gt_lang_codes2_json = json_encode(explode(',', $language_codes2));
|
190 |
+
else
|
191 |
+
$gt_lang_codes2_json = '[]';
|
192 |
+
|
193 |
+
|
194 |
#unset($data['widget_code']);
|
195 |
#echo '<pre>', print_r($data, true), '</pre>';
|
196 |
|
197 |
$script = <<<EOT
|
198 |
|
199 |
+
var gt_lang_array = $gt_lang_array_json;
|
200 |
+
var languages = [], language_codes = $gt_lang_codes_json, language_codes2 = $gt_lang_codes2_json;
|
201 |
+
|
202 |
+
//for(var key in gt_lang_array)
|
203 |
+
// languages.push(gt_lang_array[key]);
|
204 |
+
if(language_codes.length == 0)
|
205 |
+
for(var key in gt_lang_array)
|
206 |
+
language_codes.push(key);
|
207 |
+
if(language_codes2.length == 0)
|
208 |
+
for(var key in gt_lang_array)
|
209 |
+
language_codes2.push(key);
|
210 |
+
|
211 |
var languages_map = {en_x: 0, en_y: 0, ar_x: 100, ar_y: 0, bg_x: 200, bg_y: 0, zhCN_x: 300, zhCN_y: 0, zhTW_x: 400, zhTW_y: 0, hr_x: 500, hr_y: 0, cs_x: 600, cs_y: 0, da_x: 700, da_y: 0, nl_x: 0, nl_y: 100, fi_x: 100, fi_y: 100, fr_x: 200, fr_y: 100, de_x: 300, de_y: 100, el_x: 400, el_y: 100, hi_x: 500, hi_y: 100, it_x: 600, it_y: 100, ja_x: 700, ja_y: 100, ko_x: 0, ko_y: 200, no_x: 100, no_y: 200, pl_x: 200, pl_y: 200, pt_x: 300, pt_y: 200, ro_x: 400, ro_y: 200, ru_x: 500, ru_y: 200, es_x: 600, es_y: 200, sv_x: 700, sv_y: 200, ca_x: 0, ca_y: 300, tl_x: 100, tl_y: 300, iw_x: 200, iw_y: 300, id_x: 300, id_y: 300, lv_x: 400, lv_y: 300, lt_x: 500, lt_y: 300, sr_x: 600, sr_y: 300, sk_x: 700, sk_y: 300, sl_x: 0, sl_y: 400, uk_x: 100, uk_y: 400, vi_x: 200, vi_y: 400, sq_x: 300, sq_y: 400, et_x: 400, et_y: 400, gl_x: 500, gl_y: 400, hu_x: 600, hu_y: 400, mt_x: 700, mt_y: 400, th_x: 0, th_y: 500, tr_x: 100, tr_y: 500, fa_x: 200, fa_y: 500, af_x: 300, af_y: 500, ms_x: 400, ms_y: 500, sw_x: 500, sw_y: 500, ga_x: 600, ga_y: 500, cy_x: 700, cy_y: 500, be_x: 0, be_y: 600, is_x: 100, is_y: 600, mk_x: 200, mk_y: 600, yi_x: 300, yi_y: 600, hy_x: 400, hy_y: 600, az_x: 500, az_y: 600, eu_x: 600, eu_y: 600, ka_x: 700, ka_y: 600, ht_x: 0, ht_y: 700, ur_x: 100, ur_y: 700};
|
212 |
|
213 |
function RefreshDoWidgetCode() {
|
231 |
jQuery('#new_window_option').hide();
|
232 |
}
|
233 |
|
234 |
+
if(widget_look == 'dropdown' || widget_look == 'flags_dropdown' || widget_look == 'globe') {
|
235 |
jQuery('#dropdown_languages_option').show();
|
236 |
} else {
|
237 |
jQuery('#dropdown_languages_option').hide();
|
238 |
}
|
239 |
|
240 |
+
if(widget_look == 'globe') {
|
241 |
+
jQuery('#alternative_flags_option').show();
|
242 |
+
} else {
|
243 |
+
jQuery('#alternative_flags_option').hide();
|
244 |
+
}
|
245 |
+
|
246 |
if(widget_look == 'flags' || widget_look == 'flags_dropdown' || widget_look == 'dropdown_with_flags') {
|
247 |
jQuery('#flag_languages_option').show();
|
248 |
+
jQuery('#alternative_flags_option').show();
|
249 |
} else {
|
250 |
jQuery('#flag_languages_option').hide();
|
251 |
+
if(widget_look != 'globe')
|
252 |
+
jQuery('#alternative_flags_option').hide();
|
253 |
}
|
254 |
|
255 |
if(widget_look == 'flags' || widget_look == 'dropdown' || widget_look == 'dropdown_with_flags') {
|
269 |
|
270 |
if(translation_method == 'google_default') {
|
271 |
included_languages = '';
|
272 |
+
jQuery.each(language_codes2, function(i, val) {
|
273 |
+
lang = language_codes2[i];
|
274 |
if(jQuery('#incl_langs'+lang+':checked').length) {
|
275 |
+
lang_name = gt_lang_array[lang];
|
276 |
included_languages += ','+lang;
|
277 |
}
|
278 |
});
|
292 |
// Adding flags
|
293 |
if(widget_look == 'flags' || widget_look == 'flags_dropdown' /* jQuery('#show_flags:checked').length */) {
|
294 |
//console.log('adding flags');
|
295 |
+
jQuery.each(language_codes, function(i, val) {
|
296 |
lang = language_codes[i];
|
297 |
if(jQuery('#fincl_langs'+lang+':checked').length) {
|
298 |
+
lang_name = gt_lang_array[lang];
|
299 |
flag_x = languages_map[lang.replace('-', '')+'_x'];
|
300 |
flag_y = languages_map[lang.replace('-', '')+'_y'];
|
301 |
|
306 |
href = (lang == default_language) ? '$site_url' : '$site_url'.replace('$site_url'.split('/').slice(2, 3)[0].replace('www.', ''), lang + '.' + '$site_url'.split('/').slice(2, 3)[0].replace('www.', '')).replace('://www.', '://');
|
307 |
|
308 |
if(lang == 'en' && jQuery('#alt_us:checked').length)
|
309 |
+
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl alt_flag us_flag"><img src="{$wp_plugin_url}/blank.png" height="'+flag_size+'" width="'+flag_size+'" alt="'+lang_name+'" /></a>';
|
310 |
else if(lang == 'pt' && jQuery('#alt_br:checked').length)
|
311 |
+
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl alt_flag br_flag"><img src="{$wp_plugin_url}/blank.png" height="'+flag_size+'" width="'+flag_size+'" alt="'+lang_name+'" /></a>';
|
312 |
else if(lang == 'es' && jQuery('#alt_mx:checked').length)
|
313 |
+
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl alt_flag mx_flag"><img src="{$wp_plugin_url}/blank.png" height="'+flag_size+'" width="'+flag_size+'" alt="'+lang_name+'" /></a>';
|
314 |
else
|
315 |
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl" style="background-position:-'+flag_x+'px -'+flag_y+'px;"><img src="{$wp_plugin_url}/blank.png" height="'+flag_size+'" width="'+flag_size+'" alt="'+lang_name+'" /></a>';
|
316 |
}
|
326 |
widget_preview += ' ';
|
327 |
widget_preview += '<select onchange="doGTranslate(this);">';
|
328 |
widget_preview += '<option value="">Select Language</option>';
|
329 |
+
jQuery.each(language_codes2, function(i, val) {
|
330 |
+
lang = language_codes2[i];
|
331 |
if(jQuery('#incl_langs'+lang+':checked').length) {
|
332 |
+
lang_name = gt_lang_array[lang];
|
333 |
widget_preview += '<option value="'+default_language+'|'+lang+'">'+lang_name+'</option>';
|
334 |
}
|
335 |
});
|
355 |
widget_code += default_language;
|
356 |
widget_code += '\',autoDisplay: false';
|
357 |
//if(analytics)
|
358 |
+
// widget_code += ",gaTrack: (typeof ga!='undefined'),gaId: (typeof ga!='undefined' ? ga.getAll()[0].get('trackingId') : '')";
|
359 |
widget_code += "}, 'google_translate_element2');}"+new_line;
|
360 |
widget_code += '<\/script>';
|
361 |
widget_code += '<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"><\/script>'+new_line;
|
362 |
}
|
363 |
|
364 |
+
if(widget_look == 'globe') {
|
365 |
+
widget_preview += '<span class="gsatelites"></span><span class="gglobe"></span>';
|
366 |
+
|
367 |
+
// Adding css
|
368 |
+
widget_preview += '<style type="text/css">'+new_line;
|
369 |
+
widget_preview += '.gglobe {background-image:url($wp_plugin_url/gtglobe.svg);opacity:0.8;border-radius:50%;height:40px;width:40px;cursor:pointer;display:block;-moz-transition: all 0.3s;-webkit-transition: all 0.3s;transition: all 0.3s;}'+new_line;
|
370 |
+
widget_preview += '.gglobe:hover {opacity:1;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);transform: scale(1.2);}'+new_line;
|
371 |
+
//widget_preview += '.gsatelites {position:relative;}'+new_line;
|
372 |
+
widget_preview += '.gsatelite {background-color:#777777;opacity:0.95;border-radius:50%;height:24px;width:24px;cursor:pointer;position:absolute;z-index:100000;display:none;-moz-transition: all 0.3s;-webkit-transition: all 0.3s;transition: all 0.3s;}'+new_line;
|
373 |
+
widget_preview += '.gsatelite:hover {opacity:1;-moz-transform: scale(1.3);-webkit-transform: scale(1.3);transform: scale(1.3);}'+new_line;
|
374 |
+
widget_preview += '</style>'+new_line+new_line;
|
375 |
+
|
376 |
+
// Adding javascript
|
377 |
+
widget_preview += '<script type="text/javascript">'+new_line;
|
378 |
+
widget_preview += `function renderGSatelites($, e) {
|
379 |
+
$('.gsatelite').remove();
|
380 |
+
|
381 |
+
var centerPosition = $('.gglobe').position();
|
382 |
+
centerPosition.left += Math.floor($('.gglobe').width() / 2) - 10;
|
383 |
+
centerPosition.top += Math.floor($('.gglobe').height() / 2) - 10;
|
384 |
+
|
385 |
+
var language_codes = `+JSON.stringify(jQuery(".connectedSortable2 li input:checked").map(function() {return jQuery(this).val();}).toArray())+`;
|
386 |
+
var languages = `+JSON.stringify((function(){var langs = [], selected_lang_codes = jQuery(".connectedSortable2 li input:checked").map(function() {return jQuery(this).val();}).toArray();for(var key in selected_lang_codes)langs.push(gt_lang_array[selected_lang_codes[key]]);return langs;})())+`;
|
387 |
+
var us_flag = `+(jQuery('#alt_us:checked').length ? 'true' : 'false')+`;
|
388 |
+
var br_flag = `+(jQuery('#alt_br:checked').length ? 'true' : 'false')+`;
|
389 |
+
var mx_flag = `+(jQuery('#alt_mx:checked').length ? 'true' : 'false')+`;
|
390 |
+
|
391 |
+
var count = language_codes.length, r0 = 55, r = r0, d = 34, cntpc = 12, nc = 0, m = 1.75;
|
392 |
+
cntpc = 2 * Math.PI * r0 / 34;
|
393 |
+
for (var i = 0, j = 0; i < count; i++, j++) {
|
394 |
+
var x, y, angle;
|
395 |
+
|
396 |
+
|
397 |
+
// circle
|
398 |
+
do {
|
399 |
+
|
400 |
+
if (j + 1 > Math.round(2 * r0 * Math.PI / d) * (nc + 1) * (nc + 2) / 2) {
|
401 |
+
nc++;
|
402 |
+
r = r + r0;
|
403 |
+
cntpc = Math.floor(2 * Math.PI * r / d);
|
404 |
+
}
|
405 |
+
|
406 |
+
angle = j * 2 * Math.PI / cntpc + Math.PI / 4;
|
407 |
+
x = centerPosition.left + Math.cos(angle) * r;
|
408 |
+
y = centerPosition.top + Math.sin(angle) * r;
|
409 |
+
|
410 |
+
var positionGSatelites = $('.gsatelites').offset(),
|
411 |
+
vpHeight = $(window).height(),
|
412 |
+
vpWidth = $(window).width(),
|
413 |
+
tpViz = positionGSatelites.top + y >= 0 && positionGSatelites.top + y < vpHeight,
|
414 |
+
btViz = positionGSatelites.top + y + 24 > 0 && positionGSatelites.top + y + 24 <= vpHeight,
|
415 |
+
ltViz = positionGSatelites.left + x >= 0 && positionGSatelites.left + x < vpWidth,
|
416 |
+
rtViz = positionGSatelites.left + x + 24 > 0 && positionGSatelites.left + x + 24 <= vpWidth,
|
417 |
+
vVisible = tpViz && btViz,
|
418 |
+
hVisible = ltViz && rtViz;
|
419 |
+
|
420 |
+
if (vVisible && hVisible) {
|
421 |
+
break;
|
422 |
+
} else {
|
423 |
+
j++;
|
424 |
+
}
|
425 |
+
} while (j - i < 10 * count);
|
426 |
+
|
427 |
+
|
428 |
+
$('.gsatelites').append('<span class="gsatelite gs' + (i + 1) + ' glang_' + language_codes[i] + '" onclick="doGTranslate(`+"\\\\'"+default_language+`|'+language_codes[i]+'`+"\\\\'"+`)" title="' + languages[i] + '" style="background-image:url($wp_plugin_url/24/' + (function(l){if(l == 'en' && us_flag)return 'en-us';if(l == 'pt' && br_flag)return 'pt-br';if(l == 'es' && mx_flag)return 'es-mx';return l;})(language_codes[i]) + '.png);left:' + x + 'px;top:' + y + 'px;"></span>');
|
429 |
+
$('.gs' + (i + 1)).delay((i + 1) * 10).fadeIn('fast');
|
430 |
+
|
431 |
+
}
|
432 |
+
}
|
433 |
+
|
434 |
+
function hideGSatelites($) {
|
435 |
+
$('.gsatelite').each(function(i) {
|
436 |
+
$(this).delay(($('.gsatelite').length - i - 1) * 10).fadeOut('fast');
|
437 |
+
});
|
438 |
+
}
|
439 |
+
(function($) {
|
440 |
+
$('body').click(function() {
|
441 |
+
hideGSatelites($);
|
442 |
+
});
|
443 |
+
$('.gglobe').click(function(e) {
|
444 |
+
e.stopPropagation();
|
445 |
+
renderGSatelites($, e);
|
446 |
+
});
|
447 |
+
})(jQuery);
|
448 |
+
`;
|
449 |
+
widget_preview += '<\/script>'+new_line;
|
450 |
+
}
|
451 |
+
|
452 |
if(widget_look == 'dropdown_with_flags') {
|
453 |
// Adding slider html
|
454 |
widget_preview += '<div class="switcher notranslate">'+new_line;
|
455 |
widget_preview += '<div class="selected">'+new_line;
|
456 |
if(default_language == 'en' && jQuery('#alt_us:checked').length)
|
457 |
+
widget_preview += '<a href="#" onclick="return false;"><span class="gflag" style="background-image:url($wp_plugin_url/alt_flags.png);background-position:-0px -0px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+default_language+'" /></span>'+gt_lang_array[default_language]+'</a>'+new_line;
|
458 |
else if(default_language == 'pt' && jQuery('#alt_br:checked').length)
|
459 |
+
widget_preview += '<a href="#" onclick="return false;"><span class="gflag" style="background-image:url($wp_plugin_url/alt_flags.png);background-position:-100px -0px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+default_language+'" /></span>'+gt_lang_array[default_language]+'</a>'+new_line;
|
460 |
else if(default_language == 'es' && jQuery('#alt_mx:checked').length)
|
461 |
+
widget_preview += '<a href="#" onclick="return false;"><span class="gflag" style="background-image:url($wp_plugin_url/alt_flags.png);background-position:-200px -0px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+default_language+'" /></span>'+gt_lang_array[default_language]+'</a>'+new_line;
|
462 |
else
|
463 |
+
widget_preview += '<a href="#" onclick="return false;"><span class="gflag" style="background-position:-'+languages_map[default_language.replace('-', '')+'_x']+'px -'+languages_map[default_language.replace('-', '')+'_y']+'px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+default_language+'" /></span>'+gt_lang_array[default_language]+'</a>'+new_line;
|
464 |
widget_preview += '</div>'+new_line;
|
465 |
widget_preview += '<div class="option">'+new_line;
|
466 |
+
jQuery.each(language_codes, function(i, val) {
|
467 |
lang = language_codes[i];
|
468 |
if(jQuery('#fincl_langs'+lang+':checked').length) {
|
469 |
+
lang_name = gt_lang_array[lang];
|
470 |
flag_x = languages_map[lang.replace('-', '')+'_x'];
|
471 |
flag_y = languages_map[lang.replace('-', '')+'_y'];
|
472 |
|
477 |
href = (lang == default_language) ? '$site_url' : '$site_url'.replace('$site_url'.split('/').slice(2, 3)[0].replace('www.', ''), lang + '.' + '$site_url'.split('/').slice(2, 3)[0].replace('www.', '')).replace('://www.', '://');
|
478 |
|
479 |
if(lang == 'en' && jQuery('#alt_us:checked').length)
|
480 |
+
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');jQuery(this).parent().parent().find(\'div.selected a\').html(jQuery(this).html());return false;" title="'+lang_name+'" class="nturl'+(default_language == lang ? ' selected' : '')+'"><span class="gflag" style="background-image:url($wp_plugin_url/alt_flags.png);background-position:-0px -0px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+lang+'" /></span>'+lang_name+'</a>';
|
481 |
else if(lang == 'pt' && jQuery('#alt_br:checked').length)
|
482 |
+
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');jQuery(this).parent().parent().find(\'div.selected a\').html(jQuery(this).html());return false;" title="'+lang_name+'" class="nturl'+(default_language == lang ? ' selected' : '')+'"><span class="gflag" style="background-image:url($wp_plugin_url/alt_flags.png);background-position:-100px -0px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+lang+'" /></span>'+lang_name+'</a>';
|
483 |
else if(lang == 'es' && jQuery('#alt_mx:checked').length)
|
484 |
+
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');jQuery(this).parent().parent().find(\'div.selected a\').html(jQuery(this).html());return false;" title="'+lang_name+'" class="nturl'+(default_language == lang ? ' selected' : '')+'"><span class="gflag" style="background-image:url($wp_plugin_url/alt_flags.png);background-position:-200px -0px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+lang+'" /></span>'+lang_name+'</a>';
|
485 |
else
|
486 |
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');jQuery(this).parent().parent().find(\'div.selected a\').html(jQuery(this).html());return false;" title="'+lang_name+'" class="nturl'+(default_language == lang ? ' selected' : '')+'"><span class="gflag" style="background-position:-'+flag_x+'px -'+flag_y+'px;"><img src="$wp_plugin_url/blank.png" height="'+16+'" width="'+16+'" alt="'+lang+'" /></span>'+lang_name+'</a>';
|
487 |
}
|
498 |
|
499 |
// Adding slider css
|
500 |
widget_preview += '<style type="text/css">'+new_line;
|
|
|
501 |
widget_preview += 'span.gflag {font-size:16px;padding:1px 0;background-repeat:no-repeat;background-image:url($wp_plugin_url/16.png);}'+new_line;
|
502 |
widget_preview += 'span.gflag img {border:0;margin-top:2px;}'+new_line;
|
503 |
+
widget_preview += '.switcher {font-family:Arial;font-size:10pt;text-align:left;cursor:pointer;overflow:hidden;width:163px;line-height:17px;}'+new_line;
|
504 |
widget_preview += '.switcher a {text-decoration:none;display:block;font-size:10pt;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}'+new_line;
|
505 |
widget_preview += '.switcher a span.gflag {margin-right:3px;padding:0;display:block;float:left;}'+new_line;
|
506 |
widget_preview += '.switcher .selected {background:#FFFFFF url($wp_plugin_url/switcher.png) repeat-x;position:relative;z-index:9999;}'+new_line;
|
507 |
widget_preview += '.switcher .selected a {border:1px solid #CCCCCC;background:url($wp_plugin_url/arrow_down.png) 146px center no-repeat;color:#666666;padding:3px 5px;width:151px;}'+new_line;
|
508 |
widget_preview += '.switcher .selected a:hover {background:#F0F0F0 url($wp_plugin_url/arrow_down.png) 146px center no-repeat;}'+new_line;
|
509 |
+
widget_preview += '.switcher .option {position:relative;z-index:9998;border-left:1px solid #CCCCCC;border-right:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;background-color:#EEEEEE;display:none;width:161px;max-height:198px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;overflow-y:auto;overflow-x:hidden;}'+new_line;
|
510 |
widget_preview += '.switcher .option a {color:#000;padding:3px 5px;}'+new_line;
|
511 |
widget_preview += '.switcher .option a:hover {background:#FFC;}'+new_line;
|
512 |
widget_preview += '.switcher .option a.selected {background:#FFC;}'+new_line;
|
513 |
widget_preview += '#selected_lang_name {float: none;}'+new_line;
|
514 |
widget_preview += '.l_name {float: none !important;margin: 0;}'+new_line;
|
515 |
+
widget_preview += '.switcher .option::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,0.3);border-radius:5px;background-color:#F5F5F5;}'+new_line;
|
516 |
+
widget_preview += '.switcher .option::-webkit-scrollbar {width:5px;}'+new_line;
|
517 |
+
widget_preview += '.switcher .option::-webkit-scrollbar-thumb {border-radius:5px;-webkit-box-shadow: inset 0 0 3px rgba(0,0,0,.3);background-color:#888;}'+new_line;
|
518 |
widget_preview += '</style>'+new_line+new_line;
|
519 |
}
|
520 |
|
607 |
if(jQuery('#pro_version:checked').length || jQuery('#enterprise_version:checked').length)
|
608 |
jQuery('#new_window_option').show();
|
609 |
|
610 |
+
if('$widget_look' == 'dropdown' || '$widget_look' == 'flags_dropdown' || '$widget_look' == 'globe') {
|
611 |
jQuery('#dropdown_languages_option').show();
|
612 |
} else {
|
613 |
jQuery('#dropdown_languages_option').hide();
|
614 |
}
|
615 |
|
616 |
+
if('$widget_look' == 'globe') {
|
617 |
+
jQuery('#alternative_flags_option').show();
|
618 |
+
} else {
|
619 |
+
jQuery('#alternative_flags_option').hide();
|
620 |
+
}
|
621 |
+
|
622 |
if('$widget_look' == 'flags' || '$widget_look' == 'flags_dropdown' || '$widget_look' == 'dropdown_with_flags') {
|
623 |
jQuery('#flag_languages_option').show();
|
624 |
+
jQuery('#alternative_flags_option').show();
|
625 |
} else {
|
626 |
jQuery('#flag_languages_option').hide();
|
627 |
+
if('$widget_look' != 'globe')
|
628 |
+
jQuery('#alternative_flags_option').hide();
|
629 |
}
|
630 |
|
631 |
if('$widget_look' == 'flags' || '$widget_look' == 'dropdown' || '$widget_look' == 'dropdown_with_flags') {
|
644 |
RefreshDoWidgetCode();
|
645 |
else
|
646 |
ShowWidgetPreview(jQuery('#widget_code').val());
|
647 |
+
|
648 |
+
jQuery(function(){
|
649 |
+
jQuery(".connectedSortable1").sortable({connectWith: ".connectedSortable1"}).disableSelection();
|
650 |
+
jQuery(".connectedSortable2").sortable({connectWith: ".connectedSortable2"}).disableSelection();
|
651 |
+
jQuery(".connectedSortable1").on("sortstop", function(event, ui) {
|
652 |
+
language_codes = jQuery(".connectedSortable1 li input").map(function() {return jQuery(this).val();}).toArray();
|
653 |
+
//for(var i = 0; i < language_codes.length; i++)
|
654 |
+
//languages[i] = gt_lang_array[language_codes[i]];
|
655 |
+
|
656 |
+
jQuery('#language_codes_order').val(language_codes.join(','));
|
657 |
+
RefreshDoWidgetCode();
|
658 |
+
});
|
659 |
+
|
660 |
+
jQuery(".connectedSortable2").on("sortstop", function(event, ui) {
|
661 |
+
language_codes2 = jQuery(".connectedSortable2 li input").map(function() {return jQuery(this).val();}).toArray();
|
662 |
+
//for(var i = 0; i < language_codes.length; i++)
|
663 |
+
//languages[i] = gt_lang_array[language_codes[i]];
|
664 |
+
|
665 |
+
jQuery('#language_codes_order2').val(language_codes2.join(','));
|
666 |
+
RefreshDoWidgetCode();
|
667 |
+
});
|
668 |
+
});
|
669 |
EOT;
|
670 |
|
671 |
// selected languages
|
672 |
if(count($incl_langs) > 0)
|
673 |
+
$script .= "jQuery.each(languages, function(i, val) {jQuery('#incl_langs'+language_codes2[i]).attr('checked', false);});\n";
|
674 |
if(count($fincl_langs) > 0)
|
675 |
+
$script .= "jQuery.each(languages, function(i, val) {jQuery('#fincl_langs'+language_codes2[i]).attr('checked', false);});\n";
|
676 |
foreach($incl_langs as $lang)
|
677 |
$script .= "jQuery('#incl_langs$lang').attr('checked', true);\n";
|
678 |
foreach($fincl_langs as $lang)
|
689 |
|
690 |
<div id="poststuff">
|
691 |
<div class="postbox">
|
692 |
+
<h3 id="settings"><?php _e('Widget options', 'gtranslate'); ?></h3>
|
693 |
<div class="inside">
|
694 |
<table style="width:100%;" cellpadding="4">
|
695 |
<!--tr>
|
703 |
</td>
|
704 |
</tr-->
|
705 |
<tr>
|
706 |
+
<td class="option_name"><?php _e('Widget look', 'gtranslate'); ?>:</td>
|
707 |
<td>
|
708 |
<select id="widget_look" name="widget_look" onChange="RefreshDoWidgetCode()">
|
709 |
+
<option value="flags_dropdown"><?php _e('Flags and dropdown', 'gtranslate'); ?></option>
|
710 |
+
<option value="dropdown_with_flags"><?php _e('Nice dropdown with flags', 'gtranslate'); ?></option>
|
711 |
+
<option value="dropdown"><?php _e('Dropdown', 'gtranslate'); ?></option>
|
712 |
+
<option value="flags"><?php _e('Flags', 'gtranslate'); ?></option>
|
713 |
+
<option value="globe"><?php _e('Globe', 'gtranslate'); ?> (beta)</option>
|
714 |
</select>
|
715 |
</td>
|
716 |
</tr>
|
717 |
<tr>
|
718 |
+
<td class="option_name"><?php _e('Translate from', 'gtranslate'); ?>:</td>
|
719 |
<td>
|
720 |
<select id="default_language" name="default_language" onChange="RefreshDoWidgetCode()">
|
721 |
+
<option value="af"><?php _e('Afrikaans', 'gtranslate'); ?></option>
|
722 |
+
<option value="sq"><?php _e('Albanian', 'gtranslate'); ?></option>
|
723 |
+
<option value="am"><?php _e('Amharic', 'gtranslate'); ?></option>
|
724 |
+
<option value="ar"><?php _e('Arabic', 'gtranslate'); ?></option>
|
725 |
+
<option value="hy"><?php _e('Armenian', 'gtranslate'); ?></option>
|
726 |
+
<option value="az"><?php _e('Azerbaijani', 'gtranslate'); ?></option>
|
727 |
+
<option value="eu"><?php _e('Basque', 'gtranslate'); ?></option>
|
728 |
+
<option value="be"><?php _e('Belarusian', 'gtranslate'); ?></option>
|
729 |
+
<option value="bn"><?php _e('Bengali', 'gtranslate'); ?></option>
|
730 |
+
<option value="bs"><?php _e('Bosnian', 'gtranslate'); ?></option>
|
731 |
+
<option value="bg"><?php _e('Bulgarian', 'gtranslate'); ?></option>
|
732 |
+
<option value="ca"><?php _e('Catalan', 'gtranslate'); ?></option>
|
733 |
+
<option value="ceb"><?php _e('Cebuano', 'gtranslate'); ?></option>
|
734 |
+
<option value="ny"><?php _e('Chichewa', 'gtranslate'); ?></option>
|
735 |
+
<option value="zh-CN"><?php _e('Chinese (Simplified)', 'gtranslate'); ?></option>
|
736 |
+
<option value="zh-TW"><?php _e('Chinese (Traditional)', 'gtranslate'); ?></option>
|
737 |
+
<option value="co"><?php _e('Corsican', 'gtranslate'); ?></option>
|
738 |
+
<option value="hr"><?php _e('Croatian', 'gtranslate'); ?></option>
|
739 |
+
<option value="cs"><?php _e('Czech', 'gtranslate'); ?></option>
|
740 |
+
<option value="da"><?php _e('Danish', 'gtranslate'); ?></option>
|
741 |
+
<option value="nl"><?php _e('Dutch', 'gtranslate'); ?></option>
|
742 |
+
<option value="en" selected="selected"><?php _e('English', 'gtranslate'); ?></option>
|
743 |
+
<option value="eo"><?php _e('Esperanto', 'gtranslate'); ?></option>
|
744 |
+
<option value="et"><?php _e('Estonian', 'gtranslate'); ?></option>
|
745 |
+
<option value="tl"><?php _e('Filipino', 'gtranslate'); ?></option>
|
746 |
+
<option value="fi"><?php _e('Finnish', 'gtranslate'); ?></option>
|
747 |
+
<option value="fr"><?php _e('French', 'gtranslate'); ?></option>
|
748 |
+
<option value="fy"><?php _e('Frisian', 'gtranslate'); ?></option>
|
749 |
+
<option value="gl"><?php _e('Galician', 'gtranslate'); ?></option>
|
750 |
+
<option value="ka"><?php _e('Georgian', 'gtranslate'); ?></option>
|
751 |
+
<option value="de"><?php _e('German', 'gtranslate'); ?></option>
|
752 |
+
<option value="el"><?php _e('Greek', 'gtranslate'); ?></option>
|
753 |
+
<option value="gu"><?php _e('Gujarati', 'gtranslate'); ?></option>
|
754 |
+
<option value="ht"><?php _e('Haitian Creole', 'gtranslate'); ?></option>
|
755 |
+
<option value="ha"><?php _e('Hausa', 'gtranslate'); ?></option>
|
756 |
+
<option value="haw"><?php _e('Hawaiian', 'gtranslate'); ?></option>
|
757 |
+
<option value="iw"><?php _e('Hebrew', 'gtranslate'); ?></option>
|
758 |
+
<option value="hi"><?php _e('Hindi', 'gtranslate'); ?></option>
|
759 |
+
<option value="hmn"><?php _e('Hmong', 'gtranslate'); ?></option>
|
760 |
+
<option value="hu"><?php _e('Hungarian', 'gtranslate'); ?></option>
|
761 |
+
<option value="is"><?php _e('Icelandic', 'gtranslate'); ?></option>
|
762 |
+
<option value="ig"><?php _e('Igbo', 'gtranslate'); ?></option>
|
763 |
+
<option value="id"><?php _e('Indonesian', 'gtranslate'); ?></option>
|
764 |
+
<option value="ga"><?php _e('Irish', 'gtranslate'); ?></option>
|
765 |
+
<option value="it"><?php _e('Italian', 'gtranslate'); ?></option>
|
766 |
+
<option value="ja"><?php _e('Japanese', 'gtranslate'); ?></option>
|
767 |
+
<option value="jw"><?php _e('Javanese', 'gtranslate'); ?></option>
|
768 |
+
<option value="kn"><?php _e('Kannada', 'gtranslate'); ?></option>
|
769 |
+
<option value="kk"><?php _e('Kazakh', 'gtranslate'); ?></option>
|
770 |
+
<option value="km"><?php _e('Khmer', 'gtranslate'); ?></option>
|
771 |
+
<option value="ko"><?php _e('Korean', 'gtranslate'); ?></option>
|
772 |
+
<option value="ku"><?php _e('Kurdish (Kurmanji)', 'gtranslate'); ?></option>
|
773 |
+
<option value="ky"><?php _e('Kyrgyz', 'gtranslate'); ?></option>
|
774 |
+
<option value="lo"><?php _e('Lao', 'gtranslate'); ?></option>
|
775 |
+
<option value="la"><?php _e('Latin', 'gtranslate'); ?></option>
|
776 |
+
<option value="lv"><?php _e('Latvian', 'gtranslate'); ?></option>
|
777 |
+
<option value="lt"><?php _e('Lithuanian', 'gtranslate'); ?></option>
|
778 |
+
<option value="lb"><?php _e('Luxembourgish', 'gtranslate'); ?></option>
|
779 |
+
<option value="mk"><?php _e('Macedonian', 'gtranslate'); ?></option>
|
780 |
+
<option value="mg"><?php _e('Malagasy', 'gtranslate'); ?></option>
|
781 |
+
<option value="ms"><?php _e('Malay', 'gtranslate'); ?></option>
|
782 |
+
<option value="ml"><?php _e('Malayalam', 'gtranslate'); ?></option>
|
783 |
+
<option value="mt"><?php _e('Maltese', 'gtranslate'); ?></option>
|
784 |
+
<option value="mi"><?php _e('Maori', 'gtranslate'); ?></option>
|
785 |
+
<option value="mr"><?php _e('Marathi', 'gtranslate'); ?></option>
|
786 |
+
<option value="mn"><?php _e('Mongolian', 'gtranslate'); ?></option>
|
787 |
+
<option value="my"><?php _e('Myanmar (Burmese)', 'gtranslate'); ?></option>
|
788 |
+
<option value="ne"><?php _e('Nepali', 'gtranslate'); ?></option>
|
789 |
+
<option value="no"><?php _e('Norwegian', 'gtranslate'); ?></option>
|
790 |
+
<option value="ps"><?php _e('Pashto', 'gtranslate'); ?></option>
|
791 |
+
<option value="fa"><?php _e('Persian', 'gtranslate'); ?></option>
|
792 |
+
<option value="pl"><?php _e('Polish', 'gtranslate'); ?></option>
|
793 |
+
<option value="pt"><?php _e('Portuguese', 'gtranslate'); ?></option>
|
794 |
+
<option value="pa"><?php _e('Punjabi', 'gtranslate'); ?></option>
|
795 |
+
<option value="ro"><?php _e('Romanian', 'gtranslate'); ?></option>
|
796 |
+
<option value="ru"><?php _e('Russian', 'gtranslate'); ?></option>
|
797 |
+
<option value="sm"><?php _e('Samoan', 'gtranslate'); ?></option>
|
798 |
+
<option value="gd"><?php _e('Scottish Gaelic', 'gtranslate'); ?></option>
|
799 |
+
<option value="sr"><?php _e('Serbian', 'gtranslate'); ?></option>
|
800 |
+
<option value="st"><?php _e('Sesotho', 'gtranslate'); ?></option>
|
801 |
+
<option value="sn"><?php _e('Shona', 'gtranslate'); ?></option>
|
802 |
+
<option value="sd"><?php _e('Sindhi', 'gtranslate'); ?></option>
|
803 |
+
<option value="si"><?php _e('Sinhala', 'gtranslate'); ?></option>
|
804 |
+
<option value="sk"><?php _e('Slovak', 'gtranslate'); ?></option>
|
805 |
+
<option value="sl"><?php _e('Slovenian', 'gtranslate'); ?></option>
|
806 |
+
<option value="so"><?php _e('Somali', 'gtranslate'); ?></option>
|
807 |
+
<option value="es"><?php _e('Spanish', 'gtranslate'); ?></option>
|
808 |
+
<option value="su"><?php _e('Sudanese', 'gtranslate'); ?></option>
|
809 |
+
<option value="sw"><?php _e('Swahili', 'gtranslate'); ?></option>
|
810 |
+
<option value="sv"><?php _e('Swedish', 'gtranslate'); ?></option>
|
811 |
+
<option value="tg"><?php _e('Tajik', 'gtranslate'); ?></option>
|
812 |
+
<option value="ta"><?php _e('Tamil', 'gtranslate'); ?></option>
|
813 |
+
<option value="te"><?php _e('Telugu', 'gtranslate'); ?></option>
|
814 |
+
<option value="th"><?php _e('Thai', 'gtranslate'); ?></option>
|
815 |
+
<option value="tr"><?php _e('Turkish', 'gtranslate'); ?></option>
|
816 |
+
<option value="uk"><?php _e('Ukrainian', 'gtranslate'); ?></option>
|
817 |
+
<option value="ur"><?php _e('Urdu', 'gtranslate'); ?></option>
|
818 |
+
<option value="uz"><?php _e('Uzbek', 'gtranslate'); ?></option>
|
819 |
+
<option value="vi"><?php _e('Vietnamese', 'gtranslate'); ?></option>
|
820 |
+
<option value="cy"><?php _e('Welsh', 'gtranslate'); ?></option>
|
821 |
+
<option value="xh"><?php _e('Xhosa', 'gtranslate'); ?></option>
|
822 |
+
<option value="yi"><?php _e('Yiddish', 'gtranslate'); ?></option>
|
823 |
+
<option value="yo"><?php _e('Yoruba', 'gtranslate'); ?></option>
|
824 |
+
<option value="zu"><?php _e('Zulu', 'gtranslate'); ?></option>
|
825 |
</select>
|
826 |
</td>
|
827 |
</tr>
|
828 |
<tr>
|
829 |
+
<td class="option_name"><?php _e('Analytics', 'gtranslate'); ?>:</td>
|
830 |
<td><input id="analytics" name="analytics" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
831 |
</tr>
|
832 |
<tr>
|
833 |
+
<td class="option_name">* <?php _e('Sub-directory URL structure', 'gtranslate'); ?>:<br><small>http://example.com/<b>ru</b>/</small></td>
|
834 |
+
<td><input id="pro_version" name="pro_version" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/> <a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">* <?php _e('paid plans only', 'gtranslate'); ?></a></td>
|
835 |
</tr>
|
836 |
<tr>
|
837 |
+
<td class="option_name">* <?php _e('Sub-domain URL structure', 'gtranslate'); ?>:<br><small>http://<b>es</b>.example.com/</small></td>
|
838 |
+
<td><input id="enterprise_version" name="enterprise_version" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/> <a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">* <?php _e('paid plans only', 'gtranslate'); ?></a></td>
|
839 |
</tr>
|
840 |
<tr id="new_window_option" style="display:none;">
|
841 |
+
<td class="option_name"><?php _e('Open in new window', 'gtranslate'); ?>:</td>
|
842 |
<td><input id="new_window" name="new_window" value="1" type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
843 |
</tr>
|
844 |
<tr>
|
845 |
+
<td class="option_name"><?php _e('Show in primary menu', 'gtranslate'); ?>:</td>
|
846 |
<td><input id="show_in_primary_menu" name="show_in_primary_menu" value="1" type="checkbox"/></td>
|
847 |
</tr>
|
848 |
|
851 |
<td><input id="show_flags" name="show_flags" value="1" type="checkbox" checked="checked" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
852 |
</tr-->
|
853 |
<tr id="flag_size_option">
|
854 |
+
<td class="option_name"><?php _e('Flag size', 'gtranslate'); ?>:</td>
|
855 |
<td>
|
856 |
<select id="flag_size" name="flag_size" onchange="RefreshDoWidgetCode()">
|
857 |
<option value="16" selected>16px</option>
|
861 |
</td>
|
862 |
</tr>
|
863 |
<tr id="flag_languages_option" style="display:none;">
|
864 |
+
<td class="option_name" colspan="2"><?php _e('Flag languages', 'gtranslate'); ?>: <a onclick="jQuery('.connectedSortable1 input').attr('checked', true);RefreshDoWidgetCode()" style="cursor:pointer;text-decoration:underline;"><?php _e('Check All', 'gtranslate'); ?></a> | <a onclick="jQuery('.connectedSortable1 input').attr('checked', false);RefreshDoWidgetCode()" style="cursor:pointer;text-decoration:underline;"><?php _e('Uncheck All', 'gtranslate'); ?></a><br /><br />
|
865 |
|
866 |
<div style="overflow:hidden;">
|
867 |
+
<?php $gt_lang_codes = explode(',', $language_codes); ?>
|
868 |
+
<?php for($i = 0; $i < 58 / 15; $i++): ?>
|
869 |
+
<ul style="list-style-type:none;width:25%;float:left;" class="connectedSortable1">
|
870 |
+
<?php for($j = $i * 15; $j < 15 * ($i+1); $j++): ?>
|
871 |
+
<?php if(isset($gt_lang_codes[$j])): ?>
|
872 |
+
<li><input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="fincl_langs<?php echo $gt_lang_codes[$j]; ?>" name="fincl_langs[]" value="<?php echo $gt_lang_codes[$j]; ?>"><label for="fincl_langs<?php echo $gt_lang_codes[$j]; ?>"><?php _e($gt_lang_array[$gt_lang_codes[$j]], 'gtranslate'); ?></label></li>
|
873 |
+
<?php endif; ?>
|
874 |
+
<?php endfor; ?>
|
875 |
+
</ul>
|
876 |
+
<?php endfor; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
</div>
|
878 |
+
</td>
|
879 |
+
</tr>
|
880 |
+
<tr id="alternative_flags_option" style="display:none;">
|
881 |
+
<td class="option_name" colspan="2"><?php _e('Alternative flags', 'gtranslate'); ?>:<br /><br />
|
882 |
+
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="alt_us" name="alt_flags[]" value="us"><label for="alt_us"><?php _e('USA flag', 'gtranslate'); ?></label><br />
|
883 |
+
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="alt_br" name="alt_flags[]" value="br"><label for="alt_br"><?php _e('Brazil flag', 'gtranslate'); ?></label><br />
|
884 |
+
<input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="alt_mx" name="alt_flags[]" value="mx"><label for="alt_mx"><?php _e('Mexico flag', 'gtranslate'); ?></label><br />
|
885 |
</td>
|
886 |
</tr>
|
887 |
<tr id="line_break_option" style="display:none;">
|
888 |
+
<td class="option_name"><?php _e('Line break after flags', 'gtranslate'); ?>:</td>
|
889 |
<td><input id="add_new_line" name="add_new_line" value="1" type="checkbox" checked="checked" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
890 |
</tr>
|
891 |
<!--tr>
|
893 |
<td><input id="show_dropdown" name="show_dropdown" value="1" type="checkbox" checked="checked" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()"/></td>
|
894 |
</tr-->
|
895 |
<tr id="dropdown_languages_option" style="display:none;">
|
896 |
+
<td class="option_name" colspan="2"><?php _e('Languages', 'gtranslate'); ?>: <a onclick="jQuery('.connectedSortable2 input').attr('checked', true);RefreshDoWidgetCode()" style="cursor:pointer;text-decoration:underline;"><?php _e('Check All', 'gtranslate'); ?></a> | <a onclick="jQuery('.connectedSortable2 input').attr('checked', false);RefreshDoWidgetCode()" style="cursor:pointer;text-decoration:underline;"><?php _e('Uncheck All', 'gtranslate'); ?></a><br /><br />
|
897 |
<div>
|
898 |
+
<?php $gt_lang_codes = explode(',', $language_codes2); ?>
|
899 |
+
<?php for($i = 0; $i < count($gt_lang_array) / 26; $i++): ?>
|
900 |
+
<ul style="list-style-type:none;width:25%;float:left;" class="connectedSortable2">
|
901 |
+
<?php for($j = $i * 26; $j < 26 * ($i+1); $j++): ?>
|
902 |
+
<?php if(isset($gt_lang_codes[$j])): ?>
|
903 |
+
<li><input type="checkbox" onclick="RefreshDoWidgetCode()" onchange="RefreshDoWidgetCode()" id="incl_langs<?php echo $gt_lang_codes[$j]; ?>" name="incl_langs[]" value="<?php echo $gt_lang_codes[$j]; ?>"><label for="incl_langs<?php echo $gt_lang_codes[$j]; ?>"><?php _e($gt_lang_array[$gt_lang_codes[$j]], 'gtranslate'); ?></label></li>
|
904 |
+
<?php endif; ?>
|
905 |
+
<?php endfor; ?>
|
906 |
+
</ul>
|
907 |
+
<?php endfor; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
908 |
</div>
|
909 |
</td>
|
910 |
</tr>
|
915 |
|
916 |
<div id="poststuff">
|
917 |
<div class="postbox">
|
918 |
+
<h3 id="settings"><?php _e('Widget code', 'gtranslate'); ?></h3>
|
919 |
<div class="inside">
|
920 |
+
<span style="color:red;"><?php _e('DO NOT COPY THIS INTO YOUR POSTS OR PAGES! Use [GTranslate] shortcode inside the post/page <br />or add a GTranslate widget into your sidebar from Appearance -> Widgets instead.', 'gtranslate'); ?></span><br /><br />
|
921 |
+
<?php _e('You can edit this if you wish', 'gtranslate'); ?>:<br />
|
922 |
<textarea id="widget_code" name="widget_code" onchange="ShowWidgetPreview(this.value)" style="font-family:Monospace;font-size:11px;height:150px;width:565px;"><?php echo $widget_code; ?></textarea>
|
923 |
</div>
|
924 |
</div>
|
925 |
</div>
|
926 |
|
927 |
+
<input type="hidden" id="language_codes_order" name="language_codes" value="<?php echo $language_codes; ?>" />
|
928 |
+
<input type="hidden" id="language_codes_order2" name="language_codes2" value="<?php echo $language_codes2; ?>" />
|
929 |
<?php wp_nonce_field('gtranslate-save'); ?>
|
930 |
<p class="submit"><input type="submit" class="button-primary" name="save" value="<?php _e('Save Changes'); ?>" /></p>
|
931 |
|
936 |
<div class="postbox-container og_right_col">
|
937 |
<div id="poststuff">
|
938 |
<div class="postbox">
|
939 |
+
<h3 id="settings"><?php _e('Widget preview', 'gtranslate'); ?></h3>
|
940 |
<div class="inside">
|
941 |
<div id="widget_preview"></div>
|
942 |
</div>
|
945 |
|
946 |
<div id="poststuff">
|
947 |
<div class="postbox">
|
948 |
+
<h3 id="settings"><?php _e('Do you like GTranslate?', 'gtranslate'); ?></h3>
|
949 |
<div class="inside">
|
950 |
+
<p><?php _e('Please write a review on', 'gtranslate'); ?> <a href="https://wordpress.org/support/view/plugin-reviews/gtranslate?filter=5">WordPress.org</a>.</p>
|
951 |
|
952 |
<div id="fb-root"></div>
|
953 |
<script>(function(d, s, id) {
|
966 |
|
967 |
<div id="poststuff">
|
968 |
<div class="postbox">
|
969 |
+
<h3 id="settings"><?php _e('Useful info', 'gtranslate'); ?></h3>
|
970 |
<div class="inside">
|
971 |
+
<?php _e('Upgrade to <a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">GTranslate Enterprise</a> to have the following features', 'gtranslate'); ?>:
|
972 |
<ul style="list-style-type: square;padding-left:40px;">
|
973 |
+
<li><?php _e('Enable search engine indexing', 'gtranslate'); ?></li>
|
974 |
+
<li><?php _e('Search engine friendly (SEF) URLs', 'gtranslate'); ?></li>
|
975 |
+
<li><?php _e('Increase traffic and AdSense revenue', 'gtranslate'); ?></li>
|
976 |
+
<li><?php _e('Meta data translation', 'gtranslate'); ?></li>
|
977 |
+
<li><?php _e('Edit translations manually', 'gtranslate'); ?></li>
|
978 |
+
<li><?php _e('URL translation', 'gtranslate'); ?></li>
|
979 |
+
<li><?php _e('Language hosting', 'gtranslate'); ?></li>
|
980 |
+
<li><?php _e('Seamless updates', 'gtranslate'); ?></li>
|
981 |
+
<li><?php _e('SSL support', 'gtranslate'); ?></li>
|
982 |
</ul>
|
983 |
|
984 |
+
<a href="https://gtranslate.io/?xyz=998#pricing" target="_blank"><?php _e('More Info', 'gtranslate'); ?></a>
|
985 |
</div>
|
986 |
</div>
|
987 |
</div>
|
988 |
<div id="poststuff">
|
989 |
<div class="postbox">
|
990 |
+
<h3 id="settings"><?php _e('GTranslate Tour Video', 'gtranslate'); ?></h3>
|
991 |
<div class="inside">
|
992 |
<iframe src="//player.vimeo.com/video/30132555?title=1&byline=0&portrait=0" width="568" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
993 |
</div>
|
995 |
</div>
|
996 |
<div id="poststuff">
|
997 |
<div class="postbox">
|
998 |
+
<h3 id="settings"><?php _e('Translation Delivery Network', 'gtranslate'); ?></h3>
|
999 |
<div class="inside">
|
1000 |
<iframe src="//player.vimeo.com/video/38686858?title=1&byline=0&portrait=0" width="568" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
1001 |
</div>
|
1019 |
table.form-table .dashicons-twitter { color: #55ACEE; }
|
1020 |
table.form-table .dashicons-rss { color: #FF6600; }
|
1021 |
table.form-table .dashicons-admin-site, table.form-table .dashicons-admin-generic { color: #666; }
|
1022 |
+
|
1023 |
+
.connectedSortable1, .connectedSortable1 li, .connectedSortable2, .connectedSortable2 li {margin:0;padding:0;}
|
1024 |
+
.connectedSortable1 li label, .connectedSortable2 li label {cursor:move;}
|
1025 |
</style>
|
1026 |
|
1027 |
<!-- Live Chat for GTranslate -->
|
1049 |
$data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array('en');
|
1050 |
$data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array('en');
|
1051 |
$data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
|
1052 |
+
$data['language_codes'] = (isset($_POST['language_codes']) and !empty($_POST['language_codes'])) ? sanitize_text_field($_POST['language_codes']) : 'af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,en,et,tl,fi,fr,gl,ka,de,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi';
|
1053 |
+
$data['language_codes2'] = (isset($_POST['language_codes2']) and !empty($_POST['language_codes2'])) ? sanitize_text_field($_POST['language_codes2']) : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
|
1054 |
|
1055 |
+
echo '<p style="color:red;">' . __('Changes Saved') . '</p>';
|
1056 |
update_option('GTranslate', $data);
|
1057 |
}
|
1058 |
|
1075 |
$data['incl_langs'] = isset($data['incl_langs']) ? $data['incl_langs'] : array();
|
1076 |
$data['fincl_langs'] = isset($data['fincl_langs']) ? $data['fincl_langs'] : array();
|
1077 |
$data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
|
1078 |
+
$data['language_codes'] = (isset($data['language_codes']) and !empty($data['language_codes'])) ? $data['language_codes'] : 'af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,en,et,tl,fi,fr,gl,ka,de,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi';
|
1079 |
+
$data['language_codes2'] = (isset($data['language_codes2']) and !empty($data['language_codes2'])) ? $data['language_codes2'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
|
1080 |
}
|
1081 |
}
|
1082 |
|
1083 |
class GTranslate_Notices {
|
1084 |
protected $prefix = 'gtranslate';
|
1085 |
+
public $notice_spam = 0;
|
1086 |
+
public $notice_spam_max = 1;
|
1087 |
+
|
1088 |
+
// Basic actions to run
|
1089 |
+
public function __construct() {
|
1090 |
+
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
1091 |
+
add_action('admin_init', array($this, 'admin_notice_ignore'));
|
1092 |
+
// Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
|
1093 |
+
add_action('admin_init', array($this, 'admin_notice_temp_ignore'));
|
1094 |
+
|
1095 |
+
// Adding notices
|
1096 |
+
add_action('admin_notices', array($this, 'gt_admin_notices'));
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
// Checks to ensure notices aren't disabled and the user has the correct permissions.
|
1100 |
+
public function gt_admin_notice() {
|
1101 |
+
|
1102 |
+
$gt_settings = get_option($this->prefix . '_admin_notice');
|
1103 |
+
if (!isset($gt_settings['disable_admin_notices']) || (isset($gt_settings['disable_admin_notices']) && $gt_settings['disable_admin_notices'] == 0)) {
|
1104 |
+
if (current_user_can('manage_options')) {
|
1105 |
+
return true;
|
1106 |
+
}
|
1107 |
+
}
|
1108 |
+
return false;
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
// Primary notice function that can be called from an outside function sending necessary variables
|
1112 |
+
public function admin_notice($admin_notices) {
|
1113 |
+
|
1114 |
+
// Check options
|
1115 |
+
if (!$this->gt_admin_notice()) {
|
1116 |
+
return false;
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
foreach ($admin_notices as $slug => $admin_notice) {
|
1120 |
+
// Call for spam protection
|
1121 |
+
|
1122 |
+
if ($this->anti_notice_spam()) {
|
1123 |
+
return false;
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
// Check for proper page to display on
|
1127 |
+
if (isset( $admin_notices[$slug]['pages']) and is_array( $admin_notices[$slug]['pages'])) {
|
1128 |
+
|
1129 |
+
if (!$this->admin_notice_pages($admin_notices[$slug]['pages'])) {
|
1130 |
+
return false;
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
// Check for required fields
|
1136 |
+
if (!$this->required_fields($admin_notices[$slug])) {
|
1137 |
+
|
1138 |
+
// Get the current date then set start date to either passed value or current date value and add interval
|
1139 |
+
$current_date = current_time("n/j/Y");
|
1140 |
+
$start = (isset($admin_notices[$slug]['start']) ? $admin_notices[$slug]['start'] : $current_date);
|
1141 |
+
$start = date("n/j/Y", strtotime($start));
|
1142 |
+
$end = ( isset( $admin_notices[ $slug ]['end'] ) ? $admin_notices[ $slug ]['end'] : $start );
|
1143 |
+
$end = date( "n/j/Y", strtotime( $end ) );
|
1144 |
+
$date_array = explode('/', $start);
|
1145 |
+
$interval = (isset($admin_notices[$slug]['int']) ? $admin_notices[$slug]['int'] : 0);
|
1146 |
+
$date_array[1] += $interval;
|
1147 |
+
$start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
|
1148 |
+
// This is the main notices storage option
|
1149 |
+
$admin_notices_option = get_option($this->prefix . '_admin_notice', array());
|
1150 |
+
// Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
|
1151 |
+
if (!array_key_exists( $slug, $admin_notices_option)) {
|
1152 |
+
$admin_notices_option[$slug]['start'] = $start;
|
1153 |
+
$admin_notices_option[$slug]['int'] = $interval;
|
1154 |
+
update_option($this->prefix . '_admin_notice', $admin_notices_option);
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
// Sanity check to ensure we have accurate information
|
1158 |
+
// New date information will not overwrite old date information
|
1159 |
+
$admin_display_check = (isset($admin_notices_option[$slug]['dismissed']) ? $admin_notices_option[$slug]['dismissed'] : 0);
|
1160 |
+
$admin_display_start = (isset($admin_notices_option[$slug]['start']) ? $admin_notices_option[$slug]['start'] : $start);
|
1161 |
+
$admin_display_interval = (isset($admin_notices_option[$slug]['int']) ? $admin_notices_option[$slug]['int'] : $interval);
|
1162 |
+
$admin_display_msg = (isset($admin_notices[$slug]['msg']) ? $admin_notices[$slug]['msg'] : '');
|
1163 |
+
$admin_display_title = (isset($admin_notices[$slug]['title']) ? $admin_notices[$slug]['title'] : '');
|
1164 |
+
$admin_display_link = (isset($admin_notices[$slug]['link']) ? $admin_notices[$slug]['link'] : '');
|
1165 |
+
$output_css = false;
|
1166 |
+
|
1167 |
+
// Ensure the notice hasn't been hidden and that the current date is after the start date
|
1168 |
if ($admin_display_check == 0 and strtotime($admin_display_start) <= strtotime($current_date)) {
|
1169 |
+
// Get remaining query string
|
1170 |
+
$query_str = esc_url(add_query_arg($this->prefix . '_admin_notice_ignore', $slug));
|
1171 |
|
1172 |
+
// Admin notice display output
|
1173 |
echo '<div class="update-nag gt-admin-notice">';
|
1174 |
echo '<div class="gt-notice-logo"></div>';
|
1175 |
echo ' <p class="gt-notice-title">';
|
1184 |
echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>';
|
1185 |
echo '</div>';
|
1186 |
|
1187 |
+
$this->notice_spam += 1;
|
1188 |
+
$output_css = true;
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
if ($output_css) {
|
1192 |
+
wp_enqueue_style($this->prefix . '-admin-notices', plugins_url(plugin_basename(dirname(__FILE__))) . '/gtranslate-notices.css', array());
|
1193 |
+
}
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
}
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
// Spam protection check
|
1200 |
+
public function anti_notice_spam() {
|
1201 |
+
if ($this->notice_spam >= $this->notice_spam_max) {
|
1202 |
+
return true;
|
1203 |
+
}
|
1204 |
+
return false;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
1208 |
+
public function admin_notice_ignore() {
|
1209 |
+
// If user clicks to ignore the notice, update the option to not show it again
|
1210 |
+
if (isset($_GET[$this->prefix . '_admin_notice_ignore'])) {
|
1211 |
+
$admin_notices_option = get_option($this->prefix . '_admin_notice', array());
|
1212 |
+
$admin_notices_option[$_GET[$this->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
|
1213 |
+
update_option($this->prefix . '_admin_notice', $admin_notices_option);
|
1214 |
+
$query_str = remove_query_arg($this->prefix . '_admin_notice_ignore');
|
1215 |
+
wp_redirect($query_str);
|
1216 |
+
exit;
|
1217 |
+
}
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
// Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
|
1221 |
+
public function admin_notice_temp_ignore() {
|
1222 |
+
// If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
|
1223 |
+
if (isset($_GET[$this->prefix . '_admin_notice_temp_ignore'])) {
|
1224 |
+
$admin_notices_option = get_option($this->prefix . '_admin_notice', array());
|
1225 |
+
$current_date = current_time("n/j/Y");
|
1226 |
+
$date_array = explode('/', $current_date);
|
1227 |
+
$interval = (isset($_GET['gt_int']) ? $_GET['gt_int'] : 14);
|
1228 |
+
$date_array[1] += $interval;
|
1229 |
+
$new_start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
|
1230 |
+
|
1231 |
+
$admin_notices_option[$_GET[$this->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
|
1232 |
+
$admin_notices_option[$_GET[$this->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
|
1233 |
+
update_option($this->prefix . '_admin_notice', $admin_notices_option);
|
1234 |
+
$query_str = remove_query_arg(array($this->prefix . '_admin_notice_temp_ignore', 'gt_int'));
|
1235 |
+
wp_redirect( $query_str );
|
1236 |
+
exit;
|
1237 |
+
}
|
1238 |
+
}
|
1239 |
+
|
1240 |
+
public function admin_notice_pages($pages) {
|
1241 |
+
foreach ($pages as $key => $page) {
|
1242 |
+
if (is_array($page)) {
|
1243 |
+
if (isset($_GET['page']) and $_GET['page'] == $page[0] and isset($_GET['tab']) and $_GET['tab'] == $page[1]) {
|
1244 |
+
return true;
|
1245 |
+
}
|
1246 |
+
} else {
|
1247 |
+
if ($page == 'all') {
|
1248 |
+
return true;
|
1249 |
+
}
|
1250 |
+
if (get_current_screen()->id === $page) {
|
1251 |
+
return true;
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
if (isset($_GET['page']) and $_GET['page'] == $page) {
|
1255 |
+
return true;
|
1256 |
+
}
|
1257 |
+
}
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
return false;
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
// Required fields check
|
1264 |
+
public function required_fields( $fields ) {
|
1265 |
+
if (!isset( $fields['msg']) or (isset($fields['msg']) and empty($fields['msg']))) {
|
1266 |
+
return true;
|
1267 |
+
}
|
1268 |
+
if (!isset( $fields['title']) or (isset($fields['title']) and empty($fields['title']))) {
|
1269 |
+
return true;
|
1270 |
+
}
|
1271 |
+
return false;
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
// Special parameters function that is to be used in any extension of this class
|
1275 |
+
public function special_parameters($admin_notices) {
|
1276 |
+
// Intentionally left blank
|
1277 |
+
}
|
1278 |
|
1279 |
public function gt_admin_notices() {
|
1280 |
+
$one_week_support = esc_url(add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'one_week_support')));
|
1281 |
|
1282 |
$notices['one_week_support'] = array(
|
1283 |
+
'title' => __('Hey! How is it going?', 'gtranslate'),
|
1284 |
+
'msg' => __('Thank you for using GTranslate! We hope that you have found everything you need, but if you have any questions you can use our Live Chat or Forum:', 'gtranslate'),
|
1285 |
+
'link' => '<li><span class="dashicons dashicons-admin-comments"></span><a target="_blank" href="https://gtranslate.io/#contact">' . __('Get help', 'gtranslate') . '</a></li>' .
|
1286 |
+
'<li><span class="dashicons dashicons-format-video"></span><a target="_blank" href="https://gtranslate.io/videos">'.__('Check videos', 'gtranslate') . '</a></li>' .
|
1287 |
+
'<li><span class="dashicons dashicons-dismiss"></span><a href="' . $one_week_support . '">' . __('Never show again', 'gtranslate') . '</a></li>',
|
1288 |
+
'int' => 1
|
1289 |
+
);
|
1290 |
+
|
1291 |
+
$two_week_review_ignore = esc_url(add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'two_week_review')));
|
1292 |
+
$two_week_review_temp = esc_url(add_query_arg(array($this->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'gt_int' => 14)));
|
1293 |
+
|
1294 |
+
$notices['two_week_review'] = array(
|
1295 |
+
'title' => __('Please Leave a Review', 'gtranslate'),
|
1296 |
+
'msg' => __("We hope you have enjoyed using GTranslate! Would you mind taking a few minutes to write a review on WordPress.org? <br>Just writing a simple <b>'thank you'</b> will make us happy!", 'gtranslate'),
|
1297 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/gtranslate/reviews/?filter=5" target="_blank">' . __('Sure! I would love to!', 'gtranslate') . '</a></li>' .
|
1298 |
+
'<li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '">' . __('I have already left a review', 'gtranslate') . '</a></li>' .
|
1299 |
+
'<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe later', 'gtranslate') . '</a></li>' .
|
1300 |
+
'<li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', 'gtranslate') . '</a></li>',
|
1301 |
+
'later_link' => $two_week_review_temp,
|
1302 |
+
'int' => 3
|
1303 |
+
);
|
1304 |
+
|
1305 |
+
$data = get_option('GTranslate');
|
1306 |
GTranslate::load_defaults($data);
|
1307 |
|
1308 |
$upgrade_tips_ignore = esc_url(add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'upgrade_tips')));
|
1309 |
+
$upgrade_tips_temp = esc_url(add_query_arg(array($this->prefix . '_admin_notice_temp_ignore' => 'upgrade_tips', 'gt_int' => 5)));
|
1310 |
+
|
1311 |
+
if($data['pro_version'] != '1' and $data['enterprise_version'] != '1') {
|
1312 |
+
$notices['upgrade_tips'][] = array(
|
1313 |
+
'title' => __('Did you know?', 'gtranslate'),
|
1314 |
+
'msg' => __('You can <b>increase</b> your international <b>traffic</b> by upgrading your GTranslate.', 'gtranslate'),
|
1315 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">' . __('Learn more', 'gtranslate') . '</a></li>' .
|
1316 |
+
'<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $upgrade_tips_temp . '">' . __('Maybe later', 'gtranslate') . '</a></li>' .
|
1317 |
+
'<li><span class="dashicons dashicons-dismiss"></span><a href="' . $upgrade_tips_ignore . '">' . __('Never show again', 'gtranslate') . '</a></li>',
|
1318 |
+
'later_link' => $upgrade_tips_temp,
|
1319 |
+
'int' => 1
|
1320 |
+
);
|
1321 |
+
|
1322 |
+
$notices['upgrade_tips'][] = array(
|
1323 |
+
'title' => __('Did you know?', 'gtranslate'),
|
1324 |
+
'msg' => __('You can have your <b>translated pages indexed</b> in search engines by upgrading your GTranslate.', 'gtranslate'),
|
1325 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">' . __('Learn more', 'gtranslate') . '</a></li>' .
|
1326 |
+
'<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $upgrade_tips_temp . '">' . __('Maybe later', 'gtranslate') . '</a></li>' .
|
1327 |
+
'<li><span class="dashicons dashicons-dismiss"></span><a href="' . $upgrade_tips_ignore . '">' . __('Never show again', 'gtranslate') . '</a></li>',
|
1328 |
+
'later_link' => $upgrade_tips_temp,
|
1329 |
+
'int' => 1
|
1330 |
+
);
|
1331 |
+
|
1332 |
+
$notices['upgrade_tips'][] = array(
|
1333 |
+
'title' => __('Did you know?', 'gtranslate'),
|
1334 |
+
'msg' => __('You can <b>increase</b> your <b>AdSense revenue</b> by upgrading your GTranslate.', 'gtranslate'),
|
1335 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">' . __('Learn more', 'gtranslate') . '</a></li>' .
|
1336 |
+
'<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $upgrade_tips_temp . '">' . __('Maybe later', 'gtranslate') . '</a></li>' .
|
1337 |
+
'<li><span class="dashicons dashicons-dismiss"></span><a href="' . $upgrade_tips_ignore . '">' . __('Never show again', 'gtranslate') . '</a></li>',
|
1338 |
+
'later_link' => $upgrade_tips_temp,
|
1339 |
+
'int' => 1
|
1340 |
+
);
|
1341 |
+
|
1342 |
+
$notices['upgrade_tips'][] = array(
|
1343 |
+
'title' => __('Did you know?', 'gtranslate'),
|
1344 |
+
'msg' => __('You can <b>edit translations</b> by upgrading your GTranslate.', 'gtranslate'),
|
1345 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://gtranslate.io/?xyz=998#pricing" target="_blank">' . __('Learn more', 'gtranslate') . '</a></li>' .
|
1346 |
+
'<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $upgrade_tips_temp . '">' . __('Maybe later', 'gtranslate') . '</a></li>' .
|
1347 |
+
'<li><span class="dashicons dashicons-dismiss"></span><a href="' . $upgrade_tips_ignore . '">' . __('Never show again', 'gtranslate') . '</a></li>',
|
1348 |
+
'later_link' => $upgrade_tips_temp,
|
1349 |
+
'int' => 1
|
1350 |
+
);
|
1351 |
+
|
1352 |
+
$notices['upgrade_tips'][] = array(
|
1353 |
+
'title' => __('Did you know?', 'gtranslate'),
|
1354 |
+
'msg' => __('You can use our <b>Live Chat</b> or <b>Support Forum</b> if you have any questions.', 'gtranslate'),
|
1355 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://gtranslate.io/?xyz=998#contact" target="_blank">' . __('Live Chat', 'gtranslate') . '</a></li>' .
|
1356 |
+
'<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/gtranslate" target="_blank">' . __('Support Forum', 'gtranslate') . '</a></li>' .
|
1357 |
+
'<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $upgrade_tips_temp . '">' . __('Maybe later', 'gtranslate') . '</a></li>' .
|
1358 |
+
'<li><span class="dashicons dashicons-dismiss"></span><a href="' . $upgrade_tips_ignore . '">' . __('Never show again', 'gtranslate') . '</a></li>',
|
1359 |
+
'later_link' => $upgrade_tips_temp,
|
1360 |
+
'int' => 1
|
1361 |
+
);
|
1362 |
+
|
1363 |
+
shuffle($notices['upgrade_tips']);
|
1364 |
+
$notices['upgrade_tips'] = $notices['upgrade_tips'][0];
|
1365 |
}
|
1366 |
|
1367 |
+
$this->admin_notice($notices);
|
1368 |
+
}
|
1369 |
|
1370 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Author: Edvard Ananyan
|
|
4 |
Tags: translation proxy, localization, translate, translation, localization, google translate, language, multilingual, multilanguage, bilingual, tradurre, traducir, traduire, traduzione, ubersetzung, mehrsprachig, oversette, oversatta, vertaling, vertaler, meertalig, polylang, qtranslate, transposh
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
@@ -41,13 +41,13 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
|
|
41 |
[Download GTranslate](https://gtranslate.io/?xyz=998#pricing)
|
42 |
|
43 |
**GTranslate Wordpress Demo**
|
44 |
-
https://www.youtube.com/watch?v=9mtC3LFBErY
|
45 |
|
46 |
**Watch GTranslate Tour**
|
47 |
[vimeo http://vimeo.com/30132555]
|
48 |
|
49 |
**Edit Translations Demo (paid)**
|
50 |
-
https://www.youtube.com/watch?v=YwSy3VtQx3I
|
51 |
|
52 |
Keywords: polylang, prisna, gts, localize, lingotek, smartling, qtranslate, loco translate, google website translator, translate wordpress, translate, transposh, global translator, machine translate, wp translate
|
53 |
|
@@ -349,13 +349,18 @@ Here is the list: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, B
|
|
349 |
= Which websites are supported? =
|
350 |
All the HTML websites are supported. However the contents of media files like images and flash will not be translated.
|
351 |
|
352 |
-
=
|
353 |
-
|
|
|
|
|
|
|
354 |
|
355 |
= What is a Translation Delivery Network? =
|
356 |
-
Translation Delivery Network
|
|
|
|
|
357 |
|
358 |
-
|
359 |
|
360 |
[vimeo http://vimeo.com/38686858]
|
361 |
|
@@ -372,8 +377,13 @@ There are no server requirements! Your website can be written in any programming
|
|
372 |
= What about updates? =
|
373 |
Updates are done seamlessly. Since the translations are hosted on our server we take care about updates. You just use up to date service every day.
|
374 |
|
|
|
|
|
|
|
|
|
|
|
375 |
= Can I test before making a payment? =
|
376 |
-
|
377 |
|
378 |
= Can I use it on SSL / HTTPS website? =
|
379 |
Absolutely! By default we provide a self signed certificate, but if you want we can setup verified certificate purchased by you.
|
@@ -381,8 +391,8 @@ Absolutely! By default we provide a self signed certificate, but if you want we
|
|
381 |
= Can I exclude some parts from being translated? =
|
382 |
Yes, you need to wrap the text you don't want to be translated with <span class="notranslate"></span>. You can add class="nturl" to the "a" tag if you don't want the destination URL to contain the language code.
|
383 |
|
384 |
-
= How
|
385 |
-
|
386 |
|
387 |
= How can I be sure that search engines will index my website? =
|
388 |
You can check that this website is indexed in Google by searching for site:gtranslate.io.
|
@@ -395,9 +405,15 @@ You need to go to the language you want to edit, for instance, French: http://do
|
|
395 |
1. Dropdown with flags
|
396 |
2. Nice dropdown with flags (closed)
|
397 |
3. Nice dropdown with flags (open)
|
|
|
398 |
|
399 |
== Changelog ==
|
400 |
|
|
|
|
|
|
|
|
|
|
|
401 |
= 2.0.21 =
|
402 |
* New option to render in primary menu
|
403 |
|
@@ -596,5 +612,8 @@ You need to go to the language you want to edit, for instance, French: http://do
|
|
596 |
|
597 |
== Upgrade Notice ==
|
598 |
|
|
|
|
|
|
|
599 |
= 1.0.22 =
|
600 |
Users are highly recommended to upgrade to this version!
|
4 |
Tags: translation proxy, localization, translate, translation, localization, google translate, language, multilingual, multilanguage, bilingual, tradurre, traducir, traduire, traduzione, ubersetzung, mehrsprachig, oversette, oversatta, vertaling, vertaler, meertalig, polylang, qtranslate, transposh
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.8.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
41 |
[Download GTranslate](https://gtranslate.io/?xyz=998#pricing)
|
42 |
|
43 |
**GTranslate Wordpress Demo**
|
44 |
+
[youtube https://www.youtube.com/watch?v=9mtC3LFBErY]
|
45 |
|
46 |
**Watch GTranslate Tour**
|
47 |
[vimeo http://vimeo.com/30132555]
|
48 |
|
49 |
**Edit Translations Demo (paid)**
|
50 |
+
[youtube https://www.youtube.com/watch?v=YwSy3VtQx3I]
|
51 |
|
52 |
Keywords: polylang, prisna, gts, localize, lingotek, smartling, qtranslate, loco translate, google website translator, translate wordpress, translate, transposh, global translator, machine translate, wp translate
|
53 |
|
349 |
= Which websites are supported? =
|
350 |
All the HTML websites are supported. However the contents of media files like images and flash will not be translated.
|
351 |
|
352 |
+
= Is it FREE? =
|
353 |
+
Yes! We have free version and paid versions with [advanced features](https://gtranslate.io/?xyz=998#pricing).
|
354 |
+
|
355 |
+
= How the free version differs from the paid versions? =
|
356 |
+
Free vesion is a nice looking language selector you can place on your website. It has a built in Javascript engine which allows to translate your website automatically to multiple languages. With free version your website URL doesn't change and the translations are not stored. While paid versions are a translation proxy also known as Translation Delivery Network. We host the translated versions of your website on our cloud network under a language specific domain. In that case every language will have a separate domain and be indexed in search engines, which will help you to increase international traffic and sales.
|
357 |
|
358 |
= What is a Translation Delivery Network? =
|
359 |
+
Translation Delivery Network is a translation proxy which mirrors your website in different languages.
|
360 |
+
|
361 |
+
GTranslate TDN technology is a cloud-based approach to the website translation task. There is no need to alter your environment and install software to localize your website. You can have your multilingual website up and running in less than 5 minutes.
|
362 |
|
363 |
+
We will translate your content and host your translations in our cloud network. All the visits to your translated versions will be proxied through our network to your original website, so you will have a translated mirror of your website.
|
364 |
|
365 |
[vimeo http://vimeo.com/38686858]
|
366 |
|
377 |
= What about updates? =
|
378 |
Updates are done seamlessly. Since the translations are hosted on our server we take care about updates. You just use up to date service every day.
|
379 |
|
380 |
+
If you decide to cancel during the trial period you will not be charged anything.
|
381 |
+
|
382 |
+
= Do I need to pay for Google Translate API key usage? =
|
383 |
+
No, we provide the automatic translations for free.
|
384 |
+
|
385 |
= Can I test before making a payment? =
|
386 |
+
Yes, we have a 15 days free trial for our new customers.
|
387 |
|
388 |
= Can I use it on SSL / HTTPS website? =
|
389 |
Absolutely! By default we provide a self signed certificate, but if you want we can setup verified certificate purchased by you.
|
391 |
= Can I exclude some parts from being translated? =
|
392 |
Yes, you need to wrap the text you don't want to be translated with <span class="notranslate"></span>. You can add class="nturl" to the "a" tag if you don't want the destination URL to contain the language code.
|
393 |
|
394 |
+
= How does the 15 day free trial work? =
|
395 |
+
Trial is available for new customers only. If you do not wish to continue you may cancel any time during the trial period and you will not be charged anything.
|
396 |
|
397 |
= How can I be sure that search engines will index my website? =
|
398 |
You can check that this website is indexed in Google by searching for site:gtranslate.io.
|
405 |
1. Dropdown with flags
|
406 |
2. Nice dropdown with flags (closed)
|
407 |
3. Nice dropdown with flags (open)
|
408 |
+
4. Globe with language flags
|
409 |
|
410 |
== Changelog ==
|
411 |
|
412 |
+
= 2.8.1 =
|
413 |
+
* New Globe widget look added
|
414 |
+
* Plugin localization added
|
415 |
+
* Language list reordering added
|
416 |
+
|
417 |
= 2.0.21 =
|
418 |
* New option to render in primary menu
|
419 |
|
612 |
|
613 |
== Upgrade Notice ==
|
614 |
|
615 |
+
= 2.8.1 =
|
616 |
+
A lot of new features added!
|
617 |
+
|
618 |
= 1.0.22 =
|
619 |
Users are highly recommended to upgrade to this version!
|