Version Description
- Tweaks to make it work better with WooCommerce
- Fixed bug when turning off native language names option
- Fixed bug with reordering languages
- Fixed bug with updating the plugin when using sub-directory option
- Fixed bug in doGTrnaslate javascript function
- Fixed bug with floating selector when admin bar is visible (thanks to @redoper)
- Readme updated to comply with Wordpress directory guidelines (keywords removed WPML, qtranslate, transposh, loco translate, polylang, prisna translate, gts translation, lingotek, google website translator, global translator)
Download this release
Release Info
Developer | edo888 |
Plugin | Translate WordPress with GTranslate |
Version | 2.8.12 |
Comparing to | |
See all releases |
Code changes from version 2.8.11 to 2.8.12
- gtranslate.php +52 -32
- readme.txt +78 -384
- url_addon/gtranslate.php +7 -0
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://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
|
6 |
-
Version: 2.8.
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
9 |
Text Domain: gtranslate
|
@@ -76,8 +76,25 @@ class GTranslate extends WP_Widget {
|
|
76 |
wp_enqueue_style( 'gtranslate-style', plugins_url('gtranslate-style'.$data['flag_size'].'.css', __FILE__) );
|
77 |
wp_enqueue_script('jquery');
|
78 |
|
79 |
-
//
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
public static function load_textdomain() {
|
@@ -269,8 +286,8 @@ function RefreshDoWidgetCode() {
|
|
269 |
if(translation_method == 'on_fly' || translation_method == 'redirect' || translation_method == 'onfly') {
|
270 |
// Adding flags and names
|
271 |
if(widget_look == 'flags' || widget_look == 'flags_dropdown' || widget_look == 'flags_name' || widget_look == 'flags_code' || widget_look == 'lang_names' || widget_look == 'lang_codes') {
|
272 |
-
jQuery.each(language_codes2, function(i, val) {
|
273 |
-
lang = language_codes2[i];
|
274 |
if(widget_look == 'lang_names' || widget_look == 'lang_codes')
|
275 |
chklist = '#incl_langs';
|
276 |
else
|
@@ -427,7 +444,7 @@ function RefreshDoWidgetCode() {
|
|
427 |
} while (j - i < 10 * count);
|
428 |
|
429 |
|
430 |
-
$('.gsatelites').append('<span class="gsatelite gs' + (i + 1) + ' glang_' +
|
431 |
$('.gs' + (i + 1)).delay((i + 1) * 10).fadeIn('fast');
|
432 |
|
433 |
}
|
@@ -486,8 +503,8 @@ function hideGSatelites($) {
|
|
486 |
|
487 |
widget_preview += '<div class="option">'+new_line;
|
488 |
|
489 |
-
jQuery.each(
|
490 |
-
lang =
|
491 |
if(jQuery('#fincl_langs'+lang+':checked').length) {
|
492 |
lang_name = gt_lang_array[lang];
|
493 |
//flag_x = languages_map[lang.replace('-', '')+'_x'];
|
@@ -579,14 +596,14 @@ function hideGSatelites($) {
|
|
579 |
} else if(enterprise_version && translation_method == 'redirect' && new_window) {
|
580 |
widget_code += "function openTab(url) {var form=document.createElement('form');form.method='post';form.action=url;form.target='_blank';document.body.appendChild(form);form.submit();}"+new_line;
|
581 |
if(analytics)
|
582 |
-
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(typeof _gaq!='undefined'){_gaq.push(['_trackEvent', 'GTranslate', lang, location.hostname+location.pathname+location.search]);}else {if(typeof ga!='undefined')ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';openTab(location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '
|
583 |
else
|
584 |
-
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';openTab(location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '
|
585 |
} else if(enterprise_version && translation_method == 'redirect') {
|
586 |
if(analytics)
|
587 |
-
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(typeof _gaq!='undefined'){_gaq.push(['_trackEvent', 'GTranslate', lang, location.hostname+location.pathname+location.search]);}else {if(typeof ga!='undefined')ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';location.href=location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '
|
588 |
else
|
589 |
-
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';location.href=location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '
|
590 |
} else if(translation_method == 'onfly') {
|
591 |
widget_code += "function GTranslateGetCurrentLang() {var keyValue = document.cookie.match('(^|;) ?googtrans=([^;]*)(;|$)');return keyValue ? keyValue[2].split('/')[2] : null;}"+new_line;
|
592 |
widget_code += "function GTranslateFireEvent(element,event){try{if(document.createEventObject){var evt=document.createEventObject();element.fireEvent('on'+event,evt)}else{var evt=document.createEvent('HTMLEvents');evt.initEvent(event,true,true);element.dispatchEvent(evt)}}catch(e){}}"+new_line;
|
@@ -664,7 +681,7 @@ if('$widget_look' == 'flags_dropdown') {
|
|
664 |
jQuery('#line_break_option').hide();
|
665 |
}
|
666 |
|
667 |
-
if('$widget_look' == 'dropdown_with_flags' || '$widget_look' == 'dropdown' || '$widget_look' == '
|
668 |
jQuery('#flag_size_option').hide();
|
669 |
} else {
|
670 |
jQuery('#flag_size_option').show();
|
@@ -704,14 +721,14 @@ jQuery(function(){
|
|
704 |
EOT;
|
705 |
|
706 |
// selected languages
|
|
|
|
|
707 |
if(count($incl_langs) > 0)
|
708 |
$script .= "jQuery.each(languages, function(i, val) {jQuery('#incl_langs'+language_codes2[i]).attr('checked', false);});\n";
|
709 |
-
if(count($fincl_langs) > 0)
|
710 |
-
$script .= "jQuery.each(languages, function(i, val) {jQuery('#fincl_langs'+language_codes2[i]).attr('checked', false);});\n";
|
711 |
-
foreach($incl_langs as $lang)
|
712 |
-
$script .= "jQuery('#incl_langs$lang').attr('checked', true);\n";
|
713 |
foreach($fincl_langs as $lang)
|
714 |
$script .= "jQuery('#fincl_langs$lang').attr('checked', true);\n";
|
|
|
|
|
715 |
|
716 |
// alt flags
|
717 |
foreach($alt_flags as $flag)
|
@@ -735,11 +752,11 @@ foreach($alt_flags as $flag)
|
|
735 |
<option value="dropdown_with_flags"><?php _e('Nice dropdown with flags', 'gtranslate'); ?></option>
|
736 |
<option value="dropdown"><?php _e('Dropdown', 'gtranslate'); ?></option>
|
737 |
<option value="flags"><?php _e('Flags', 'gtranslate'); ?></option>
|
|
|
|
|
|
|
|
|
738 |
<option value="globe">(new) <?php _e('Globe', 'gtranslate'); ?></option>
|
739 |
-
<option value="flags_name">(new) <?php _e('Flags with language name', 'gtranslate'); ?></option>
|
740 |
-
<option value="flags_code">(new) <?php _e('Flags with language code', 'gtranslate'); ?></option>
|
741 |
-
<option value="lang_names">(new) <?php _e('Language names', 'gtranslate'); ?></option>
|
742 |
-
<option value="lang_codes">(new) <?php _e('Language codes', 'gtranslate'); ?></option>
|
743 |
</select>
|
744 |
</td>
|
745 |
</tr>
|
@@ -917,7 +934,7 @@ foreach($alt_flags as $flag)
|
|
917 |
<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 />
|
918 |
|
919 |
<div style="overflow:hidden;">
|
920 |
-
<?php $gt_lang_codes = explode(',', $
|
921 |
<?php for($i = 0; $i < count($gt_lang_array) / 26; $i++): ?>
|
922 |
<ul style="list-style-type:none;width:25%;float:left;" class="connectedSortable1">
|
923 |
<?php for($j = $i * 26; $j < 26 * ($i+1); $j++): ?>
|
@@ -1012,7 +1029,7 @@ foreach($alt_flags as $flag)
|
|
1012 |
<li style="margin:0;"><?php _e('SSL support', 'gtranslate'); ?></li>
|
1013 |
</ul>
|
1014 |
|
1015 |
-
<a href="https://gtranslate.io/?xyz=998#pricing" target="_blank"><?php _e('15 day free trial', 'gtranslate'); ?></a> | <a href="https://gtranslate.io/?xyz=998#faq" target="_blank"><?php _e('FAQ', 'gtranslate'); ?></a>
|
1016 |
</div>
|
1017 |
</div>
|
1018 |
</div>
|
@@ -1098,7 +1115,7 @@ foreach($alt_flags as $flag)
|
|
1098 |
$data['new_window'] = isset($_POST['new_window']) ? intval($_POST['new_window']) : '';
|
1099 |
$data['show_in_menu'] = isset($_POST['show_in_menu']) ? sanitize_text_field($_POST['show_in_menu']) : '';
|
1100 |
$data['floating_language_selector'] = isset($_POST['floating_language_selector']) ? sanitize_text_field($_POST['floating_language_selector']) : 'no';
|
1101 |
-
$data['native_language_names'] = isset($_POST['native_language_names']) ? intval($_POST['native_language_names']) :
|
1102 |
$data['analytics'] = isset($_POST['analytics']) ? intval($_POST['analytics']) : '';
|
1103 |
$data['add_new_line'] = isset($_POST['add_new_line']) ? intval($_POST['add_new_line']) : '';
|
1104 |
$data['default_language'] = isset($_POST['default_language']) ? sanitize_text_field($_POST['default_language']) : 'en';
|
@@ -1106,8 +1123,8 @@ foreach($alt_flags as $flag)
|
|
1106 |
$data['widget_look'] = isset($_POST['widget_look']) ? sanitize_text_field($_POST['widget_look']) : 'flags_dropdown';
|
1107 |
$data['flag_size'] = isset($_POST['flag_size']) ? intval($_POST['flag_size']) : '16';
|
1108 |
$data['widget_code'] = isset($_POST['widget_code']) ? stripslashes($_POST['widget_code']) : '';
|
1109 |
-
$data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array('
|
1110 |
-
$data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array('
|
1111 |
$data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
|
1112 |
$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';
|
1113 |
$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';
|
@@ -1172,13 +1189,13 @@ foreach($alt_flags as $flag)
|
|
1172 |
$data['translation_method'] = isset($data['translation_method']) ? $data['translation_method'] : 'onfly';
|
1173 |
if($data['translation_method'] == 'on_fly') $data['translation_method'] = 'redirect';
|
1174 |
|
1175 |
-
$data['widget_look'] = isset($data['widget_look']) ? $data['widget_look'] : '
|
1176 |
-
$data['flag_size'] = isset($data['flag_size']) ? $data['flag_size'] : '
|
1177 |
$data['widget_code'] = isset($data['widget_code']) ? $data['widget_code'] : '';
|
1178 |
-
$data['incl_langs'] = isset($data['incl_langs']) ? $data['incl_langs'] : array();
|
1179 |
-
$data['fincl_langs'] = isset($data['fincl_langs']) ? $data['fincl_langs'] : array();
|
1180 |
$data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
|
1181 |
-
$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';
|
1182 |
$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';
|
1183 |
}
|
1184 |
}
|
@@ -1536,7 +1553,10 @@ if($data['floating_language_selector'] != 'no' and !is_admin()) {
|
|
1536 |
GTranslate::load_defaults($data);
|
1537 |
|
1538 |
if($data['widget_look'] == 'dropdown_with_flags')
|
1539 |
-
$
|
|
|
|
|
|
|
1540 |
else
|
1541 |
$vertical_location = '5%';
|
1542 |
|
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.12
|
7 |
Author: Edvard Ananyan
|
8 |
Author URI: https://gtranslate.io
|
9 |
Text Domain: gtranslate
|
76 |
wp_enqueue_style( 'gtranslate-style', plugins_url('gtranslate-style'.$data['flag_size'].'.css', __FILE__) );
|
77 |
wp_enqueue_script('jquery');
|
78 |
|
79 |
+
// make sure main_lang is set correctly in config.php file
|
80 |
+
if($data['pro_version']) {
|
81 |
+
include dirname(__FILE__) . '/url_addon/config.php';
|
82 |
+
|
83 |
+
if($main_lang != $data['default_language']) { // update main_lang in config.php
|
84 |
+
$config_file = dirname(__FILE__) . '/url_addon/config.php';
|
85 |
+
if(is_writable($config_file)) {
|
86 |
+
$config = file_get_contents($config_file);
|
87 |
+
$config = preg_replace('/\$main_lang = \'[a-z-]{2,5}\'/i', '$main_lang = \''.$data['default_language'].'\'', $config);
|
88 |
+
file_put_contents($config_file, $config);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
// disable conflicting plugins
|
94 |
+
if(get_option('googlelanguagetranslator_active', 0))
|
95 |
+
update_option('googlelanguagetranslator_active', 0);
|
96 |
+
if(get_option('wg_allowed', 0))
|
97 |
+
update_option('wg_allowed', 0);
|
98 |
}
|
99 |
|
100 |
public static function load_textdomain() {
|
286 |
if(translation_method == 'on_fly' || translation_method == 'redirect' || translation_method == 'onfly') {
|
287 |
// Adding flags and names
|
288 |
if(widget_look == 'flags' || widget_look == 'flags_dropdown' || widget_look == 'flags_name' || widget_look == 'flags_code' || widget_look == 'lang_names' || widget_look == 'lang_codes') {
|
289 |
+
jQuery.each(((widget_look == 'flags' || widget_look == 'flags_dropdown' || widget_look == 'flags_name' || widget_look == 'flags_code') ? language_codes : language_codes2), function(i, val) {
|
290 |
+
lang = (widget_look == 'flags' || widget_look == 'flags_dropdown' || widget_look == 'flags_name' || widget_look == 'flags_code') ? language_codes[i] : language_codes2[i];
|
291 |
if(widget_look == 'lang_names' || widget_look == 'lang_codes')
|
292 |
chklist = '#incl_langs';
|
293 |
else
|
444 |
} while (j - i < 10 * count);
|
445 |
|
446 |
|
447 |
+
$('.gsatelites').append('<span class="gsatelite gs' + (i + 1) + ' glang_' + language_codes2[i] + '" onclick="doGTranslate(`+"\\\\'"+default_language+`|'+language_codes2[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_codes2[i]) + '.png);left:' + x + 'px;top:' + y + 'px;"></span>');
|
448 |
$('.gs' + (i + 1)).delay((i + 1) * 10).fadeIn('fast');
|
449 |
|
450 |
}
|
503 |
|
504 |
widget_preview += '<div class="option">'+new_line;
|
505 |
|
506 |
+
jQuery.each(language_codes, function(i, val) {
|
507 |
+
lang = language_codes[i];
|
508 |
if(jQuery('#fincl_langs'+lang+':checked').length) {
|
509 |
lang_name = gt_lang_array[lang];
|
510 |
//flag_x = languages_map[lang.replace('-', '')+'_x'];
|
596 |
} else if(enterprise_version && translation_method == 'redirect' && new_window) {
|
597 |
widget_code += "function openTab(url) {var form=document.createElement('form');form.method='post';form.action=url;form.target='_blank';document.body.appendChild(form);form.submit();}"+new_line;
|
598 |
if(analytics)
|
599 |
+
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(typeof _gaq!='undefined'){_gaq.push(['_trackEvent', 'GTranslate', lang, location.hostname+location.pathname+location.search]);}else {if(typeof ga!='undefined')ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';openTab(location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '\\\\\\\\.'), '')+gt_request_uri);}"+new_line;
|
600 |
else
|
601 |
+
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';openTab(location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '\\\\\\\\.'), '')+gt_request_uri);}"+new_line;
|
602 |
} else if(enterprise_version && translation_method == 'redirect') {
|
603 |
if(analytics)
|
604 |
+
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(typeof _gaq!='undefined'){_gaq.push(['_trackEvent', 'GTranslate', lang, location.hostname+location.pathname+location.search]);}else {if(typeof ga!='undefined')ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';location.href=location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '\\\\\\\\.'), '')+gt_request_uri;}"+new_line;
|
605 |
else
|
606 |
+
widget_code += "function doGTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.hostname.split('.')[0];if(plang.length !=2 && plang.toLowerCase() != 'zh-cn' && plang.toLowerCase() != 'zh-tw')plang='"+default_language+"';location.href=location.protocol+'//'+(lang == '"+default_language+"' ? '' : lang+'.')+location.hostname.replace('www.', '').replace(RegExp('^' + plang + '\\\\\\\\.'), '')+gt_request_uri;}"+new_line;
|
607 |
} else if(translation_method == 'onfly') {
|
608 |
widget_code += "function GTranslateGetCurrentLang() {var keyValue = document.cookie.match('(^|;) ?googtrans=([^;]*)(;|$)');return keyValue ? keyValue[2].split('/')[2] : null;}"+new_line;
|
609 |
widget_code += "function GTranslateFireEvent(element,event){try{if(document.createEventObject){var evt=document.createEventObject();element.fireEvent('on'+event,evt)}else{var evt=document.createEvent('HTMLEvents');evt.initEvent(event,true,true);element.dispatchEvent(evt)}}catch(e){}}"+new_line;
|
681 |
jQuery('#line_break_option').hide();
|
682 |
}
|
683 |
|
684 |
+
if('$widget_look' == 'dropdown_with_flags' || '$widget_look' == 'dropdown' || '$widget_look' == 'lang_names' || '$widget_look' == 'lang_codes') {
|
685 |
jQuery('#flag_size_option').hide();
|
686 |
} else {
|
687 |
jQuery('#flag_size_option').show();
|
721 |
EOT;
|
722 |
|
723 |
// selected languages
|
724 |
+
if(count($fincl_langs) > 0)
|
725 |
+
$script .= "jQuery.each(languages, function(i, val) {jQuery('#fincl_langs'+language_codes[i]).attr('checked', false);});\n";
|
726 |
if(count($incl_langs) > 0)
|
727 |
$script .= "jQuery.each(languages, function(i, val) {jQuery('#incl_langs'+language_codes2[i]).attr('checked', false);});\n";
|
|
|
|
|
|
|
|
|
728 |
foreach($fincl_langs as $lang)
|
729 |
$script .= "jQuery('#fincl_langs$lang').attr('checked', true);\n";
|
730 |
+
foreach($incl_langs as $lang)
|
731 |
+
$script .= "jQuery('#incl_langs$lang').attr('checked', true);\n";
|
732 |
|
733 |
// alt flags
|
734 |
foreach($alt_flags as $flag)
|
752 |
<option value="dropdown_with_flags"><?php _e('Nice dropdown with flags', 'gtranslate'); ?></option>
|
753 |
<option value="dropdown"><?php _e('Dropdown', 'gtranslate'); ?></option>
|
754 |
<option value="flags"><?php _e('Flags', 'gtranslate'); ?></option>
|
755 |
+
<option value="flags_name"><?php _e('Flags with language name', 'gtranslate'); ?></option>
|
756 |
+
<option value="flags_code"><?php _e('Flags with language code', 'gtranslate'); ?></option>
|
757 |
+
<option value="lang_names"><?php _e('Language names', 'gtranslate'); ?></option>
|
758 |
+
<option value="lang_codes"><?php _e('Language codes', 'gtranslate'); ?></option>
|
759 |
<option value="globe">(new) <?php _e('Globe', 'gtranslate'); ?></option>
|
|
|
|
|
|
|
|
|
760 |
</select>
|
761 |
</td>
|
762 |
</tr>
|
934 |
<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 />
|
935 |
|
936 |
<div style="overflow:hidden;">
|
937 |
+
<?php $gt_lang_codes = explode(',', $language_codes); ?>
|
938 |
<?php for($i = 0; $i < count($gt_lang_array) / 26; $i++): ?>
|
939 |
<ul style="list-style-type:none;width:25%;float:left;" class="connectedSortable1">
|
940 |
<?php for($j = $i * 26; $j < 26 * ($i+1); $j++): ?>
|
1029 |
<li style="margin:0;"><?php _e('SSL support', 'gtranslate'); ?></li>
|
1030 |
</ul>
|
1031 |
|
1032 |
+
<a href="https://gtranslate.io/?xyz=998#pricing" target="_blank"><?php _e('15 day free trial', 'gtranslate'); ?></a> | <a href="https://gtranslate.io/?xyz=998#faq" target="_blank"><?php _e('FAQ', 'gtranslate'); ?></a> | <a href="https://gtranslate.io/?xyz=998#contact" target="_blank"><?php _e('Live Chat', 'gtranslate'); ?></a>
|
1033 |
</div>
|
1034 |
</div>
|
1035 |
</div>
|
1115 |
$data['new_window'] = isset($_POST['new_window']) ? intval($_POST['new_window']) : '';
|
1116 |
$data['show_in_menu'] = isset($_POST['show_in_menu']) ? sanitize_text_field($_POST['show_in_menu']) : '';
|
1117 |
$data['floating_language_selector'] = isset($_POST['floating_language_selector']) ? sanitize_text_field($_POST['floating_language_selector']) : 'no';
|
1118 |
+
$data['native_language_names'] = isset($_POST['native_language_names']) ? intval($_POST['native_language_names']) : '';
|
1119 |
$data['analytics'] = isset($_POST['analytics']) ? intval($_POST['analytics']) : '';
|
1120 |
$data['add_new_line'] = isset($_POST['add_new_line']) ? intval($_POST['add_new_line']) : '';
|
1121 |
$data['default_language'] = isset($_POST['default_language']) ? sanitize_text_field($_POST['default_language']) : 'en';
|
1123 |
$data['widget_look'] = isset($_POST['widget_look']) ? sanitize_text_field($_POST['widget_look']) : 'flags_dropdown';
|
1124 |
$data['flag_size'] = isset($_POST['flag_size']) ? intval($_POST['flag_size']) : '16';
|
1125 |
$data['widget_code'] = isset($_POST['widget_code']) ? stripslashes($_POST['widget_code']) : '';
|
1126 |
+
$data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array($data['default_language']);
|
1127 |
+
$data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array($data['default_language']);
|
1128 |
$data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
|
1129 |
$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';
|
1130 |
$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';
|
1189 |
$data['translation_method'] = isset($data['translation_method']) ? $data['translation_method'] : 'onfly';
|
1190 |
if($data['translation_method'] == 'on_fly') $data['translation_method'] = 'redirect';
|
1191 |
|
1192 |
+
$data['widget_look'] = isset($data['widget_look']) ? $data['widget_look'] : 'dropdown_with_flags';
|
1193 |
+
$data['flag_size'] = isset($data['flag_size']) ? $data['flag_size'] : '24';
|
1194 |
$data['widget_code'] = isset($data['widget_code']) ? $data['widget_code'] : '';
|
1195 |
+
$data['incl_langs'] = isset($data['incl_langs']) ? $data['incl_langs'] : array('en', 'es', 'it', 'pt', 'de', 'fr', 'ru', 'nl', 'ar', 'zh-CN');
|
1196 |
+
$data['fincl_langs'] = isset($data['fincl_langs']) ? $data['fincl_langs'] : array('en', 'es', 'it', 'pt', 'de', 'fr', 'ru', 'nl', 'ar', 'zh-CN');
|
1197 |
$data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
|
1198 |
+
$data['language_codes'] = (isset($data['language_codes']) and !empty($data['language_codes'])) ? $data['language_codes'] : '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';
|
1199 |
$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';
|
1200 |
}
|
1201 |
}
|
1553 |
GTranslate::load_defaults($data);
|
1554 |
|
1555 |
if($data['widget_look'] == 'dropdown_with_flags')
|
1556 |
+
if(is_admin_bar_showing() and ($data['floating_language_selector'] == 'top_left' or $data['floating_language_selector'] == 'top_right'))
|
1557 |
+
$vertical_location = '32px';
|
1558 |
+
else
|
1559 |
+
$vertical_location = '0';
|
1560 |
else
|
1561 |
$vertical_location = '5%';
|
1562 |
|
readme.txt
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
=== Translate Wordpress with GTranslate ===
|
2 |
Contributors: edo888
|
3 |
Author: Edvard Ananyan
|
4 |
-
Tags:
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.8.
|
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
|
11 |
|
12 |
-
Translate WordPress with Google Translate multilanguage plugin to make your website multilingual
|
13 |
|
14 |
== Description ==
|
15 |
|
@@ -27,19 +27,38 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
|
|
27 |
* Hides "Suggest better translation" pop-up
|
28 |
* Hides Google top frame after translation
|
29 |
* Mouse over effect
|
30 |
-
* Flags combined in one file to load faster
|
31 |
* Google Analytics integration
|
32 |
* Translates the site on the fly
|
33 |
* Google language translator widget
|
34 |
* Available styles Dropdown, Flags, Flags with dropdown, Nice dropdown with flags, Flags with language names, Flags with language codes, Language names, Language codes, Globe
|
35 |
* Floating language selector
|
36 |
-
* Language bar in menu
|
|
|
37 |
* Multilanguage
|
38 |
* Multilingual language names in native alphabet
|
39 |
-
* Alternative for
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
[Download GTranslate](https://gtranslate.io/?xyz=998#pricing)
|
45 |
|
@@ -52,389 +71,37 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
|
|
52 |
**Edit Translations Demo (paid)**
|
53 |
[youtube https://www.youtube.com/watch?v=YwSy3VtQx3I]
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
1. Upload `gtranslate` folder to the `/wp-content/plugins/` directory
|
58 |
-
2. Activate the plugin through the 'Plugins' menu in WordPress
|
59 |
-
3. You can add a widget to your website or use [GTranslate] syntax inside pages where you want it to appear.
|
60 |
-
|
61 |
-
== Google Translate history ==
|
62 |
-
|
63 |
-
= Country Language Map =
|
64 |
-
United Kingdom (alt USA) English en
|
65 |
-
South Africa Afrikaans af
|
66 |
-
Albania Albanian sq
|
67 |
-
Ethiopia Amharic am
|
68 |
-
Arab League Arabic ar
|
69 |
-
Armenia Armenian hy
|
70 |
-
Azerbaijan Azerbaijani az
|
71 |
-
Basque Country Basque eu
|
72 |
-
Belarus Belarusian be
|
73 |
-
Bangladesh Bengali bn
|
74 |
-
Bosnia & Herzegovina Bosnian bs
|
75 |
-
Bulgaria Bulgarian bg
|
76 |
-
Catalonia Catalan ca
|
77 |
-
Philippines Cebuano ceb
|
78 |
-
Malawi Chichewa ny
|
79 |
-
China Chinese (Simplified) zh-CN
|
80 |
-
Taiwan Chinese (Traditional) zh-TW
|
81 |
-
Corsica Corsican co
|
82 |
-
Croatia Croatian hr
|
83 |
-
Czech Republic Czech cs
|
84 |
-
Denmark Danish da
|
85 |
-
Netherlands Dutch nl
|
86 |
-
Esperanto Esperanto eo
|
87 |
-
Estonia Estonian et
|
88 |
-
Philippines Filipino tl
|
89 |
-
Finland Finnish fi
|
90 |
-
France French fr
|
91 |
-
Frisia Frisian fy
|
92 |
-
Galicia Galician gl
|
93 |
-
Georgia Georgian ka
|
94 |
-
Germany German de
|
95 |
-
Greece Greek el
|
96 |
-
India Gujarati gu
|
97 |
-
Haiti Haitian Creole ht
|
98 |
-
Nigeria Hausa ha
|
99 |
-
Hawaii state Hawaiian haw
|
100 |
-
Israel Hebrew iw
|
101 |
-
India Hindi hi
|
102 |
-
China Hmong hmn
|
103 |
-
Hungary Hungarian hu
|
104 |
-
Iceland Icelandic is
|
105 |
-
Nigeria Igbo ig
|
106 |
-
Indonezia Indonesian id
|
107 |
-
Ireland Irish ga
|
108 |
-
Italy Italian it
|
109 |
-
Japan Japanese ja
|
110 |
-
Indonezia Javanese jw
|
111 |
-
India Kannada kn
|
112 |
-
Kazakhstan Kazakh kk
|
113 |
-
Cambodja Khmer km
|
114 |
-
South Korea Korean ko
|
115 |
-
Roj flag Kurdish (Kurmanji) ku
|
116 |
-
Kyrgyzstan Kyrgyz ky
|
117 |
-
Laos Lao lo
|
118 |
-
Vatican City Latin la
|
119 |
-
Latvia Latvian lv
|
120 |
-
Lithuania Lithuanian lt
|
121 |
-
Luxembourg Luxembourgish lb
|
122 |
-
Macedonia Macedonian mk
|
123 |
-
Madagascar Malagasy mg
|
124 |
-
Malaysia Malay ms
|
125 |
-
India Malayalam ml
|
126 |
-
Malta Maltese mt
|
127 |
-
New Zealand Maori mi
|
128 |
-
India Marathi mr
|
129 |
-
Mongolia Mongolian mn
|
130 |
-
Myanmar(Burma) Myanmar (Burmese) my
|
131 |
-
Nepal Nepali ne
|
132 |
-
Norway Norwegian no
|
133 |
-
Afghanistan Pashto ps
|
134 |
-
Iran Persian fa
|
135 |
-
Poland Polish pl
|
136 |
-
Portugal (alt Brazil) Portuguese pt
|
137 |
-
India Punjabi pa
|
138 |
-
Romania Romanian ro
|
139 |
-
Russian Federation Russian ru
|
140 |
-
Samoa Samoan sm
|
141 |
-
Scotland Scottish Gaelic gd
|
142 |
-
Serbia(Yugoslavia) Serbian sr
|
143 |
-
Lesotho Sesotho st
|
144 |
-
Zimbabwe Shona sn
|
145 |
-
Pakistan Sindhi sd
|
146 |
-
Sri Lanka Sinhala si
|
147 |
-
Slovakia Slovak sk
|
148 |
-
Slovenia Slovenian sl
|
149 |
-
Somalia Somali so
|
150 |
-
Spain (alt Mexico) Spanish es
|
151 |
-
Sudan Sudanese su
|
152 |
-
Tanzania Swahili sw
|
153 |
-
Sweden Swedish sv
|
154 |
-
Tajikistan Tajik tg
|
155 |
-
India Tamil ta
|
156 |
-
India Telugu te
|
157 |
-
Thailand Thai th
|
158 |
-
Turkey Turkish tr
|
159 |
-
Ukraine Ukrainian uk
|
160 |
-
Pakistan Urdu ur
|
161 |
-
Uzbekistan Uzbek uz
|
162 |
-
Viet Nam Vietnamese vi
|
163 |
-
Wales Welsh cy
|
164 |
-
South Africa Xhosa xh
|
165 |
-
Israel Yiddish yi
|
166 |
-
Nigeria Yoruba yo
|
167 |
-
South Africa Zulu zu
|
168 |
-
|
169 |
-
= Supported languages =
|
170 |
-
**1st stage**
|
171 |
-
|
172 |
-
* English to and from German
|
173 |
-
* English to and from Spanish
|
174 |
-
* English to and from French
|
175 |
-
|
176 |
-
**2nd stage**
|
177 |
-
|
178 |
-
* English to and from Portuguese
|
179 |
-
|
180 |
-
**3rd stage**
|
181 |
-
|
182 |
-
* English to and from Italian
|
183 |
-
|
184 |
-
**4th stage**
|
185 |
-
|
186 |
-
* English to and from Chinese (Simplified)
|
187 |
-
* English to and from Japanese
|
188 |
-
* English to and from Korean
|
189 |
-
|
190 |
-
**5th stage (launched April 28, 2006)**
|
191 |
-
|
192 |
-
* English to and from Arabic
|
193 |
-
|
194 |
-
**6th stage (launched December 16, 2006)**
|
195 |
-
|
196 |
-
* English to and from Russian
|
197 |
-
|
198 |
-
**7th stage (launched February 9, 2007)**
|
199 |
-
|
200 |
-
* English to and from Chinese (Traditional)
|
201 |
-
* Chinese (Simplified to and from Traditional)
|
202 |
-
|
203 |
-
**8th stage (all 25 language pairs use Google's machine translation system) (launched October 22, 2007)**
|
204 |
-
|
205 |
-
* English to and from Dutch
|
206 |
-
* English to and from Greek
|
207 |
-
|
208 |
-
**9th stage**
|
209 |
-
|
210 |
-
* English to and from Hindi
|
211 |
-
|
212 |
-
**10th stage (as of this stage, translation can be done between any two languages, using English as an intermediate step, if needed) (launched May 8, 2008)**
|
213 |
-
|
214 |
-
* Bulgarian
|
215 |
-
* Croatian
|
216 |
-
* Czech
|
217 |
-
* Danish
|
218 |
-
* Finnish
|
219 |
-
* Norwegian
|
220 |
-
* Polish
|
221 |
-
* Romanian
|
222 |
-
* Swedish
|
223 |
-
|
224 |
-
**11th stage (launched September 25, 2008)**
|
225 |
-
|
226 |
-
* Catalan
|
227 |
-
* Filipino
|
228 |
-
* Hebrew
|
229 |
-
* Indonesian
|
230 |
-
* Latvian
|
231 |
-
* Lithuanian
|
232 |
-
* Serbian
|
233 |
-
* Slovak
|
234 |
-
* Slovene
|
235 |
-
* Ukrainian
|
236 |
-
* Vietnamese
|
237 |
-
|
238 |
-
**12th stage (launched January 30, 2009)**
|
239 |
-
|
240 |
-
* Albanian
|
241 |
-
* Estonian
|
242 |
-
* Galician
|
243 |
-
* Hungarian
|
244 |
-
* Maltese
|
245 |
-
* Thai
|
246 |
-
* Turkish
|
247 |
-
|
248 |
-
**13th stage (launched June 19, 2009)**
|
249 |
-
|
250 |
-
* Persian
|
251 |
-
|
252 |
-
**14th stage (launched August 24, 2009)**
|
253 |
-
|
254 |
-
* Afrikaans
|
255 |
-
* Belarusian
|
256 |
-
* Icelandic
|
257 |
-
* Irish
|
258 |
-
* Macedonian
|
259 |
-
* Malay
|
260 |
-
* Swahili
|
261 |
-
* Welsh
|
262 |
-
* Yiddish
|
263 |
-
|
264 |
-
**15th stage (launched November 19, 2009)**
|
265 |
-
|
266 |
-
* The Beta stage is finished. Users can now choose to have the romanization written for Chinese, Japanese, Korean, Russian, Ukrainian, Belarusian, Bulgarian, Greek, Hindi and Thai. For translations from Arabic, Persian and Hindi, the user can enter a Latin transliteration of the text and the text will be transliterated to the native script for these languages as the user is typing. The text can now be read by a text-to-speech program in English, Italian, French and German.
|
267 |
-
|
268 |
-
**16th stage (launched January 30, 2010)**
|
269 |
-
|
270 |
-
* Haitian Creole
|
271 |
-
|
272 |
-
**17th stage (launched April 2010)**
|
273 |
-
|
274 |
-
* Speech program launched in Hindi and Spanish.
|
275 |
-
|
276 |
-
*18th stage (launched May 5, 2010)**
|
277 |
-
|
278 |
-
* Speech program launched in Afrikaans, Albanian, Catalan, Chinese (Mandarin), Croatian, Czech, Danish, Dutch, Finnish, Greek, Hungarian, Icelandic, Indonesian, Latvian, Macedonian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Swahili, Swedish, Turkish, Vietnamese and Welsh (based on eSpeak)
|
279 |
-
|
280 |
-
**19th stage (launched May 13, 2010)**
|
281 |
-
|
282 |
-
* Armenian
|
283 |
-
* Azerbaijani
|
284 |
-
* Basque
|
285 |
-
* Georgian
|
286 |
-
* Urdu
|
287 |
-
|
288 |
-
**20th stage (launched June 2010)**
|
289 |
-
|
290 |
-
* Provides romanization for Arabic.
|
291 |
-
|
292 |
-
**21st stage (launched September 2010)**
|
293 |
-
|
294 |
-
* Allows phonetic typing for Arabic, Greek, Hindi, Persian, Russian, Serbian and Urdu.
|
295 |
-
* Latin
|
296 |
-
|
297 |
-
**22nd stage (launched December 2010)**
|
298 |
-
|
299 |
-
* Romanization of Arabic removed.
|
300 |
-
* Spell check added.
|
301 |
-
* For some languages, Google replaced text-to-speech synthesizers from eSpeak's robot voice to native speaker's nature voice technologies made by SVOX (Chinese, Czech, Danish, Dutch, Finnish, Greek, Hungarian, Norwegian, Polish, Portuguese, Russian, Swedish, Turkish). Also the old versions of French, German, Italian and Spanish. Latin uses the same synthesizer as Italian.
|
302 |
-
* Speech program launched in Arabic, Japanese and Korean.
|
303 |
-
|
304 |
-
**23rd stage (launched January 2011)**
|
305 |
-
|
306 |
-
* Choice of different translations for a word.
|
307 |
-
|
308 |
-
**24th stage (Launched June 2011)**
|
309 |
-
|
310 |
-
* 5 new Indic languages (in alpha) and a transliterated input method:
|
311 |
-
* Bengali
|
312 |
-
* Gujarati
|
313 |
-
* Kannada
|
314 |
-
* Tamil
|
315 |
-
* Telugu
|
316 |
-
|
317 |
-
**25th stage (launched July 2011)**
|
318 |
-
|
319 |
-
* Translation rating introduced.
|
320 |
-
|
321 |
-
**26th stage (launched January 2012)**
|
322 |
-
|
323 |
-
* Dutch male voice synthesizer replaced with female.
|
324 |
-
* Elena by SVOX replaced the Slovak eSpeak voice.
|
325 |
-
* Transliteration of Yiddish added.
|
326 |
-
|
327 |
-
**27th stage (launched February 2012)**
|
328 |
-
|
329 |
-
* Speech program launched in Thai.
|
330 |
-
* Esperanto
|
331 |
|
332 |
-
|
333 |
|
334 |
-
|
335 |
-
|
336 |
-
**29th stage (launched October 2012)**
|
337 |
-
|
338 |
-
* Transliteration of Lao added. (Alpha status)
|
339 |
-
|
340 |
-
**30th stage (launched October 2012)**
|
341 |
-
|
342 |
-
* New speech program launched in English.
|
343 |
-
|
344 |
-
**31st stage (launched November 2012)**
|
345 |
-
|
346 |
-
* New speech program in French, Spanish, Italian and German.
|
347 |
-
|
348 |
-
**32nd stage (launched March 2013)**
|
349 |
-
|
350 |
-
* Phrasebook added.
|
351 |
-
|
352 |
-
**33rd stage (launched April 2013)**
|
353 |
-
|
354 |
-
* Khmer
|
355 |
-
|
356 |
-
**34th stage (launched May 2013)**
|
357 |
-
|
358 |
-
* Bosnian
|
359 |
-
* Cebuano
|
360 |
-
* Hmong
|
361 |
-
* Javanese
|
362 |
-
* Marathi
|
363 |
-
|
364 |
-
**35th stage (launched May 2013)**
|
365 |
-
|
366 |
-
* 16 additional languages can be used with camera-input: Bulgarian, Catalan, Danish, Estonian, Finnish, Croatian, Hungarian, Indonesian, Icelandic, Lithuanian, Latvian, Norwegian, Romanian, Slovak, Slovenian and Swedish.
|
367 |
-
|
368 |
-
**36th stage (launched December 2013)**
|
369 |
-
|
370 |
-
* Hausa
|
371 |
-
* Igbo
|
372 |
-
* Maori
|
373 |
-
* Mongolian
|
374 |
-
* Nepali
|
375 |
-
* Punjabi
|
376 |
-
* Somali
|
377 |
-
* Yoruba
|
378 |
-
* Zulu
|
379 |
-
|
380 |
-
**37th stage (launched June 2014)**
|
381 |
|
382 |
-
|
|
|
|
|
|
|
383 |
|
384 |
-
**
|
|
|
385 |
|
386 |
-
|
387 |
-
|
388 |
-
* Malagasy
|
389 |
-
* Malayalam
|
390 |
-
* Myanmar (Burmese)
|
391 |
-
* Sesotho
|
392 |
-
* Sinhala
|
393 |
-
* Sundanese
|
394 |
-
* Tajik
|
395 |
-
* Uzbek
|
396 |
|
397 |
-
**
|
398 |
-
|
399 |
-
|
400 |
-
* Hawaiian
|
401 |
-
* Kurdish (Kurmanji)
|
402 |
-
* Kyrgyz
|
403 |
-
* Luxembourgish
|
404 |
-
* Pashto
|
405 |
-
* Samoan
|
406 |
-
* Scottish Gaelic
|
407 |
-
* Shona
|
408 |
-
* Sindhi
|
409 |
-
* West Frisian
|
410 |
-
* Xhosa
|
411 |
|
412 |
-
|
413 |
-
|
414 |
|
415 |
-
|
416 |
-
* Cantonese
|
417 |
-
* Cherokee
|
418 |
-
* Dzongkha
|
419 |
-
* Guarani
|
420 |
-
* Kinyarwanda
|
421 |
-
* Kurdish (Sorani)
|
422 |
-
* Odia
|
423 |
-
* Romansh
|
424 |
-
* Tatar
|
425 |
-
* Tibetan
|
426 |
-
* Turkmen
|
427 |
-
* Uyghur
|
428 |
-
* Wolof
|
429 |
|
430 |
== Frequently Asked Questions ==
|
431 |
|
432 |
= It doesn't work, what to do? =
|
433 |
Please check [GTranslate Support Forum](https://wordpress.org/support/plugin/gtranslate) and feel free to create a new topic if you cannot find answers.
|
434 |
|
435 |
-
= Can I exclude some parts from being translated? =
|
436 |
-
Yes, you need to wrap the text you don't want to be translated with <span class="notranslate"></span>.
|
437 |
-
|
438 |
= What is GTranslate? =
|
439 |
GTranslate is a multilingual solution for your website.
|
440 |
|
@@ -447,17 +114,29 @@ GTranslate is a multilingual solution for your website.
|
|
447 |
|
448 |
[vimeo http://vimeo.com/30132555]
|
449 |
|
|
|
|
|
|
|
450 |
= What is the quality of translation? =
|
451 |
-
It's Google translation, hence Google quality. In the
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
|
453 |
= Which languages are supported? =
|
454 |
Here is the list: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sudanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu
|
455 |
|
456 |
-
=
|
457 |
-
|
458 |
|
459 |
-
=
|
460 |
-
|
|
|
|
|
|
|
461 |
|
462 |
= How the free version differs from the paid versions? =
|
463 |
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.
|
@@ -469,6 +148,12 @@ GTranslate TDN technology is a cloud-based approach to the website translation t
|
|
469 |
|
470 |
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.
|
471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
[vimeo http://vimeo.com/38686858]
|
473 |
|
474 |
= How Translation Delivery Network works? =
|
@@ -518,6 +203,15 @@ You need to go to the language you want to edit, for instance, French: http://do
|
|
518 |
|
519 |
== Changelog ==
|
520 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
= 2.8.11 =
|
522 |
* Fix for open redirect issue
|
523 |
* Fix for incorrect selected language in nice dropdown
|
@@ -547,7 +241,7 @@ You need to go to the language you want to edit, for instance, French: http://do
|
|
547 |
|
548 |
= 2.8.6 =
|
549 |
* Fixed bug on options page related to native language names
|
550 |
-
* Plugin keywords added: multilanguage, multilingual, language, bilingual,
|
551 |
* Vimeo videos replaced by YouTube videos: GTranslate video and Translation Proxy video
|
552 |
|
553 |
= 2.8.5 =
|
1 |
=== Translate Wordpress with GTranslate ===
|
2 |
Contributors: edo888
|
3 |
Author: Edvard Ananyan
|
4 |
+
Tags: bilingual, multilingual, translate, translation, language, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.8.12
|
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
|
11 |
|
12 |
+
Translate WordPress with Google Translate multilanguage plugin to make your website multilingual. Reliable localization plugin for Wordpress.
|
13 |
|
14 |
== Description ==
|
15 |
|
27 |
* Hides "Suggest better translation" pop-up
|
28 |
* Hides Google top frame after translation
|
29 |
* Mouse over effect
|
|
|
30 |
* Google Analytics integration
|
31 |
* Translates the site on the fly
|
32 |
* Google language translator widget
|
33 |
* Available styles Dropdown, Flags, Flags with dropdown, Nice dropdown with flags, Flags with language names, Flags with language codes, Language names, Language codes, Globe
|
34 |
* Floating language selector
|
35 |
+
* Language bar with flags in menu
|
36 |
+
* WooCommerce shop translation
|
37 |
* Multilanguage
|
38 |
* Multilingual language names in native alphabet
|
39 |
+
* Alternative flags for Quebec, Canada, USA, Brazil, Mexico
|
40 |
+
|
41 |
+
**Paid Features**
|
42 |
+
|
43 |
+
* Multilingual SEO - Enable search engine indexing
|
44 |
+
* Increase traffic and AdSense revenue
|
45 |
+
* Search engine friendly (SEF) URLs
|
46 |
+
* Yoast SEO compatible
|
47 |
+
* WooCommerce compatible
|
48 |
+
* You can have sub-directory (example.com/**es**/) or sub-domain (**es.**example.com) URL structure
|
49 |
+
* URL Translation is possible (example.com/about-us → example.es/sobre-nosotros)
|
50 |
+
* You can manually correct translations
|
51 |
+
* In context translation interface (make corrections without loosing the context)
|
52 |
+
* Meta data translation (meta keywords, meta description)
|
53 |
+
* Translating schema.org microdata for better search engine appearance
|
54 |
+
* Seamless updates (cloud service updated on our side - SaaS)
|
55 |
+
* JSON format translation
|
56 |
+
* AMP translation (Accelerated Mobile Pages translation)
|
57 |
+
* Image localization
|
58 |
+
* Translation Proxy (aka Translation Delivery Network)
|
59 |
+
* Centralized Translation Cache
|
60 |
+
* Language Hosting (**example.fr**)
|
61 |
+
* Live Chat Support
|
62 |
|
63 |
[Download GTranslate](https://gtranslate.io/?xyz=998#pricing)
|
64 |
|
71 |
**Edit Translations Demo (paid)**
|
72 |
[youtube https://www.youtube.com/watch?v=YwSy3VtQx3I]
|
73 |
|
74 |
+
Keywords: translate wordpress, wordpress translator, translate, translator, translation, machine translate, wp translate, ajax translate, bilingual, multilanguage, multilingual, i18n, localization, l10n, tradurre, traducir, traduire, traduzione, ubersetzung, mehrsprachig, oversette, oversatta, vertaling, vertaler, meertalig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
+
List of supported languages: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sudanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu
|
77 |
|
78 |
+
== Installation ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
+
1. Upload the plugin files to the `/wp-content/plugins/gtranslate` directory, or install the plugin through the WordPress plugins screen directly.
|
81 |
+
1. Activate the plugin through the 'Plugins' screen in WordPress
|
82 |
+
1. Use the Settings → GTranslate screen to configure the plugin
|
83 |
+
1. There are 4 ways you can use to publish the language selector on your website
|
84 |
|
85 |
+
**1. Floating Language Selector**
|
86 |
+
You can turn on Floating language selector option from Settings → GTranslate screen and it will show the language selector in appropriate location (Top Right, Bottom Right, Top Left or Bottom Left)
|
87 |
|
88 |
+
**2. Showing in Menu**
|
89 |
+
You can select from the list of available menus in which menu the language selector should appear
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
+
**3. Use GTranslate shortcode**
|
92 |
+
You can use `[gtranslate]` shortcode anywhere on your website including posts, pages, text widgets.
|
93 |
+
You can edit your template files and use `<?php echo do_shortcode('[gtranslate]'); ?>` in HTML which will render the language selector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
+
**4. Use GTranslate Widget**
|
96 |
+
You can use Appearence → Widgets screen to publish GTranslate widget inside a sidebar of your template.
|
97 |
|
98 |
+
If you have any issues, please do not hesitate to use our [Support Forum](https://wordpress.org/support/plugin/gtranslate) or [Live Chat](https://gtranslate.io/?xyz=998#contact)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
== Frequently Asked Questions ==
|
101 |
|
102 |
= It doesn't work, what to do? =
|
103 |
Please check [GTranslate Support Forum](https://wordpress.org/support/plugin/gtranslate) and feel free to create a new topic if you cannot find answers.
|
104 |
|
|
|
|
|
|
|
105 |
= What is GTranslate? =
|
106 |
GTranslate is a multilingual solution for your website.
|
107 |
|
114 |
|
115 |
[vimeo http://vimeo.com/30132555]
|
116 |
|
117 |
+
= Is it FREE? =
|
118 |
+
Yes! We have free version and paid versions with [advanced features](https://gtranslate.io/?xyz=998#pricing).
|
119 |
+
|
120 |
= What is the quality of translation? =
|
121 |
+
It's Google translation, hence Google quality. We use machine translations provided by Google Translate service. In the paid versions you can refine the translations manually and order professional translations directly from your site.
|
122 |
+
|
123 |
+
= Are the translations provided free of charge? =
|
124 |
+
Yes, we use Google Translate widget for website which provides free machine translations which makes it possible to make your wordpress website multilingual instantly upon installation.
|
125 |
+
|
126 |
+
= Can I modify the translations? =
|
127 |
+
That feature is available in our paid version. You will be able to make edits directly on the page without loosing the context.
|
128 |
|
129 |
= Which languages are supported? =
|
130 |
Here is the list: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sudanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu
|
131 |
|
132 |
+
= Is it SEO compatible? =
|
133 |
+
Our free version doesn't give any SEO advantage. For SEO features and multilingual SEO you need to use our paid versions which have all the SEO advantages.
|
134 |
|
135 |
+
= What is multilingual SEO? =
|
136 |
+
Multilingual SEO is a SEO strategy which uses new content generation technique by translating your original content and making your website multilingual. By translating your website into many languages you are creating many new multilingual keywords targeted for international market. It helps to increase your search appearnce on search engines results pages (SERPs), which can generate more traffic, increase sales and rise the conversion rate.
|
137 |
+
|
138 |
+
= Is URL Translation available? =
|
139 |
+
In our paid versions we have a feature to translate URL of your website which will give you more SEO advantage. For example http://example.com/*about-us* → http://example.com/*sobre-nosotros*
|
140 |
|
141 |
= How the free version differs from the paid versions? =
|
142 |
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.
|
148 |
|
149 |
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.
|
150 |
|
151 |
+
= Can I exclude some parts from being translated? =
|
152 |
+
Yes, you need to wrap the text you don't want to be translated with <span class="notranslate"></span>.
|
153 |
+
|
154 |
+
= Which websites are supported? =
|
155 |
+
All the HTML websites are supported. However the contents of media files like images and flash will not be translated. You can upload a different image for each translation.
|
156 |
+
|
157 |
[vimeo http://vimeo.com/38686858]
|
158 |
|
159 |
= How Translation Delivery Network works? =
|
203 |
|
204 |
== Changelog ==
|
205 |
|
206 |
+
= 2.8.12 =
|
207 |
+
* Tweaks to make it work better with WooCommerce
|
208 |
+
* Fixed bug when turning off native language names option
|
209 |
+
* Fixed bug with reordering languages
|
210 |
+
* Fixed bug with updating the plugin when using sub-directory option
|
211 |
+
* Fixed bug in doGTrnaslate javascript function
|
212 |
+
* Fixed bug with floating selector when admin bar is visible (thanks to @redoper)
|
213 |
+
* Readme updated to comply with Wordpress directory guidelines (keywords removed WPML, qtranslate, transposh, loco translate, polylang, prisna translate, gts translation, lingotek, google website translator, global translator)
|
214 |
+
|
215 |
= 2.8.11 =
|
216 |
* Fix for open redirect issue
|
217 |
* Fix for incorrect selected language in nice dropdown
|
241 |
|
242 |
= 2.8.6 =
|
243 |
* Fixed bug on options page related to native language names
|
244 |
+
* Plugin keywords added: multilanguage, multilingual, language, bilingual, i18n
|
245 |
* Vimeo videos replaced by YouTube videos: GTranslate video and Translation Proxy video
|
246 |
|
247 |
= 2.8.5 =
|
url_addon/gtranslate.php
CHANGED
@@ -151,6 +151,13 @@ $html = str_ireplace('action="/', 'action="/' . $glang . '/', $html);
|
|
151 |
$html = str_ireplace('action="/' . $glang . '//', 'action="//', $html);
|
152 |
$html = str_ireplace('action="//' . $_SERVER['HTTP_HOST'], 'action="//' . $_SERVER['HTTP_HOST'] . '/' . $glang, $html);
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
if(isset($_GET['language_edit'])) {
|
155 |
$html = str_replace('/tdn-static/', $protocol . '://tdns.gtranslate.net/tdn-static/', $html);
|
156 |
$html = str_replace('/tdn-bin/', $protocol . '://' . $_SERVER['HTTP_HOST'] . '/' . $glang . '/tdn-bin/', $html);
|
151 |
$html = str_ireplace('action="/' . $glang . '//', 'action="//', $html);
|
152 |
$html = str_ireplace('action="//' . $_SERVER['HTTP_HOST'], 'action="//' . $_SERVER['HTTP_HOST'] . '/' . $glang, $html);
|
153 |
|
154 |
+
// woocommerce specific changes
|
155 |
+
$html = str_ireplace(
|
156 |
+
array('"wc_ajax_url":"\\/', '"checkout_url":"\\/', 'var wc_country_select_params', 'var wc_address_i18n_params' ),
|
157 |
+
array('"wc_ajax_url":"\\/'.$glang.'\\/', '"checkout_url":"\\/'.$glang.'\\/', 'var wc_country_select_params2', 'var wc_address_i18n_params2'),
|
158 |
+
$html
|
159 |
+
);
|
160 |
+
|
161 |
if(isset($_GET['language_edit'])) {
|
162 |
$html = str_replace('/tdn-static/', $protocol . '://tdns.gtranslate.net/tdn-static/', $html);
|
163 |
$html = str_replace('/tdn-bin/', $protocol . '://' . $_SERVER['HTTP_HOST'] . '/' . $glang . '/tdn-bin/', $html);
|