Version Description
- Fix for depreciated code: PLUGINDIR
Download this release
Release Info
Developer | edo888 |
Plugin | Translate WordPress with GTranslate |
Version | 2.0.20 |
Comparing to | |
See all releases |
Code changes from version 2.0.19 to 2.0.20
- gtranslate.php +8 -9
- readme.txt +7 -3
gtranslate.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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://gtranslate.io/forum/">GTranslate Forum</a>.
|
6 |
-
Version: 2.0.
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
9 |
|
@@ -77,9 +77,8 @@ class GTranslate extends WP_Widget {
|
|
77 |
public static function enqueue_scripts() {
|
78 |
$data = get_option('GTranslate');
|
79 |
GTranslate::load_defaults($data);
|
80 |
-
$wp_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
|
81 |
|
82 |
-
wp_enqueue_style('gtranslate-style',
|
83 |
wp_enqueue_script('jquery');
|
84 |
}
|
85 |
|
@@ -146,7 +145,7 @@ class GTranslate extends WP_Widget {
|
|
146 |
?>
|
147 |
<div class="wrap">
|
148 |
<div id="icon-options-general" class="icon32"><br/></div>
|
149 |
-
<h2><img src="<?php echo
|
150 |
<?php
|
151 |
if(isset($_POST['save']) and $_POST['save'])
|
152 |
GTranslate::control_options();
|
@@ -154,7 +153,7 @@ class GTranslate extends WP_Widget {
|
|
154 |
GTranslate::load_defaults($data);
|
155 |
|
156 |
$site_url = site_url();
|
157 |
-
$wp_plugin_url =
|
158 |
|
159 |
extract($data);
|
160 |
|
@@ -253,13 +252,13 @@ function RefreshDoWidgetCode() {
|
|
253 |
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.', '://');
|
254 |
|
255 |
if(lang == 'en' && jQuery('#alt_us:checked').length)
|
256 |
-
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl alt_flag us_flag"><img src="{$
|
257 |
else if(lang == 'pt' && jQuery('#alt_br:checked').length)
|
258 |
-
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl alt_flag br_flag"><img src="{$
|
259 |
else if(lang == 'es' && jQuery('#alt_mx:checked').length)
|
260 |
-
widget_preview += '<a href="'+href+'" onclick="doGTranslate(\''+default_language+'|'+lang+'\');return false;" title="'+lang_name+'" class="gflag nturl alt_flag mx_flag"><img src="{$
|
261 |
else
|
262 |
-
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="{$
|
263 |
}
|
264 |
});
|
265 |
}
|
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://gtranslate.io/forum/">GTranslate Forum</a>.
|
6 |
+
Version: 2.0.20
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
9 |
|
77 |
public static function enqueue_scripts() {
|
78 |
$data = get_option('GTranslate');
|
79 |
GTranslate::load_defaults($data);
|
|
|
80 |
|
81 |
+
wp_enqueue_style( 'gtranslate-style', plugins_url('gtranslate-style'.$data['flag_size'].'.css', __FILE__) );
|
82 |
wp_enqueue_script('jquery');
|
83 |
}
|
84 |
|
145 |
?>
|
146 |
<div class="wrap">
|
147 |
<div id="icon-options-general" class="icon32"><br/></div>
|
148 |
+
<h2><img src="<?php echo plugins_url('gt-logo.png', __FILE__); ?>" border="0" title="GTranslate - your window to the world" alt="GTranslate"></h2>
|
149 |
<?php
|
150 |
if(isset($_POST['save']) and $_POST['save'])
|
151 |
GTranslate::control_options();
|
153 |
GTranslate::load_defaults($data);
|
154 |
|
155 |
$site_url = site_url();
|
156 |
+
$wp_plugin_url = plugins_url() . '/gtranslate';
|
157 |
|
158 |
extract($data);
|
159 |
|
252 |
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.', '://');
|
253 |
|
254 |
if(lang == 'en' && jQuery('#alt_us:checked').length)
|
255 |
+
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>';
|
256 |
else if(lang == 'pt' && jQuery('#alt_br:checked').length)
|
257 |
+
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>';
|
258 |
else if(lang == 'es' && jQuery('#alt_mx:checked').length)
|
259 |
+
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>';
|
260 |
else
|
261 |
+
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>';
|
262 |
}
|
263 |
});
|
264 |
}
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Translate Wordpress with GTranslate ===
|
2 |
Contributors: edo888
|
3 |
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
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 2.0.
|
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
|
@@ -33,6 +33,7 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
|
|
33 |
* Google language translator widget
|
34 |
* Available styles Dropdown/Flags/Flags with dropdown/Nice dropdown with flags
|
35 |
* Valid XHTML
|
|
|
36 |
* (paid) You can manually correct translations
|
37 |
* (paid) You can have sub-directory (example.com/**es**/) or sub-domain (**es.**example.com) URL structure
|
38 |
* (paid) URL Translation is possible (example.com/about-us -> example.es/sobre-nosotros)
|
@@ -48,7 +49,7 @@ https://www.youtube.com/watch?v=9mtC3LFBErY
|
|
48 |
**Edit Translations Demo (paid)**
|
49 |
https://www.youtube.com/watch?v=YwSy3VtQx3I
|
50 |
|
51 |
-
Keywords: polylang, prisna, gts, localize, lingotek, smartling, qtranslate, loco translate, google website translator, translate wordpress, translate, transposh,
|
52 |
|
53 |
== Installation ==
|
54 |
|
@@ -397,6 +398,9 @@ You need to go to the language you want to edit, for instance, French: http://do
|
|
397 |
|
398 |
== Changelog ==
|
399 |
|
|
|
|
|
|
|
400 |
= 2.0.19 =
|
401 |
* Added support message
|
402 |
* Added Live Chat on GTranslate options page
|
1 |
=== Translate Wordpress with GTranslate ===
|
2 |
Contributors: edo888
|
3 |
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.6
|
7 |
+
Stable tag: 2.0.20
|
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
|
33 |
* Google language translator widget
|
34 |
* Available styles Dropdown/Flags/Flags with dropdown/Nice dropdown with flags
|
35 |
* Valid XHTML
|
36 |
+
* Alternative for WPML, qtranslate, transposh and polylang
|
37 |
* (paid) You can manually correct translations
|
38 |
* (paid) You can have sub-directory (example.com/**es**/) or sub-domain (**es.**example.com) URL structure
|
39 |
* (paid) URL Translation is possible (example.com/about-us -> example.es/sobre-nosotros)
|
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 |
|
54 |
== Installation ==
|
55 |
|
398 |
|
399 |
== Changelog ==
|
400 |
|
401 |
+
= 2.0.20 =
|
402 |
+
* Fix for depreciated code: PLUGINDIR
|
403 |
+
|
404 |
= 2.0.19 =
|
405 |
* Added support message
|
406 |
* Added Live Chat on GTranslate options page
|