Weglot Translate – Translate your WP website - Version 3.3.6

Version Description

(15/06/2021) = * Add new flag from dashboard * Improve hreflang display * Dynamise limit languages check * Fix bug when excluded URL /cart gives empty URL * Fix small bug on multisite where we translated links from / website when located on /subsite * Better handle 301 redirect

Download this release

Release Info

Developer remyb92
Plugin Icon 128x128 Weglot Translate – Translate your WP website
Version 3.3.6
Comparing to
See all releases

Code changes from version 3.3.5 to 3.3.6

Files changed (36) hide show
  1. app/javascripts/settings/admin-select.js +9 -17
  2. app/styles/admin.scss +3 -0
  3. app/styles/new-flags.css +3 -0
  4. dist/admin-js.js +1 -1
  5. dist/css/admin-css.css +1 -1
  6. readme.txt +34 -24
  7. src/actions/admin/class-admin-enqueue-weglot.php +32 -20
  8. src/actions/admin/class-customize-menu-weglot.php +4 -6
  9. src/actions/admin/class-options-weglot.php +4 -9
  10. src/actions/front/class-front-enqueue-weglot.php +8 -0
  11. src/actions/front/class-translate-page-weglot.php +2 -2
  12. src/domcheckers/class-video-source.php +1 -1
  13. src/helpers/class-helper-filter-url-weglot.php +5 -2
  14. src/helpers/class-helper-flag-type.php +52 -1
  15. src/services/class-replace-link-service-weglot.php +1 -1
  16. src/services/class-replace-url-service-weglot.php +8 -5
  17. src/services/class-translate-service-weglot.php +31 -18
  18. src/services/class-user-api-service-weglot.php +5 -1
  19. src/third/woocommerce/class-wc-filter-urls-weglot.php +3 -1
  20. src/third/woocommerce/class-wc-mail-weglot.php +1 -3
  21. src/third/wprocket/class-wprocket-cache.php +3 -3
  22. templates/admin/pages/tabs/appearance.php +1 -0
  23. templates/admin/pages/tabs/settings.php +7 -0
  24. vendor/autoload.php +1 -1
  25. vendor/composer/InstalledVersions.php +5 -5
  26. vendor/composer/autoload_real.php +7 -7
  27. vendor/composer/autoload_static.php +5 -5
  28. vendor/composer/installed.json +6 -6
  29. vendor/composer/installed.php +5 -5
  30. vendor/weglot/weglot-php/src/Client/Client.php +16 -6
  31. vendor/weglot/weglot-php/src/Client/Endpoint/CdnTranslate.php +199 -0
  32. vendor/weglot/weglot-php/src/Client/Endpoint/LanguagesList.php +2 -1
  33. vendor/weglot/weglot-php/src/Parser/ConfigProvider/ServerConfigProvider.php +9 -5
  34. vendor/weglot/weglot-php/src/Parser/Parser.php +140 -137
  35. vendor/weglot/weglot-php/src/Util/Url.php +9 -3
  36. weglot.php +2 -2
app/javascripts/settings/admin-select.js CHANGED
@@ -39,7 +39,6 @@ const init_admin_select = function(){
39
  return;
40
  }
41
 
42
-
43
  const is_fullname = $("#is_fullname").is(":checked")
44
  const with_name = $("#with_name").is(":checked")
45
  const with_flags = $("#with_flags").is(":checked")
@@ -50,6 +49,14 @@ const init_admin_select = function(){
50
  }
51
 
52
  let new_dest_language = ''
 
 
 
 
 
 
 
 
53
  code_languages.forEach(element => {
54
  const language = weglot_languages.available.find(itm => itm.internal_code === element);
55
  let label = ''
@@ -62,14 +69,11 @@ const init_admin_select = function(){
62
  }
63
  }
64
 
65
-
66
  new_dest_language += template
67
  .html()
68
  .replace("{LABEL_LANGUAGE}", label)
69
  .replace(new RegExp("{CODE_LANGUAGE}", "g"), element)
70
  .replace("{CLASSES}", classes)
71
-
72
-
73
  });
74
  $(".country-selector ul").html(new_dest_language) //phpcs:ignore
75
  });
@@ -113,19 +117,7 @@ const init_admin_select = function(){
113
  load_destination_selectize();
114
 
115
  window.addEventListener("weglotCheckApi", (data) => {
116
- let limit = 1000
117
- const plan = data.detail.plan
118
-
119
- if (
120
- plan <= 0 ||
121
- weglot_languages.plans.starter_free.ids.indexOf(plan) >= 0
122
- ) {
123
- limit = weglot_languages.plans.starter_free.limit_language;
124
- } else if( weglot_languages.plans.business.ids.indexOf(plan) >= 0 ) {
125
- limit = weglot_languages.plans.business.limit_language;
126
- }
127
-
128
- destination_selectize[0].selectize.settings.maxItems = limit
129
  });
130
 
131
  }
39
  return;
40
  }
41
 
 
42
  const is_fullname = $("#is_fullname").is(":checked")
43
  const with_name = $("#with_name").is(":checked")
44
  const with_flags = $("#with_flags").is(":checked")
49
  }
50
 
51
  let new_dest_language = ''
52
+ var currentFlagClasses = $("label.weglot-flags").attr("class")
53
+ var classArr = currentFlagClasses.split(/\s+/);
54
+ $.each(classArr, function(index, value){
55
+ if(value.includes('flag-') == true){
56
+ classes += ' '+value;
57
+ return false;
58
+ }
59
+ });
60
  code_languages.forEach(element => {
61
  const language = weglot_languages.available.find(itm => itm.internal_code === element);
62
  let label = ''
69
  }
70
  }
71
 
 
72
  new_dest_language += template
73
  .html()
74
  .replace("{LABEL_LANGUAGE}", label)
75
  .replace(new RegExp("{CODE_LANGUAGE}", "g"), element)
76
  .replace("{CLASSES}", classes)
 
 
77
  });
78
  $(".country-selector ul").html(new_dest_language) //phpcs:ignore
79
  });
117
  load_destination_selectize();
118
 
119
  window.addEventListener("weglotCheckApi", (data) => {
120
+ destination_selectize[0].selectize.settings.maxItems = weglot_languages.limit;
 
 
 
 
 
 
 
 
 
 
 
 
121
  });
122
 
123
  }
app/styles/admin.scss CHANGED
@@ -4,6 +4,9 @@
4
  $wp-color-red: #dc3232; // RGB(220,50,50)
5
  $wp-color-green: #46b450; // RGB(70, 180, 80)
6
 
 
 
 
7
 
8
  #weglot-url-translate,
9
  #wrap-weglot {
4
  $wp-color-red: #dc3232; // RGB(220,50,50)
5
  $wp-color-green: #46b450; // RGB(70, 180, 80)
6
 
7
+ #custom_flag_tips{
8
+ font-size: 12px;
9
+ }
10
 
11
  #weglot-url-translate,
12
  #wrap-weglot {
app/styles/new-flags.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .weglot-flags.af>a:before,.weglot-flags.af>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.af>a:before,.weglot-flags.flag-3.af>span:before{background-image:url("https://cdn.weglot.com/flags/circle/za.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.af>a:before,.weglot-flags.flag-2.af>span:before{background-image:url("https://cdn.weglot.com/flags/square/za.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.af>a:before,.weglot-flags.flag-1.af>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.af>a:before,.weglot-flags.flag-0.af>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.am>a:before,.weglot-flags.am>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/et.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.am>a:before,.weglot-flags.flag-3.am>span:before{background-image:url("https://cdn.weglot.com/flags/circle/et.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.am>a:before,.weglot-flags.flag-2.am>span:before{background-image:url("https://cdn.weglot.com/flags/square/et.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.am>a:before,.weglot-flags.flag-1.am>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/et.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.am>a:before,.weglot-flags.flag-0.am>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/et.svg");background-position:unset !important;width:27px !important}.weglot-flags.ar>a:before,.weglot-flags.ar>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/sa.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ar>a:before,.weglot-flags.flag-3.ar>span:before{background-image:url("https://cdn.weglot.com/flags/circle/sa.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ar>a:before,.weglot-flags.flag-2.ar>span:before{background-image:url("https://cdn.weglot.com/flags/square/sa.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ar>a:before,.weglot-flags.flag-1.ar>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/sa.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ar>a:before,.weglot-flags.flag-0.ar>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/sa.svg");background-position:unset !important;width:27px !important}.weglot-flags.az>a:before,.weglot-flags.az>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/az.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.az>a:before,.weglot-flags.flag-3.az>span:before{background-image:url("https://cdn.weglot.com/flags/circle/az.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.az>a:before,.weglot-flags.flag-2.az>span:before{background-image:url("https://cdn.weglot.com/flags/square/az.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.az>a:before,.weglot-flags.flag-1.az>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/az.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.az>a:before,.weglot-flags.flag-0.az>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/az.svg");background-position:unset !important;width:27px !important}.weglot-flags.ba>a:before,.weglot-flags.ba>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ru.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ba>a:before,.weglot-flags.flag-3.ba>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ru.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ba>a:before,.weglot-flags.flag-2.ba>span:before{background-image:url("https://cdn.weglot.com/flags/square/ru.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ba>a:before,.weglot-flags.flag-1.ba>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ru.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ba>a:before,.weglot-flags.flag-0.ba>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ru.svg");background-position:unset !important;width:27px !important}.weglot-flags.be>a:before,.weglot-flags.be>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/by.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.be>a:before,.weglot-flags.flag-3.be>span:before{background-image:url("https://cdn.weglot.com/flags/circle/by.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.be>a:before,.weglot-flags.flag-2.be>span:before{background-image:url("https://cdn.weglot.com/flags/square/by.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.be>a:before,.weglot-flags.flag-1.be>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/by.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.be>a:before,.weglot-flags.flag-0.be>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/by.svg");background-position:unset !important;width:27px !important}.weglot-flags.bg>a:before,.weglot-flags.bg>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/bg.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.bg>a:before,.weglot-flags.flag-3.bg>span:before{background-image:url("https://cdn.weglot.com/flags/circle/bg.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.bg>a:before,.weglot-flags.flag-2.bg>span:before{background-image:url("https://cdn.weglot.com/flags/square/bg.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.bg>a:before,.weglot-flags.flag-1.bg>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/bg.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.bg>a:before,.weglot-flags.flag-0.bg>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/bg.svg");background-position:unset !important;width:27px !important}.weglot-flags.bn>a:before,.weglot-flags.bn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/bd.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.bn>a:before,.weglot-flags.flag-3.bn>span:before{background-image:url("https://cdn.weglot.com/flags/circle/bd.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.bn>a:before,.weglot-flags.flag-2.bn>span:before{background-image:url("https://cdn.weglot.com/flags/square/bd.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.bn>a:before,.weglot-flags.flag-1.bn>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/bd.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.bn>a:before,.weglot-flags.flag-0.bn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/bd.svg");background-position:unset !important;width:27px !important}.weglot-flags.br>a:before,.weglot-flags.br>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/br.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.br>a:before,.weglot-flags.flag-3.br>span:before{background-image:url("https://cdn.weglot.com/flags/circle/br.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.br>a:before,.weglot-flags.flag-2.br>span:before{background-image:url("https://cdn.weglot.com/flags/square/br.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.br>a:before,.weglot-flags.flag-1.br>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/br.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.br>a:before,.weglot-flags.flag-0.br>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/br.svg");background-position:unset !important;width:27px !important}.weglot-flags.bs>a:before,.weglot-flags.bs>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ba.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.bs>a:before,.weglot-flags.flag-3.bs>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ba.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.bs>a:before,.weglot-flags.flag-2.bs>span:before{background-image:url("https://cdn.weglot.com/flags/square/ba.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.bs>a:before,.weglot-flags.flag-1.bs>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ba.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.bs>a:before,.weglot-flags.flag-0.bs>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ba.svg");background-position:unset !important;width:27px !important}.weglot-flags.ca>a:before,.weglot-flags.ca>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/es-ca.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ca>a:before,.weglot-flags.flag-3.ca>span:before{background-image:url("https://cdn.weglot.com/flags/circle/es-ca.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ca>a:before,.weglot-flags.flag-2.ca>span:before{background-image:url("https://cdn.weglot.com/flags/square/es-ca.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ca>a:before,.weglot-flags.flag-1.ca>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/es-ca.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ca>a:before,.weglot-flags.flag-0.ca>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/es-ca.svg");background-position:unset !important;width:27px !important}.weglot-flags.co>a:before,.weglot-flags.co>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/co.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.co>a:before,.weglot-flags.flag-3.co>span:before{background-image:url("https://cdn.weglot.com/flags/circle/co.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.co>a:before,.weglot-flags.flag-2.co>span:before{background-image:url("https://cdn.weglot.com/flags/square/co.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.co>a:before,.weglot-flags.flag-1.co>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/co.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.co>a:before,.weglot-flags.flag-0.co>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/co.svg");background-position:unset !important;width:27px !important}.weglot-flags.cs>a:before,.weglot-flags.cs>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/cz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.cs>a:before,.weglot-flags.flag-3.cs>span:before{background-image:url("https://cdn.weglot.com/flags/circle/cz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.cs>a:before,.weglot-flags.flag-2.cs>span:before{background-image:url("https://cdn.weglot.com/flags/square/cz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.cs>a:before,.weglot-flags.flag-1.cs>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/cz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.cs>a:before,.weglot-flags.flag-0.cs>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/cz.svg");background-position:unset !important;width:27px !important}.weglot-flags.cy>a:before,.weglot-flags.cy>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gb-wls.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.cy>a:before,.weglot-flags.flag-3.cy>span:before{background-image:url("https://cdn.weglot.com/flags/circle/gb-wls.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.cy>a:before,.weglot-flags.flag-2.cy>span:before{background-image:url("https://cdn.weglot.com/flags/square/gb-wls.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.cy>a:before,.weglot-flags.flag-1.cy>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/gb-wls.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.cy>a:before,.weglot-flags.flag-0.cy>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gb-wls.svg");background-position:unset !important;width:27px !important}.weglot-flags.da>a:before,.weglot-flags.da>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/dk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.da>a:before,.weglot-flags.flag-3.da>span:before{background-image:url("https://cdn.weglot.com/flags/circle/dk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.da>a:before,.weglot-flags.flag-2.da>span:before{background-image:url("https://cdn.weglot.com/flags/square/dk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.da>a:before,.weglot-flags.flag-1.da>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/dk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.da>a:before,.weglot-flags.flag-0.da>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/dk.svg");background-position:unset !important;width:27px !important}.weglot-flags.de>a:before,.weglot-flags.de>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/de.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.de>a:before,.weglot-flags.flag-3.de>span:before{background-image:url("https://cdn.weglot.com/flags/circle/de.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.de>a:before,.weglot-flags.flag-2.de>span:before{background-image:url("https://cdn.weglot.com/flags/square/de.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.de>a:before,.weglot-flags.flag-1.de>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/de.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.de>a:before,.weglot-flags.flag-0.de>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/de.svg");background-position:unset !important;width:27px !important}.weglot-flags.el>a:before,.weglot-flags.el>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.el>a:before,.weglot-flags.flag-3.el>span:before{background-image:url("https://cdn.weglot.com/flags/circle/gr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.el>a:before,.weglot-flags.flag-2.el>span:before{background-image:url("https://cdn.weglot.com/flags/square/gr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.el>a:before,.weglot-flags.flag-1.el>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/gr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.el>a:before,.weglot-flags.flag-0.el>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gr.svg");background-position:unset !important;width:27px !important}.weglot-flags.en>a:before,.weglot-flags.en>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gb.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.en>a:before,.weglot-flags.flag-3.en>span:before{background-image:url("https://cdn.weglot.com/flags/circle/gb.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.en>a:before,.weglot-flags.flag-2.en>span:before{background-image:url("https://cdn.weglot.com/flags/square/gb.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.en>a:before,.weglot-flags.flag-1.en>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/gb.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.en>a:before,.weglot-flags.flag-0.en>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gb.svg");background-position:unset !important;width:27px !important}.weglot-flags.eo>a:before,.weglot-flags.eo>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/eo.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.eo>a:before,.weglot-flags.flag-3.eo>span:before{background-image:url("https://cdn.weglot.com/flags/circle/eo.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.eo>a:before,.weglot-flags.flag-2.eo>span:before{background-image:url("https://cdn.weglot.com/flags/square/eo.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.eo>a:before,.weglot-flags.flag-1.eo>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/eo.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.eo>a:before,.weglot-flags.flag-0.eo>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/eo.svg");background-position:unset !important;width:27px !important}.weglot-flags.es>a:before,.weglot-flags.es>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/es.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.es>a:before,.weglot-flags.flag-3.es>span:before{background-image:url("https://cdn.weglot.com/flags/circle/es.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.es>a:before,.weglot-flags.flag-2.es>span:before{background-image:url("https://cdn.weglot.com/flags/square/es.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.es>a:before,.weglot-flags.flag-1.es>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/es.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.es>a:before,.weglot-flags.flag-0.es>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/es.svg");background-position:unset !important;width:27px !important}.weglot-flags.et>a:before,.weglot-flags.et>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ee.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.et>a:before,.weglot-flags.flag-3.et>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ee.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.et>a:before,.weglot-flags.flag-2.et>span:before{background-image:url("https://cdn.weglot.com/flags/square/ee.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.et>a:before,.weglot-flags.flag-1.et>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ee.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.et>a:before,.weglot-flags.flag-0.et>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ee.svg");background-position:unset !important;width:27px !important}.weglot-flags.eu>a:before,.weglot-flags.eu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/eu.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.eu>a:before,.weglot-flags.flag-3.eu>span:before{background-image:url("https://cdn.weglot.com/flags/circle/eu.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.eu>a:before,.weglot-flags.flag-2.eu>span:before{background-image:url("https://cdn.weglot.com/flags/square/eu.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.eu>a:before,.weglot-flags.flag-1.eu>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/eu.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.eu>a:before,.weglot-flags.flag-0.eu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/eu.svg");background-position:unset !important;width:27px !important}.weglot-flags.fa>a:before,.weglot-flags.fa>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ir.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.fa>a:before,.weglot-flags.flag-3.fa>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ir.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.fa>a:before,.weglot-flags.flag-2.fa>span:before{background-image:url("https://cdn.weglot.com/flags/square/ir.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.fa>a:before,.weglot-flags.flag-1.fa>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ir.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.fa>a:before,.weglot-flags.flag-0.fa>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ir.svg");background-position:unset !important;width:27px !important}.weglot-flags.fi>a:before,.weglot-flags.fi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/fi.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.fi>a:before,.weglot-flags.flag-3.fi>span:before{background-image:url("https://cdn.weglot.com/flags/circle/fi.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.fi>a:before,.weglot-flags.flag-2.fi>span:before{background-image:url("https://cdn.weglot.com/flags/square/fi.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.fi>a:before,.weglot-flags.flag-1.fi>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/fi.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.fi>a:before,.weglot-flags.flag-0.fi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/fi.svg");background-position:unset !important;width:27px !important}.weglot-flags.fj>a:before,.weglot-flags.fj>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/fj.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.fj>a:before,.weglot-flags.flag-3.fj>span:before{background-image:url("https://cdn.weglot.com/flags/circle/fj.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.fj>a:before,.weglot-flags.flag-2.fj>span:before{background-image:url("https://cdn.weglot.com/flags/square/fj.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.fj>a:before,.weglot-flags.flag-1.fj>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/fj.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.fj>a:before,.weglot-flags.flag-0.fj>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/fj.svg");background-position:unset !important;width:27px !important}.weglot-flags.fl>a:before,.weglot-flags.fl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ph.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.fl>a:before,.weglot-flags.flag-3.fl>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ph.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.fl>a:before,.weglot-flags.flag-2.fl>span:before{background-image:url("https://cdn.weglot.com/flags/square/ph.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.fl>a:before,.weglot-flags.flag-1.fl>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ph.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.fl>a:before,.weglot-flags.flag-0.fl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ph.svg");background-position:unset !important;width:27px !important}.weglot-flags.fr>a:before,.weglot-flags.fr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/fr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.fr>a:before,.weglot-flags.flag-3.fr>span:before{background-image:url("https://cdn.weglot.com/flags/circle/fr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.fr>a:before,.weglot-flags.flag-2.fr>span:before{background-image:url("https://cdn.weglot.com/flags/square/fr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.fr>a:before,.weglot-flags.flag-1.fr>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/fr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.fr>a:before,.weglot-flags.flag-0.fr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/fr.svg");background-position:unset !important;width:27px !important}.weglot-flags.fy>a:before,.weglot-flags.fy>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/nl.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.fy>a:before,.weglot-flags.flag-3.fy>span:before{background-image:url("https://cdn.weglot.com/flags/circle/nl.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.fy>a:before,.weglot-flags.flag-2.fy>span:before{background-image:url("https://cdn.weglot.com/flags/square/nl.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.fy>a:before,.weglot-flags.flag-1.fy>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/nl.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.fy>a:before,.weglot-flags.flag-0.fy>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/nl.svg");background-position:unset !important;width:27px !important}.weglot-flags.ga>a:before,.weglot-flags.ga>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ie.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ga>a:before,.weglot-flags.flag-3.ga>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ie.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ga>a:before,.weglot-flags.flag-2.ga>span:before{background-image:url("https://cdn.weglot.com/flags/square/ie.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ga>a:before,.weglot-flags.flag-1.ga>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ie.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ga>a:before,.weglot-flags.flag-0.ga>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ie.svg");background-position:unset !important;width:27px !important}.weglot-flags.gd>a:before,.weglot-flags.gd>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gb-sct.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.gd>a:before,.weglot-flags.flag-3.gd>span:before{background-image:url("https://cdn.weglot.com/flags/circle/gb-sct.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.gd>a:before,.weglot-flags.flag-2.gd>span:before{background-image:url("https://cdn.weglot.com/flags/square/gb-sct.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.gd>a:before,.weglot-flags.flag-1.gd>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/gb-sct.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.gd>a:before,.weglot-flags.flag-0.gd>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/gb-sct.svg");background-position:unset !important;width:27px !important}.weglot-flags.gl>a:before,.weglot-flags.gl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/es-ga.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.gl>a:before,.weglot-flags.flag-3.gl>span:before{background-image:url("https://cdn.weglot.com/flags/circle/es-ga.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.gl>a:before,.weglot-flags.flag-2.gl>span:before{background-image:url("https://cdn.weglot.com/flags/square/es-ga.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.gl>a:before,.weglot-flags.flag-1.gl>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/es-ga.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.gl>a:before,.weglot-flags.flag-0.gl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/es-ga.svg");background-position:unset !important;width:27px !important}.weglot-flags.gu>a:before,.weglot-flags.gu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.gu>a:before,.weglot-flags.flag-3.gu>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.gu>a:before,.weglot-flags.flag-2.gu>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.gu>a:before,.weglot-flags.flag-1.gu>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.gu>a:before,.weglot-flags.flag-0.gu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.ha>a:before,.weglot-flags.ha>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ne.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ha>a:before,.weglot-flags.flag-3.ha>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ne.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ha>a:before,.weglot-flags.flag-2.ha>span:before{background-image:url("https://cdn.weglot.com/flags/square/ne.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ha>a:before,.weglot-flags.flag-1.ha>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ne.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ha>a:before,.weglot-flags.flag-0.ha>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ne.svg");background-position:unset !important;width:27px !important}.weglot-flags.he>a:before,.weglot-flags.he>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/il.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.he>a:before,.weglot-flags.flag-3.he>span:before{background-image:url("https://cdn.weglot.com/flags/circle/il.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.he>a:before,.weglot-flags.flag-2.he>span:before{background-image:url("https://cdn.weglot.com/flags/square/il.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.he>a:before,.weglot-flags.flag-1.he>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/il.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.he>a:before,.weglot-flags.flag-0.he>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/il.svg");background-position:unset !important;width:27px !important}.weglot-flags.hi>a:before,.weglot-flags.hi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.hi>a:before,.weglot-flags.flag-3.hi>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.hi>a:before,.weglot-flags.flag-2.hi>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.hi>a:before,.weglot-flags.flag-1.hi>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.hi>a:before,.weglot-flags.flag-0.hi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.hr>a:before,.weglot-flags.hr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.hr>a:before,.weglot-flags.flag-3.hr>span:before{background-image:url("https://cdn.weglot.com/flags/circle/hr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.hr>a:before,.weglot-flags.flag-2.hr>span:before{background-image:url("https://cdn.weglot.com/flags/square/hr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.hr>a:before,.weglot-flags.flag-1.hr>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/hr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.hr>a:before,.weglot-flags.flag-0.hr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hr.svg");background-position:unset !important;width:27px !important}.weglot-flags.ht>a:before,.weglot-flags.ht>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ht.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ht>a:before,.weglot-flags.flag-3.ht>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ht.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ht>a:before,.weglot-flags.flag-2.ht>span:before{background-image:url("https://cdn.weglot.com/flags/square/ht.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ht>a:before,.weglot-flags.flag-1.ht>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ht.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ht>a:before,.weglot-flags.flag-0.ht>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ht.svg");background-position:unset !important;width:27px !important}.weglot-flags.hu>a:before,.weglot-flags.hu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hu.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.hu>a:before,.weglot-flags.flag-3.hu>span:before{background-image:url("https://cdn.weglot.com/flags/circle/hu.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.hu>a:before,.weglot-flags.flag-2.hu>span:before{background-image:url("https://cdn.weglot.com/flags/square/hu.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.hu>a:before,.weglot-flags.flag-1.hu>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/hu.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.hu>a:before,.weglot-flags.flag-0.hu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hu.svg");background-position:unset !important;width:27px !important}.weglot-flags.hw>a:before,.weglot-flags.hw>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.hw>a:before,.weglot-flags.flag-3.hw>span:before{background-image:url("https://cdn.weglot.com/flags/circle/hw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.hw>a:before,.weglot-flags.flag-2.hw>span:before{background-image:url("https://cdn.weglot.com/flags/square/hw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.hw>a:before,.weglot-flags.flag-1.hw>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/hw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.hw>a:before,.weglot-flags.flag-0.hw>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hw.svg");background-position:unset !important;width:27px !important}.weglot-flags.hy>a:before,.weglot-flags.hy>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/am.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.hy>a:before,.weglot-flags.flag-3.hy>span:before{background-image:url("https://cdn.weglot.com/flags/circle/am.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.hy>a:before,.weglot-flags.flag-2.hy>span:before{background-image:url("https://cdn.weglot.com/flags/square/am.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.hy>a:before,.weglot-flags.flag-1.hy>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/am.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.hy>a:before,.weglot-flags.flag-0.hy>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/am.svg");background-position:unset !important;width:27px !important}.weglot-flags.id>a:before,.weglot-flags.id>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/id.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.id>a:before,.weglot-flags.flag-3.id>span:before{background-image:url("https://cdn.weglot.com/flags/circle/id.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.id>a:before,.weglot-flags.flag-2.id>span:before{background-image:url("https://cdn.weglot.com/flags/square/id.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.id>a:before,.weglot-flags.flag-1.id>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/id.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.id>a:before,.weglot-flags.flag-0.id>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/id.svg");background-position:unset !important;width:27px !important}.weglot-flags.ig>a:before,.weglot-flags.ig>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ne.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ig>a:before,.weglot-flags.flag-3.ig>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ne.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ig>a:before,.weglot-flags.flag-2.ig>span:before{background-image:url("https://cdn.weglot.com/flags/square/ne.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ig>a:before,.weglot-flags.flag-1.ig>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ne.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ig>a:before,.weglot-flags.flag-0.ig>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ne.svg");background-position:unset !important;width:27px !important}.weglot-flags.is>a:before,.weglot-flags.is>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/is.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.is>a:before,.weglot-flags.flag-3.is>span:before{background-image:url("https://cdn.weglot.com/flags/circle/is.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.is>a:before,.weglot-flags.flag-2.is>span:before{background-image:url("https://cdn.weglot.com/flags/square/is.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.is>a:before,.weglot-flags.flag-1.is>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/is.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.is>a:before,.weglot-flags.flag-0.is>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/is.svg");background-position:unset !important;width:27px !important}.weglot-flags.it>a:before,.weglot-flags.it>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/it.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.it>a:before,.weglot-flags.flag-3.it>span:before{background-image:url("https://cdn.weglot.com/flags/circle/it.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.it>a:before,.weglot-flags.flag-2.it>span:before{background-image:url("https://cdn.weglot.com/flags/square/it.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.it>a:before,.weglot-flags.flag-1.it>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/it.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.it>a:before,.weglot-flags.flag-0.it>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/it.svg");background-position:unset !important;width:27px !important}.weglot-flags.ja>a:before,.weglot-flags.ja>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/jp.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ja>a:before,.weglot-flags.flag-3.ja>span:before{background-image:url("https://cdn.weglot.com/flags/circle/jp.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ja>a:before,.weglot-flags.flag-2.ja>span:before{background-image:url("https://cdn.weglot.com/flags/square/jp.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ja>a:before,.weglot-flags.flag-1.ja>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/jp.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ja>a:before,.weglot-flags.flag-0.ja>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/jp.svg");background-position:unset !important;width:27px !important}.weglot-flags.jv>a:before,.weglot-flags.jv>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/id.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.jv>a:before,.weglot-flags.flag-3.jv>span:before{background-image:url("https://cdn.weglot.com/flags/circle/id.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.jv>a:before,.weglot-flags.flag-2.jv>span:before{background-image:url("https://cdn.weglot.com/flags/square/id.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.jv>a:before,.weglot-flags.flag-1.jv>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/id.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.jv>a:before,.weglot-flags.flag-0.jv>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/id.svg");background-position:unset !important;width:27px !important}.weglot-flags.ka>a:before,.weglot-flags.ka>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ge.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ka>a:before,.weglot-flags.flag-3.ka>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ge.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ka>a:before,.weglot-flags.flag-2.ka>span:before{background-image:url("https://cdn.weglot.com/flags/square/ge.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ka>a:before,.weglot-flags.flag-1.ka>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ge.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ka>a:before,.weglot-flags.flag-0.ka>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ge.svg");background-position:unset !important;width:27px !important}.weglot-flags.kk>a:before,.weglot-flags.kk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.kk>a:before,.weglot-flags.flag-3.kk>span:before{background-image:url("https://cdn.weglot.com/flags/circle/kz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.kk>a:before,.weglot-flags.flag-2.kk>span:before{background-image:url("https://cdn.weglot.com/flags/square/kz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.kk>a:before,.weglot-flags.flag-1.kk>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/kz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.kk>a:before,.weglot-flags.flag-0.kk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kz.svg");background-position:unset !important;width:27px !important}.weglot-flags.km>a:before,.weglot-flags.km>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kh.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.km>a:before,.weglot-flags.flag-3.km>span:before{background-image:url("https://cdn.weglot.com/flags/circle/kh.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.km>a:before,.weglot-flags.flag-2.km>span:before{background-image:url("https://cdn.weglot.com/flags/square/kh.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.km>a:before,.weglot-flags.flag-1.km>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/kh.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.km>a:before,.weglot-flags.flag-0.km>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kh.svg");background-position:unset !important;width:27px !important}.weglot-flags.kn>a:before,.weglot-flags.kn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.kn>a:before,.weglot-flags.flag-3.kn>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.kn>a:before,.weglot-flags.flag-2.kn>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.kn>a:before,.weglot-flags.flag-1.kn>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.kn>a:before,.weglot-flags.flag-0.kn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.ko>a:before,.weglot-flags.ko>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ko>a:before,.weglot-flags.flag-3.ko>span:before{background-image:url("https://cdn.weglot.com/flags/circle/kr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ko>a:before,.weglot-flags.flag-2.ko>span:before{background-image:url("https://cdn.weglot.com/flags/square/kr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ko>a:before,.weglot-flags.flag-1.ko>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/kr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ko>a:before,.weglot-flags.flag-0.ko>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kr.svg");background-position:unset !important;width:27px !important}.weglot-flags.ku>a:before,.weglot-flags.ku>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/iq.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ku>a:before,.weglot-flags.flag-3.ku>span:before{background-image:url("https://cdn.weglot.com/flags/circle/iq.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ku>a:before,.weglot-flags.flag-2.ku>span:before{background-image:url("https://cdn.weglot.com/flags/square/iq.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ku>a:before,.weglot-flags.flag-1.ku>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/iq.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ku>a:before,.weglot-flags.flag-0.ku>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/iq.svg");background-position:unset !important;width:27px !important}.weglot-flags.ky>a:before,.weglot-flags.ky>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kg.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ky>a:before,.weglot-flags.flag-3.ky>span:before{background-image:url("https://cdn.weglot.com/flags/circle/kg.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ky>a:before,.weglot-flags.flag-2.ky>span:before{background-image:url("https://cdn.weglot.com/flags/square/kg.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ky>a:before,.weglot-flags.flag-1.ky>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/kg.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ky>a:before,.weglot-flags.flag-0.ky>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/kg.svg");background-position:unset !important;width:27px !important}.weglot-flags.la>a:before,.weglot-flags.la>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/it.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.la>a:before,.weglot-flags.flag-3.la>span:before{background-image:url("https://cdn.weglot.com/flags/circle/it.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.la>a:before,.weglot-flags.flag-2.la>span:before{background-image:url("https://cdn.weglot.com/flags/square/it.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.la>a:before,.weglot-flags.flag-1.la>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/it.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.la>a:before,.weglot-flags.flag-0.la>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/it.svg");background-position:unset !important;width:27px !important}.weglot-flags.lb>a:before,.weglot-flags.lb>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lu.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.lb>a:before,.weglot-flags.flag-3.lb>span:before{background-image:url("https://cdn.weglot.com/flags/circle/lu.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.lb>a:before,.weglot-flags.flag-2.lb>span:before{background-image:url("https://cdn.weglot.com/flags/square/lu.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.lb>a:before,.weglot-flags.flag-1.lb>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/lu.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.lb>a:before,.weglot-flags.flag-0.lb>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lu.svg");background-position:unset !important;width:27px !important}.weglot-flags.lo>a:before,.weglot-flags.lo>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/la.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.lo>a:before,.weglot-flags.flag-3.lo>span:before{background-image:url("https://cdn.weglot.com/flags/circle/la.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.lo>a:before,.weglot-flags.flag-2.lo>span:before{background-image:url("https://cdn.weglot.com/flags/square/la.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.lo>a:before,.weglot-flags.flag-1.lo>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/la.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.lo>a:before,.weglot-flags.flag-0.lo>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/la.svg");background-position:unset !important;width:27px !important}.weglot-flags.lt>a:before,.weglot-flags.lt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lt.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.lt>a:before,.weglot-flags.flag-3.lt>span:before{background-image:url("https://cdn.weglot.com/flags/circle/lt.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.lt>a:before,.weglot-flags.flag-2.lt>span:before{background-image:url("https://cdn.weglot.com/flags/square/lt.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.lt>a:before,.weglot-flags.flag-1.lt>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/lt.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.lt>a:before,.weglot-flags.flag-0.lt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lt.svg");background-position:unset !important;width:27px !important}.weglot-flags.lv>a:before,.weglot-flags.lv>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lv.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.lv>a:before,.weglot-flags.flag-3.lv>span:before{background-image:url("https://cdn.weglot.com/flags/circle/lv.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.lv>a:before,.weglot-flags.flag-2.lv>span:before{background-image:url("https://cdn.weglot.com/flags/square/lv.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.lv>a:before,.weglot-flags.flag-1.lv>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/lv.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.lv>a:before,.weglot-flags.flag-0.lv>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lv.svg");background-position:unset !important;width:27px !important}.weglot-flags.mg>a:before,.weglot-flags.mg>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mg.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.mg>a:before,.weglot-flags.flag-3.mg>span:before{background-image:url("https://cdn.weglot.com/flags/circle/mg.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.mg>a:before,.weglot-flags.flag-2.mg>span:before{background-image:url("https://cdn.weglot.com/flags/square/mg.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.mg>a:before,.weglot-flags.flag-1.mg>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/mg.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.mg>a:before,.weglot-flags.flag-0.mg>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mg.svg");background-position:unset !important;width:27px !important}.weglot-flags.mi>a:before,.weglot-flags.mi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/nz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.mi>a:before,.weglot-flags.flag-3.mi>span:before{background-image:url("https://cdn.weglot.com/flags/circle/nz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.mi>a:before,.weglot-flags.flag-2.mi>span:before{background-image:url("https://cdn.weglot.com/flags/square/nz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.mi>a:before,.weglot-flags.flag-1.mi>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/nz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.mi>a:before,.weglot-flags.flag-0.mi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/nz.svg");background-position:unset !important;width:27px !important}.weglot-flags.mk>a:before,.weglot-flags.mk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.mk>a:before,.weglot-flags.flag-3.mk>span:before{background-image:url("https://cdn.weglot.com/flags/circle/mk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.mk>a:before,.weglot-flags.flag-2.mk>span:before{background-image:url("https://cdn.weglot.com/flags/square/mk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.mk>a:before,.weglot-flags.flag-1.mk>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/mk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.mk>a:before,.weglot-flags.flag-0.mk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mk.svg");background-position:unset !important;width:27px !important}.weglot-flags.ml>a:before,.weglot-flags.ml>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ml>a:before,.weglot-flags.flag-3.ml>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ml>a:before,.weglot-flags.flag-2.ml>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ml>a:before,.weglot-flags.flag-1.ml>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ml>a:before,.weglot-flags.flag-0.ml>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.mn>a:before,.weglot-flags.mn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mn.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.mn>a:before,.weglot-flags.flag-3.mn>span:before{background-image:url("https://cdn.weglot.com/flags/circle/mn.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.mn>a:before,.weglot-flags.flag-2.mn>span:before{background-image:url("https://cdn.weglot.com/flags/square/mn.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.mn>a:before,.weglot-flags.flag-1.mn>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/mn.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.mn>a:before,.weglot-flags.flag-0.mn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mn.svg");background-position:unset !important;width:27px !important}.weglot-flags.mr>a:before,.weglot-flags.mr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.mr>a:before,.weglot-flags.flag-3.mr>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.mr>a:before,.weglot-flags.flag-2.mr>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.mr>a:before,.weglot-flags.flag-1.mr>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.mr>a:before,.weglot-flags.flag-0.mr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.ms>a:before,.weglot-flags.ms>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/my.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ms>a:before,.weglot-flags.flag-3.ms>span:before{background-image:url("https://cdn.weglot.com/flags/circle/my.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ms>a:before,.weglot-flags.flag-2.ms>span:before{background-image:url("https://cdn.weglot.com/flags/square/my.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ms>a:before,.weglot-flags.flag-1.ms>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/my.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ms>a:before,.weglot-flags.flag-0.ms>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/my.svg");background-position:unset !important;width:27px !important}.weglot-flags.mt>a:before,.weglot-flags.mt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mt.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.mt>a:before,.weglot-flags.flag-3.mt>span:before{background-image:url("https://cdn.weglot.com/flags/circle/mt.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.mt>a:before,.weglot-flags.flag-2.mt>span:before{background-image:url("https://cdn.weglot.com/flags/square/mt.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.mt>a:before,.weglot-flags.flag-1.mt>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/mt.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.mt>a:before,.weglot-flags.flag-0.mt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mt.svg");background-position:unset !important;width:27px !important}.weglot-flags.my>a:before,.weglot-flags.my>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mm.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.my>a:before,.weglot-flags.flag-3.my>span:before{background-image:url("https://cdn.weglot.com/flags/circle/mm.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.my>a:before,.weglot-flags.flag-2.my>span:before{background-image:url("https://cdn.weglot.com/flags/square/mm.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.my>a:before,.weglot-flags.flag-1.my>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/mm.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.my>a:before,.weglot-flags.flag-0.my>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mm.svg");background-position:unset !important;width:27px !important}.weglot-flags.ne>a:before,.weglot-flags.ne>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/np.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ne>a:before,.weglot-flags.flag-3.ne>span:before{background-image:url("https://cdn.weglot.com/flags/circle/np.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ne>a:before,.weglot-flags.flag-2.ne>span:before{background-image:url("https://cdn.weglot.com/flags/square/np.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ne>a:before,.weglot-flags.flag-1.ne>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/np.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ne>a:before,.weglot-flags.flag-0.ne>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/np.svg");background-position:unset !important;width:27px !important}.weglot-flags.nl>a:before,.weglot-flags.nl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/nl.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.nl>a:before,.weglot-flags.flag-3.nl>span:before{background-image:url("https://cdn.weglot.com/flags/circle/nl.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.nl>a:before,.weglot-flags.flag-2.nl>span:before{background-image:url("https://cdn.weglot.com/flags/square/nl.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.nl>a:before,.weglot-flags.flag-1.nl>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/nl.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.nl>a:before,.weglot-flags.flag-0.nl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/nl.svg");background-position:unset !important;width:27px !important}.weglot-flags.no>a:before,.weglot-flags.no>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/no.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.no>a:before,.weglot-flags.flag-3.no>span:before{background-image:url("https://cdn.weglot.com/flags/circle/no.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.no>a:before,.weglot-flags.flag-2.no>span:before{background-image:url("https://cdn.weglot.com/flags/square/no.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.no>a:before,.weglot-flags.flag-1.no>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/no.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.no>a:before,.weglot-flags.flag-0.no>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/no.svg");background-position:unset !important;width:27px !important}.weglot-flags.ny>a:before,.weglot-flags.ny>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ny>a:before,.weglot-flags.flag-3.ny>span:before{background-image:url("https://cdn.weglot.com/flags/circle/mw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ny>a:before,.weglot-flags.flag-2.ny>span:before{background-image:url("https://cdn.weglot.com/flags/square/mw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ny>a:before,.weglot-flags.flag-1.ny>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/mw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ny>a:before,.weglot-flags.flag-0.ny>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/mw.svg");background-position:unset !important;width:27px !important}.weglot-flags.pa>a:before,.weglot-flags.pa>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.pa>a:before,.weglot-flags.flag-3.pa>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.pa>a:before,.weglot-flags.flag-2.pa>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.pa>a:before,.weglot-flags.flag-1.pa>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.pa>a:before,.weglot-flags.flag-0.pa>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.pl>a:before,.weglot-flags.pl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pl.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.pl>a:before,.weglot-flags.flag-3.pl>span:before{background-image:url("https://cdn.weglot.com/flags/circle/pl.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.pl>a:before,.weglot-flags.flag-2.pl>span:before{background-image:url("https://cdn.weglot.com/flags/square/pl.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.pl>a:before,.weglot-flags.flag-1.pl>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/pl.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.pl>a:before,.weglot-flags.flag-0.pl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pl.svg");background-position:unset !important;width:27px !important}.weglot-flags.ps>a:before,.weglot-flags.ps>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/af.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ps>a:before,.weglot-flags.flag-3.ps>span:before{background-image:url("https://cdn.weglot.com/flags/circle/af.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ps>a:before,.weglot-flags.flag-2.ps>span:before{background-image:url("https://cdn.weglot.com/flags/square/af.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ps>a:before,.weglot-flags.flag-1.ps>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/af.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ps>a:before,.weglot-flags.flag-0.ps>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/af.svg");background-position:unset !important;width:27px !important}.weglot-flags.pt>a:before,.weglot-flags.pt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pt.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.pt>a:before,.weglot-flags.flag-3.pt>span:before{background-image:url("https://cdn.weglot.com/flags/circle/pt.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.pt>a:before,.weglot-flags.flag-2.pt>span:before{background-image:url("https://cdn.weglot.com/flags/square/pt.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.pt>a:before,.weglot-flags.flag-1.pt>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/pt.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.pt>a:before,.weglot-flags.flag-0.pt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pt.svg");background-position:unset !important;width:27px !important}.weglot-flags.ro>a:before,.weglot-flags.ro>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ro.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ro>a:before,.weglot-flags.flag-3.ro>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ro.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ro>a:before,.weglot-flags.flag-2.ro>span:before{background-image:url("https://cdn.weglot.com/flags/square/ro.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ro>a:before,.weglot-flags.flag-1.ro>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ro.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ro>a:before,.weglot-flags.flag-0.ro>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ro.svg");background-position:unset !important;width:27px !important}.weglot-flags.ru>a:before,.weglot-flags.ru>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ru.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ru>a:before,.weglot-flags.flag-3.ru>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ru.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ru>a:before,.weglot-flags.flag-2.ru>span:before{background-image:url("https://cdn.weglot.com/flags/square/ru.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ru>a:before,.weglot-flags.flag-1.ru>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ru.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ru>a:before,.weglot-flags.flag-0.ru>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ru.svg");background-position:unset !important;width:27px !important}.weglot-flags.sd>a:before,.weglot-flags.sd>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sd>a:before,.weglot-flags.flag-3.sd>span:before{background-image:url("https://cdn.weglot.com/flags/circle/pk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sd>a:before,.weglot-flags.flag-2.sd>span:before{background-image:url("https://cdn.weglot.com/flags/square/pk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sd>a:before,.weglot-flags.flag-1.sd>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/pk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sd>a:before,.weglot-flags.flag-0.sd>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pk.svg");background-position:unset !important;width:27px !important}.weglot-flags.si>a:before,.weglot-flags.si>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.si>a:before,.weglot-flags.flag-3.si>span:before{background-image:url("https://cdn.weglot.com/flags/circle/lk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.si>a:before,.weglot-flags.flag-2.si>span:before{background-image:url("https://cdn.weglot.com/flags/square/lk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.si>a:before,.weglot-flags.flag-1.si>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/lk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.si>a:before,.weglot-flags.flag-0.si>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/lk.svg");background-position:unset !important;width:27px !important}.weglot-flags.sk>a:before,.weglot-flags.sk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/sk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sk>a:before,.weglot-flags.flag-3.sk>span:before{background-image:url("https://cdn.weglot.com/flags/circle/sk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sk>a:before,.weglot-flags.flag-2.sk>span:before{background-image:url("https://cdn.weglot.com/flags/square/sk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sk>a:before,.weglot-flags.flag-1.sk>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/sk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sk>a:before,.weglot-flags.flag-0.sk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/sk.svg");background-position:unset !important;width:27px !important}.weglot-flags.sl>a:before,.weglot-flags.sl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/si.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sl>a:before,.weglot-flags.flag-3.sl>span:before{background-image:url("https://cdn.weglot.com/flags/circle/si.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sl>a:before,.weglot-flags.flag-2.sl>span:before{background-image:url("https://cdn.weglot.com/flags/square/si.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sl>a:before,.weglot-flags.flag-1.sl>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/si.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sl>a:before,.weglot-flags.flag-0.sl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/si.svg");background-position:unset !important;width:27px !important}.weglot-flags.sm>a:before,.weglot-flags.sm>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ws.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sm>a:before,.weglot-flags.flag-3.sm>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ws.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sm>a:before,.weglot-flags.flag-2.sm>span:before{background-image:url("https://cdn.weglot.com/flags/square/ws.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sm>a:before,.weglot-flags.flag-1.sm>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ws.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sm>a:before,.weglot-flags.flag-0.sm>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ws.svg");background-position:unset !important;width:27px !important}.weglot-flags.sn>a:before,.weglot-flags.sn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/zw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sn>a:before,.weglot-flags.flag-3.sn>span:before{background-image:url("https://cdn.weglot.com/flags/circle/zw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sn>a:before,.weglot-flags.flag-2.sn>span:before{background-image:url("https://cdn.weglot.com/flags/square/zw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sn>a:before,.weglot-flags.flag-1.sn>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/zw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sn>a:before,.weglot-flags.flag-0.sn>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/zw.svg");background-position:unset !important;width:27px !important}.weglot-flags.so>a:before,.weglot-flags.so>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/so.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.so>a:before,.weglot-flags.flag-3.so>span:before{background-image:url("https://cdn.weglot.com/flags/circle/so.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.so>a:before,.weglot-flags.flag-2.so>span:before{background-image:url("https://cdn.weglot.com/flags/square/so.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.so>a:before,.weglot-flags.flag-1.so>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/so.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.so>a:before,.weglot-flags.flag-0.so>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/so.svg");background-position:unset !important;width:27px !important}.weglot-flags.sq>a:before,.weglot-flags.sq>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/al.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sq>a:before,.weglot-flags.flag-3.sq>span:before{background-image:url("https://cdn.weglot.com/flags/circle/al.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sq>a:before,.weglot-flags.flag-2.sq>span:before{background-image:url("https://cdn.weglot.com/flags/square/al.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sq>a:before,.weglot-flags.flag-1.sq>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/al.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sq>a:before,.weglot-flags.flag-0.sq>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/al.svg");background-position:unset !important;width:27px !important}.weglot-flags.sr>a:before,.weglot-flags.sr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/rs.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sr>a:before,.weglot-flags.flag-3.sr>span:before{background-image:url("https://cdn.weglot.com/flags/circle/rs.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sr>a:before,.weglot-flags.flag-2.sr>span:before{background-image:url("https://cdn.weglot.com/flags/square/rs.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sr>a:before,.weglot-flags.flag-1.sr>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/rs.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sr>a:before,.weglot-flags.flag-0.sr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/rs.svg");background-position:unset !important;width:27px !important}.weglot-flags.st>a:before,.weglot-flags.st>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ng.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.st>a:before,.weglot-flags.flag-3.st>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ng.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.st>a:before,.weglot-flags.flag-2.st>span:before{background-image:url("https://cdn.weglot.com/flags/square/ng.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.st>a:before,.weglot-flags.flag-1.st>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ng.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.st>a:before,.weglot-flags.flag-0.st>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ng.svg");background-position:unset !important;width:27px !important}.weglot-flags.su>a:before,.weglot-flags.su>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/sd.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.su>a:before,.weglot-flags.flag-3.su>span:before{background-image:url("https://cdn.weglot.com/flags/circle/sd.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.su>a:before,.weglot-flags.flag-2.su>span:before{background-image:url("https://cdn.weglot.com/flags/square/sd.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.su>a:before,.weglot-flags.flag-1.su>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/sd.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.su>a:before,.weglot-flags.flag-0.su>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/sd.svg");background-position:unset !important;width:27px !important}.weglot-flags.sv>a:before,.weglot-flags.sv>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/se.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sv>a:before,.weglot-flags.flag-3.sv>span:before{background-image:url("https://cdn.weglot.com/flags/circle/se.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sv>a:before,.weglot-flags.flag-2.sv>span:before{background-image:url("https://cdn.weglot.com/flags/square/se.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sv>a:before,.weglot-flags.flag-1.sv>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/se.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sv>a:before,.weglot-flags.flag-0.sv>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/se.svg");background-position:unset !important;width:27px !important}.weglot-flags.sw>a:before,.weglot-flags.sw>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ke.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.sw>a:before,.weglot-flags.flag-3.sw>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ke.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.sw>a:before,.weglot-flags.flag-2.sw>span:before{background-image:url("https://cdn.weglot.com/flags/square/ke.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.sw>a:before,.weglot-flags.flag-1.sw>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ke.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.sw>a:before,.weglot-flags.flag-0.sw>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ke.svg");background-position:unset !important;width:27px !important}.weglot-flags.ta>a:before,.weglot-flags.ta>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ta>a:before,.weglot-flags.flag-3.ta>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ta>a:before,.weglot-flags.flag-2.ta>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ta>a:before,.weglot-flags.flag-1.ta>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ta>a:before,.weglot-flags.flag-0.ta>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.te>a:before,.weglot-flags.te>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.te>a:before,.weglot-flags.flag-3.te>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.te>a:before,.weglot-flags.flag-2.te>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.te>a:before,.weglot-flags.flag-1.te>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.te>a:before,.weglot-flags.flag-0.te>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.tg>a:before,.weglot-flags.tg>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tj.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.tg>a:before,.weglot-flags.flag-3.tg>span:before{background-image:url("https://cdn.weglot.com/flags/circle/tj.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.tg>a:before,.weglot-flags.flag-2.tg>span:before{background-image:url("https://cdn.weglot.com/flags/square/tj.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.tg>a:before,.weglot-flags.flag-1.tg>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/tj.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.tg>a:before,.weglot-flags.flag-0.tg>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tj.svg");background-position:unset !important;width:27px !important}.weglot-flags.th>a:before,.weglot-flags.th>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/th.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.th>a:before,.weglot-flags.flag-3.th>span:before{background-image:url("https://cdn.weglot.com/flags/circle/th.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.th>a:before,.weglot-flags.flag-2.th>span:before{background-image:url("https://cdn.weglot.com/flags/square/th.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.th>a:before,.weglot-flags.flag-1.th>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/th.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.th>a:before,.weglot-flags.flag-0.th>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/th.svg");background-position:unset !important;width:27px !important}.weglot-flags.tl>a:before,.weglot-flags.tl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.tl>a:before,.weglot-flags.flag-3.tl>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.tl>a:before,.weglot-flags.flag-2.tl>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.tl>a:before,.weglot-flags.flag-1.tl>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.tl>a:before,.weglot-flags.flag-0.tl>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.to>a:before,.weglot-flags.to>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/to.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.to>a:before,.weglot-flags.flag-3.to>span:before{background-image:url("https://cdn.weglot.com/flags/circle/to.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.to>a:before,.weglot-flags.flag-2.to>span:before{background-image:url("https://cdn.weglot.com/flags/square/to.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.to>a:before,.weglot-flags.flag-1.to>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/to.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.to>a:before,.weglot-flags.flag-0.to>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/to.svg");background-position:unset !important;width:27px !important}.weglot-flags.tr>a:before,.weglot-flags.tr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.tr>a:before,.weglot-flags.flag-3.tr>span:before{background-image:url("https://cdn.weglot.com/flags/circle/tr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.tr>a:before,.weglot-flags.flag-2.tr>span:before{background-image:url("https://cdn.weglot.com/flags/square/tr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.tr>a:before,.weglot-flags.flag-1.tr>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.tr>a:before,.weglot-flags.flag-0.tr>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.tt>a:before,.weglot-flags.tt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.tt>a:before,.weglot-flags.flag-3.tt>span:before{background-image:url("https://cdn.weglot.com/flags/circle/tr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.tt>a:before,.weglot-flags.flag-2.tt>span:before{background-image:url("https://cdn.weglot.com/flags/square/tr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.tt>a:before,.weglot-flags.flag-1.tt>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.tt>a:before,.weglot-flags.flag-0.tt>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.tw>a:before,.weglot-flags.tw>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.tw>a:before,.weglot-flags.flag-3.tw>span:before{background-image:url("https://cdn.weglot.com/flags/circle/tw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.tw>a:before,.weglot-flags.flag-2.tw>span:before{background-image:url("https://cdn.weglot.com/flags/square/tw.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.tw>a:before,.weglot-flags.flag-1.tw>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/tw.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.tw>a:before,.weglot-flags.flag-0.tw>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tw.svg");background-position:unset !important;width:27px !important}.weglot-flags.ty>a:before,.weglot-flags.ty>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pf.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ty>a:before,.weglot-flags.flag-3.ty>span:before{background-image:url("https://cdn.weglot.com/flags/circle/pf.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ty>a:before,.weglot-flags.flag-2.ty>span:before{background-image:url("https://cdn.weglot.com/flags/square/pf.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ty>a:before,.weglot-flags.flag-1.ty>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/pf.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ty>a:before,.weglot-flags.flag-0.ty>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pf.svg");background-position:unset !important;width:27px !important}.weglot-flags.uk>a:before,.weglot-flags.uk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ua.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.uk>a:before,.weglot-flags.flag-3.uk>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ua.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.uk>a:before,.weglot-flags.flag-2.uk>span:before{background-image:url("https://cdn.weglot.com/flags/square/ua.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.uk>a:before,.weglot-flags.flag-1.uk>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ua.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.uk>a:before,.weglot-flags.flag-0.uk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ua.svg");background-position:unset !important;width:27px !important}.weglot-flags.ur>a:before,.weglot-flags.ur>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ur>a:before,.weglot-flags.flag-3.ur>span:before{background-image:url("https://cdn.weglot.com/flags/circle/pk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ur>a:before,.weglot-flags.flag-2.ur>span:before{background-image:url("https://cdn.weglot.com/flags/square/pk.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ur>a:before,.weglot-flags.flag-1.ur>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/pk.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ur>a:before,.weglot-flags.flag-0.ur>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/pk.svg");background-position:unset !important;width:27px !important}.weglot-flags.uz>a:before,.weglot-flags.uz>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/uz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.uz>a:before,.weglot-flags.flag-3.uz>span:before{background-image:url("https://cdn.weglot.com/flags/circle/uz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.uz>a:before,.weglot-flags.flag-2.uz>span:before{background-image:url("https://cdn.weglot.com/flags/square/uz.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.uz>a:before,.weglot-flags.flag-1.uz>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/uz.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.uz>a:before,.weglot-flags.flag-0.uz>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/uz.svg");background-position:unset !important;width:27px !important}.weglot-flags.vi>a:before,.weglot-flags.vi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/vn.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.vi>a:before,.weglot-flags.flag-3.vi>span:before{background-image:url("https://cdn.weglot.com/flags/circle/vn.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.vi>a:before,.weglot-flags.flag-2.vi>span:before{background-image:url("https://cdn.weglot.com/flags/square/vn.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.vi>a:before,.weglot-flags.flag-1.vi>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/vn.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.vi>a:before,.weglot-flags.flag-0.vi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/vn.svg");background-position:unset !important;width:27px !important}.weglot-flags.xh>a:before,.weglot-flags.xh>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.xh>a:before,.weglot-flags.flag-3.xh>span:before{background-image:url("https://cdn.weglot.com/flags/circle/za.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.xh>a:before,.weglot-flags.flag-2.xh>span:before{background-image:url("https://cdn.weglot.com/flags/square/za.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.xh>a:before,.weglot-flags.flag-1.xh>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.xh>a:before,.weglot-flags.flag-0.xh>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.yi>a:before,.weglot-flags.yi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/il.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.yi>a:before,.weglot-flags.flag-3.yi>span:before{background-image:url("https://cdn.weglot.com/flags/circle/il.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.yi>a:before,.weglot-flags.flag-2.yi>span:before{background-image:url("https://cdn.weglot.com/flags/square/il.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.yi>a:before,.weglot-flags.flag-1.yi>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/il.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.yi>a:before,.weglot-flags.flag-0.yi>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/il.svg");background-position:unset !important;width:27px !important}.weglot-flags.yo>a:before,.weglot-flags.yo>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ng.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.yo>a:before,.weglot-flags.flag-3.yo>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ng.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.yo>a:before,.weglot-flags.flag-2.yo>span:before{background-image:url("https://cdn.weglot.com/flags/square/ng.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.yo>a:before,.weglot-flags.flag-1.yo>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ng.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.yo>a:before,.weglot-flags.flag-0.yo>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ng.svg");background-position:unset !important;width:27px !important}.weglot-flags.zh>a:before,.weglot-flags.zh>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/cn.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.zh>a:before,.weglot-flags.flag-3.zh>span:before{background-image:url("https://cdn.weglot.com/flags/circle/cn.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.zh>a:before,.weglot-flags.flag-2.zh>span:before{background-image:url("https://cdn.weglot.com/flags/square/cn.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.zh>a:before,.weglot-flags.flag-1.zh>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/cn.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.zh>a:before,.weglot-flags.flag-0.zh>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/cn.svg");background-position:unset !important;width:27px !important}.weglot-flags.zu>a:before,.weglot-flags.zu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.zu>a:before,.weglot-flags.flag-3.zu>span:before{background-image:url("https://cdn.weglot.com/flags/circle/za.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.zu>a:before,.weglot-flags.flag-2.zu>span:before{background-image:url("https://cdn.weglot.com/flags/square/za.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.zu>a:before,.weglot-flags.flag-1.zu>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.zu>a:before,.weglot-flags.flag-0.zu>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/za.svg");background-position:unset !important;width:27px !important}.weglot-flags.hm>a:before,.weglot-flags.hm>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hm.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.hm>a:before,.weglot-flags.flag-3.hm>span:before{background-image:url("https://cdn.weglot.com/flags/circle/hm.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.hm>a:before,.weglot-flags.flag-2.hm>span:before{background-image:url("https://cdn.weglot.com/flags/square/hm.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.hm>a:before,.weglot-flags.flag-1.hm>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/hm.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.hm>a:before,.weglot-flags.flag-0.hm>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/hm.svg");background-position:unset !important;width:27px !important}.weglot-flags.cb>a:before,.weglot-flags.cb>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ph.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.cb>a:before,.weglot-flags.flag-3.cb>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ph.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.cb>a:before,.weglot-flags.flag-2.cb>span:before{background-image:url("https://cdn.weglot.com/flags/square/ph.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.cb>a:before,.weglot-flags.flag-1.cb>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ph.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.cb>a:before,.weglot-flags.flag-0.cb>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ph.svg");background-position:unset !important;width:27px !important}.weglot-flags.or>a:before,.weglot-flags.or>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.or>a:before,.weglot-flags.flag-3.or>span:before{background-image:url("https://cdn.weglot.com/flags/circle/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.or>a:before,.weglot-flags.flag-2.or>span:before{background-image:url("https://cdn.weglot.com/flags/square/in.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.or>a:before,.weglot-flags.flag-1.or>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.or>a:before,.weglot-flags.flag-0.or>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/in.svg");background-position:unset !important;width:27px !important}.weglot-flags.tk>a:before,.weglot-flags.tk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.tk>a:before,.weglot-flags.flag-3.tk>span:before{background-image:url("https://cdn.weglot.com/flags/circle/tr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.tk>a:before,.weglot-flags.flag-2.tk>span:before{background-image:url("https://cdn.weglot.com/flags/square/tr.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.tk>a:before,.weglot-flags.flag-1.tk>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.tk>a:before,.weglot-flags.flag-0.tk>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/tr.svg");background-position:unset !important;width:27px !important}.weglot-flags.ug>a:before,.weglot-flags.ug>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ug.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-3.ug>a:before,.weglot-flags.flag-3.ug>span:before{background-image:url("https://cdn.weglot.com/flags/circle/ug.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-2.ug>a:before,.weglot-flags.flag-2.ug>span:before{background-image:url("https://cdn.weglot.com/flags/square/ug.svg");background-position:unset !important;width:24px !important}.weglot-flags.flag-1.ug>a:before,.weglot-flags.flag-1.ug>span:before{background-image:url("https://cdn.weglot.com/flags/shiny/ug.svg");background-position:unset !important;width:27px !important}.weglot-flags.flag-0.ug>a:before,.weglot-flags.flag-0.ug>span:before{background-image:url("https://cdn.weglot.com/flags/rectangle_mat/ug.svg");background-position:unset !important;width:27px !important}
2
+
3
+ /*# sourceMappingURL=styles.css.map */
dist/admin-js.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function o(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(a,n,function(t){return e[t]}.bind(null,n));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/",o(o.s=4)}([,function(e,t){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var a=arguments[1],n=0;n<o;){var l=t[n];if(e.call(a,l,n,t))return l;n++}},configurable:!0,writable:!0})},function(e,t){Array.prototype.filter||(Array.prototype.filter=function(e,t){"use strict";if("Function"!=typeof e&&"function"!=typeof e||!this)throw new TypeError;var o=this.length>>>0,a=new Array(o),n=this,l=0,r=-1;if(void 0===t)for(;++r!==o;)r in this&&e(n[r],r,n)&&(a[l++]=n[r]);else for(;++r!==o;)r in this&&e.call(t,n[r],r,n)&&(a[l++]=n[r]);return a.length=l,a})},,function(e,t,o){"use strict";o.r(t);var a=function(){const e=jQuery;let t;const o=()=>{let o=e("#original_language").val();e("#original_language").on("change",(function(a){const n=o,l=o;o=a.target.value,t[0].selectize.removeOption(o);const r=weglot_languages.available.find(e=>e.internal_code===l),s=weglot_languages.available.find(e=>e.internal_code===o);t[0].selectize.addOption(r);const i=e("#is_fullname").is(":checked");let c="";e("#with_name").is(":checked")&&(c=i?s.local:s.internal_code.toUpperCase()),e(".wgcurrent.wg-li").removeClass(n).addClass(o).attr("data-code-language",o).find("span").text(c)})),t=e(".weglot-select-destination").selectize({delimiter:"|",persist:!1,valueField:"internal_code",labelField:"local",searchField:["internal_code","english","local"],sortField:[{field:"english",direction:"asc"}],maxItems:weglot_languages.limit,plugins:["remove_button"],options:weglot_languages.available.filter(e=>e.internal_code!==weglot_languages.original),render:{option:function(e,t){return`<div class="weglot__choice__language"><span class="weglot__choice__language--english">${t(e.english)}</span><span class="weglot__choice__language--local">${t(e.local)}[${t(e.external_code)}]</span></div>`}}}).on("change",o=>{const a=t[0].selectize.getValue(),n=e("#li-button-tpl");if(0===n.length)return;const l=e("#is_fullname").is(":checked"),r=e("#with_name").is(":checked"),s=e("#with_flags").is(":checked");let i="";s&&(i="weglot-flags");let c="";a.forEach(e=>{const t=weglot_languages.available.find(t=>t.internal_code===e);let o="";r&&(o=l?t.local:e.toUpperCase()),c+=n.html().replace("{LABEL_LANGUAGE}",o).replace(new RegExp("{CODE_LANGUAGE}","g"),e).replace("{CLASSES}",i)}),e(".country-selector ul").html(c)}),window.addEventListener("weglotCheckApi",e=>{let o=1e3;const a=e.detail.plan;a<=0||weglot_languages.plans.starter_free.ids.indexOf(a)>=0?o=weglot_languages.plans.starter_free.limit_language:weglot_languages.plans.business.ids.indexOf(a)>=0&&(o=weglot_languages.plans.business.limit_language),t[0].selectize.settings.maxItems=o})};document.addEventListener("DOMContentLoaded",()=>{o()})};var n=function(){const e=jQuery;document.addEventListener("DOMContentLoaded",()=>{e("#weglot-box-first-settings .weglot-btn-close").on("click",(function(t){t.preventDefault(),e("#weglot-box-first-settings").hide()}))})};var l=function(){const e=()=>{document.querySelector("#tpl-exclusion-url");const e=document.querySelector("#tpl-exclusion-block"),t=document.querySelector("#container-exclude_blocks");function o(e){e.preventDefault(),this.parentNode.remove()}document.querySelector("#js-add-exclude-block")&&document.querySelector("#js-add-exclude-block").addEventListener("click",a=>{a.preventDefault(),t.insertAdjacentHTML("beforeend",e.innerHTML),document.querySelector("#container-exclude_blocks .item-exclude:last-child .js-btn-remove-exclude").addEventListener("click",o)});document.querySelectorAll(".js-btn-remove").forEach(e=>{e.addEventListener("click",o)})};document.addEventListener("DOMContentLoaded",()=>{e()})};var r=function(){const e=jQuery,t=()=>{let t=e("#type_flags option:selected").data("value"),o=[];o.push(e(".country-selector label").data("code-language")),e(".country-selector li").each((t,a)=>{o.push(e(a).data("code-language"))});const a=weglot_languages.available.filter(e=>o.indexOf(e.external_code)>=0);e("#weglot-css-inline").text(weglot_css.inline),e("#is_dropdown").on("change",(function(){e(".country-selector").toggleClass("weglot-inline"),e(".country-selector").toggleClass("weglot-dropdown")})),e("#with_flags").on("change",(function(){e(".country-selector label, .country-selector li").toggleClass("weglot-flags")})),e("#type_flags").on("change",(function(o){e(".country-selector label, .country-selector li").removeClass("flag-"+t);const a=e(":selected",this).data("value");e(".country-selector label, .country-selector li").addClass("flag-"+a),t=a}));const n=()=>{const t=a.find(t=>t.external_code===e(".country-selector label").data("code-language")),o=e("#is_fullname").is(":checked"),n=o?t.local:t.internal_code.toUpperCase();e(".country-selector label a, .country-selector label span").text(n),e(".country-selector li").each((t,n)=>{const l=a.find(t=>t.internal_code===e(n).data("code-language")),r=o?l.local:l.internal_code.toUpperCase();e(n).find("a").text(r)})};e("#with_name").on("change",(function(t){t.target.checked?n():(e(".country-selector label a, .country-selector label span").text(""),e(".country-selector li a, .country-selector li span").each((t,o)=>{e(o).text("")}))})),e("#is_fullname").on("change",(function(t){if(e("#with_name").is(":checked"))if(t.target.checked)n();else{const t=a.find(t=>t.internal_code===e(".country-selector label").data("code-language"));e(".country-selector label a, .country-selector label span").text(t.internal_code.toUpperCase()),e(".country-selector li").each((t,o)=>{const n=a.find(t=>t.internal_code===e(o).data("code-language"));e(o).find("a").text(n.internal_code.toUpperCase()),e(o).find("span").text(n.internal_code.toUpperCase())})}})),e("#override_css").on("keyup",(function(t){e("#weglot-css-inline").text(t.target.value)}))};document.addEventListener("DOMContentLoaded",()=>{0!==e(".weglot-preview").length&&t()})};var s=function(){const e=jQuery,t=()=>{e("#api_key_private").blur((function(){var t=e(this).val();if(0===t.length)return e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span>'),void e("#wrap-weglot #submit").prop("disabled",!0);function o(){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span><p class="weglot-keyres">Make sure you enter a valid Weglot API key. If the key is still not validating, you can contact your host provider and ask if it\'s possible to whitelist api.weglot.com and weglot.com</p>'),e("#wrap-weglot #submit").prop("disabled",!0)}e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-ckeckkey"></span>'),e.ajax({method:"POST",url:ajaxurl,data:{action:"get_user_info",api_key:t},success:({data:t,success:a})=>{e(".weglot-keyres").remove(),a?function(t){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-okkey"></span>'),e("#wrap-weglot #submit").prop("disabled",!1);const o=new CustomEvent("weglotCheckApi",{detail:t});window.dispatchEvent(o)}(t):o()}}).fail((function(){o()}))})),e(".toplevel_page_weglot-settings form").submit((function(t){e("#wrap-weglot #submit").prop("disabled",!0)}))};document.addEventListener("DOMContentLoaded",()=>{t()})};var i=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{jQuery(document).ready((function(e){wp.codeEditor.initialize(e("#override_css"),cm_settings)}))})};var c=function(){const e=jQuery;"undefined"!=typeof weglot_css&&e("#weglot-css-flag-css").text(weglot_css.flag_css);const t=()=>{e(".flag-style-openclose").on("click",(function(){e(".flag-style-wrapper").toggle()})),e(".old-flag-style").on("click",(function(){e(".old-flag-wrapper").toggle()})),e("select.flag-en-type, select.flag-es-type, select.flag-pt-type, select.flag-fr-type, select.flag-ar-type, select.flag-tw-type, select.flag-zh-type").on("change",(function(){!function(){var t=new Array,o=new Array,a=new Array,n=new Array,l=new Array,r=new Array,s=new Array;t[1]=[3570,7841,48,2712],t[2]=[3720,449,3048,4440],t[3]=[3840,1281,2712,4224],t[4]=[3240,5217,1224,2112],t[5]=[4050,3585,1944,2496],t[6]=[2340,3457,2016,2016],o[1]=[4320,4641,3144,3552],o[2]=[3750,353,2880,4656],o[3]=[4200,1601,2568,3192],o[4]=[3990,5793,1032,2232],o[5]=[5460,897,4104,3120],o[6]=[3810,7905,216,3888],o[7]=[3630,8065,192,2376],o[8]=[3780,1473,2496,4104],o[9]=[6120,2145,4680,2568],o[10]=[4440,3009,3240,1176],o[11]=[5280,1825,3936,2976],o[12]=[4770,2081,3624,1008],o[13]=[4080,3201,2160,2544],o[14]=[4590,5761,3432,624],o[15]=[4350,2209,3360,2688],o[16]=[5610,5249,3168,528],o[17]=[5070,1729,3792,2952],o[18]=[6870,5953,96,3408],o[19]=[4020,5697,1056,1224],a[1]=[2760,736,2856,4416],a[2]=[3840,1280,2712,4224],a[3]=[5700,7201,5016,2400],a[4]=[2220,4160,1632,1944],n[1]=[1830,129,3096,5664],n[2]=[5100,2177,3840,2904],n[3]=[4890,3425,3648,2136],n[4]=[1320,3681,1896,4080],n[5]=[1260,3841,1824,1200],n[6]=[1020,3969,1608,312],n[7]=[4800,4065,3600,72],n[8]=[4710,4865,3504,480],n[9]=[6720,5984,5112,3792],n[10]=[4500,7233,3288,1800],n[11]=[720,7522,384,3936],n[12]=[690,7745,336,1104],n[13]=[600,8225,120,1272],n[14]=[660,5569,840,576],l[1]=[3690,1505,2592,3240],l[2]=[3600,3233,2112,48],r[1]=[2970,6369,3408,4008],r[2]=[3600,3233,2112,48],s[1]=[6630,993,2784,4344];var i=e("select.flag-en-type").val(),c=e("select.flag-es-type").val(),g=e("select.flag-fr-type").val(),f=e("select.flag-ar-type").val(),p=e("select.flag-tw-type").val(),d=e("select.flag-zh-type").val(),u=e("select.flag-pt-type").val(),w=i<=0?"":".weglot-flags.en > a:before, .weglot-flags.en > span:before { background-position: -"+t[i][0]+"px 0 !important; } .weglot-flags.flag-1.en > a:before, .weglot-flags.flag-1.en > span:before { background-position: -"+t[i][1]+"px 0 !important; } .weglot-flags.flag-2.en > a:before, .weglot-flags.flag-2.en > span:before { background-position: -"+t[i][2]+"px 0 !important; } .weglot-flags.flag-3.en > a:before, .weglot-flags.flag-3.en > span:before { background-position: -"+t[i][3]+"px 0 !important; } ",b=c<=0?"":".weglot-flags.es > a:before, .weglot-flags.es > span:before { background-position: -"+o[c][0]+"px 0 !important; } .weglot-flags.flag-1.es > a:before, .weglot-flags.flag-1.es > span:before { background-position: -"+o[c][1]+"px 0 !important; } .weglot-flags.flag-2.es > a:before, .weglot-flags.flag-2.es > span:before { background-position: -"+o[c][2]+"px 0 !important; } .weglot-flags.flag-3.es > a:before, .weglot-flags.flag-3.es > span:before { background-position: -"+o[c][3]+"px 0 !important; } ",y=g<=0?"":".weglot-flags.fr > a:before, .weglot-flags.fr > span:before { background-position: -"+a[g][0]+"px 0 !important; } .weglot-flags.flag-1.fr > a:before, .weglot-flags.flag-1.fr > span:before { background-position: -"+a[g][1]+"px 0 !important; } .weglot-flags.flag-2.fr > a:before, .weglot-flags.flag-2.fr > span:before { background-position: -"+a[g][2]+"px 0 !important; } .weglot-flags.flag-3.fr > a:before, .weglot-flags.flag-3.fr > span:before { background-position: -"+a[g][3]+"px 0 !important; } ",m=f<=0?"":".weglot-flags.ar > a:before, .weglot-flags.ar > span:before { background-position: -"+n[f][0]+"px 0 !important; } .weglot-flags.flag-1.ar > a:before, .weglot-flags.flag-1.ar > span:before { background-position: -"+n[f][1]+"px 0 !important; } .weglot-flags.flag-2.ar > a:before, .weglot-flags.flag-2.ar > span:before { background-position: -"+n[f][2]+"px 0 !important; } .weglot-flags.flag-3.ar > a:before, .weglot-flags.flag-3.ar > span:before { background-position: -"+n[f][3]+"px 0 !important; } ",_=p<=0?"":".weglot-flags.tw > a:before, .weglot-flags.tw > span:before { background-position: -"+l[p][0]+"px 0 !important; } .weglot-flags.flag-1.tw > a:before, .weglot-flags.flag-1.tw > span:before { background-position: -"+l[p][1]+"px 0 !important; } .weglot-flags.flag-2.tw > a:before, .weglot-flags.flag-2.tw > span:before { background-position: -"+l[p][2]+"px 0 !important; } .weglot-flags.flag-3.tw > a:before, .weglot-flags.flag-3.tw > span:before { background-position: -"+l[p][3]+"px 0 !important; } ",v=d<=0?"":".weglot-flags.zh > a:before, .weglot-flags.zh > span:before { background-position: -"+r[d][0]+"px 0 !important; } .weglot-flags.flag-1.zh > a:before, .weglot-flags.flag-1.zh > span:before { background-position: -"+r[d][1]+"px 0 !important; } .weglot-flags.flag-2.zh > a:before, .weglot-flags.flag-2.zh > span:before { background-position: -"+r[d][2]+"px 0 !important; } .weglot-flags.flag-3.zh > a:before, .weglot-flags.flag-3.zh > span:before { background-position: -"+r[d][3]+"px 0 !important; } ",h=u<=0?"":".weglot-flags.pt > a:before, .weglot-flags.pt > span:before { background-position: -"+s[u][0]+"px 0 !important; } .weglot-flags.flag-1.pt > a:before, .weglot-flags.flag-1.pt > span:before { background-position: -"+s[u][1]+"px 0 !important; } .weglot-flags.flag-2.pt > a:before, .weglot-flags.flag-2.pt > span:before { background-position: -"+s[u][2]+"px 0 !important; } .weglot-flags.flag-3.pt > a:before, .weglot-flags.flag-3.pt > span:before { background-position: -"+s[u][3]+"px 0 !important; } ";e("#flag_css, #weglot-css-flag-css").text(w+b+y+m+_+v+h)}()}));var t=e("#flag_css").text();t.trim()&&e("#weglot-css-flag-css").text(t)};document.addEventListener("DOMContentLoaded",()=>{t()})};var g=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#private_mode");e&&0!=e.length&&(document.querySelector("#private_mode").addEventListener("change",(function(e){document.querySelectorAll(".private-mode-lang--input").forEach(t=>{t.checked=e.target.checked})})),document.querySelectorAll(".private-mode-lang--input").forEach(e=>{e.addEventListener("change",(function(e){0===document.querySelectorAll(".private-mode-lang--input:checked").length&&(document.querySelector("#private_mode").checked=!1)}))}))})};o(1),o(2);a(),l(),n(),r(),s(),i(),c(),g()}]);
1
+ !function(e){var t={};function o(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,o),l.l=!0,l.exports}o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)o.d(a,l,function(t){return e[t]}.bind(null,l));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/dist/",o(o.s=4)}([,function(e,t){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var a=arguments[1],l=0;l<o;){var n=t[l];if(e.call(a,n,l,t))return n;l++}},configurable:!0,writable:!0})},function(e,t){Array.prototype.filter||(Array.prototype.filter=function(e,t){"use strict";if("Function"!=typeof e&&"function"!=typeof e||!this)throw new TypeError;var o=this.length>>>0,a=new Array(o),l=this,n=0,r=-1;if(void 0===t)for(;++r!==o;)r in this&&e(l[r],r,l)&&(a[n++]=l[r]);else for(;++r!==o;)r in this&&e.call(t,l[r],r,l)&&(a[n++]=l[r]);return a.length=n,a})},,function(e,t,o){"use strict";o.r(t);var a=function(){const e=jQuery;let t;const o=()=>{let o=e("#original_language").val();e("#original_language").on("change",(function(a){const l=o,n=o;o=a.target.value,t[0].selectize.removeOption(o);const r=weglot_languages.available.find(e=>e.internal_code===n),s=weglot_languages.available.find(e=>e.internal_code===o);t[0].selectize.addOption(r);const i=e("#is_fullname").is(":checked");let c="";e("#with_name").is(":checked")&&(c=i?s.local:s.internal_code.toUpperCase()),e(".wgcurrent.wg-li").removeClass(l).addClass(o).attr("data-code-language",o).find("span").text(c)})),t=e(".weglot-select-destination").selectize({delimiter:"|",persist:!1,valueField:"internal_code",labelField:"local",searchField:["internal_code","english","local"],sortField:[{field:"english",direction:"asc"}],maxItems:weglot_languages.limit,plugins:["remove_button"],options:weglot_languages.available.filter(e=>e.internal_code!==weglot_languages.original),render:{option:function(e,t){return`<div class="weglot__choice__language"><span class="weglot__choice__language--english">${t(e.english)}</span><span class="weglot__choice__language--local">${t(e.local)}[${t(e.external_code)}]</span></div>`}}}).on("change",o=>{const a=t[0].selectize.getValue(),l=e("#li-button-tpl");if(0===l.length)return;const n=e("#is_fullname").is(":checked"),r=e("#with_name").is(":checked"),s=e("#with_flags").is(":checked");let i="";s&&(i="weglot-flags");let c="";var g=e("label.weglot-flags").attr("class").split(/\s+/);e.each(g,(function(e,t){if(1==t.includes("flag-"))return i+=" "+t,!1})),a.forEach(e=>{const t=weglot_languages.available.find(t=>t.internal_code===e);let o="";r&&(o=n?t.local:e.toUpperCase()),c+=l.html().replace("{LABEL_LANGUAGE}",o).replace(new RegExp("{CODE_LANGUAGE}","g"),e).replace("{CLASSES}",i)}),e(".country-selector ul").html(c)}),window.addEventListener("weglotCheckApi",e=>{t[0].selectize.settings.maxItems=weglot_languages.limit})};document.addEventListener("DOMContentLoaded",()=>{o()})};var l=function(){const e=jQuery;document.addEventListener("DOMContentLoaded",()=>{e("#weglot-box-first-settings .weglot-btn-close").on("click",(function(t){t.preventDefault(),e("#weglot-box-first-settings").hide()}))})};var n=function(){const e=()=>{document.querySelector("#tpl-exclusion-url");const e=document.querySelector("#tpl-exclusion-block"),t=document.querySelector("#container-exclude_blocks");function o(e){e.preventDefault(),this.parentNode.remove()}document.querySelector("#js-add-exclude-block")&&document.querySelector("#js-add-exclude-block").addEventListener("click",a=>{a.preventDefault(),t.insertAdjacentHTML("beforeend",e.innerHTML),document.querySelector("#container-exclude_blocks .item-exclude:last-child .js-btn-remove-exclude").addEventListener("click",o)});document.querySelectorAll(".js-btn-remove").forEach(e=>{e.addEventListener("click",o)})};document.addEventListener("DOMContentLoaded",()=>{e()})};var r=function(){const e=jQuery,t=()=>{let t=e("#type_flags option:selected").data("value"),o=[];o.push(e(".country-selector label").data("code-language")),e(".country-selector li").each((t,a)=>{o.push(e(a).data("code-language"))});const a=weglot_languages.available.filter(e=>o.indexOf(e.external_code)>=0);e("#weglot-css-inline").text(weglot_css.inline),e("#is_dropdown").on("change",(function(){e(".country-selector").toggleClass("weglot-inline"),e(".country-selector").toggleClass("weglot-dropdown")})),e("#with_flags").on("change",(function(){e(".country-selector label, .country-selector li").toggleClass("weglot-flags")})),e("#type_flags").on("change",(function(o){e(".country-selector label, .country-selector li").removeClass("flag-"+t);const a=e(":selected",this).data("value");e(".country-selector label, .country-selector li").addClass("flag-"+a),t=a}));const l=()=>{const t=a.find(t=>t.external_code===e(".country-selector label").data("code-language")),o=e("#is_fullname").is(":checked"),l=o?t.local:t.internal_code.toUpperCase();e(".country-selector label a, .country-selector label span").text(l),e(".country-selector li").each((t,l)=>{const n=a.find(t=>t.internal_code===e(l).data("code-language")),r=o?n.local:n.internal_code.toUpperCase();e(l).find("a").text(r)})};e("#with_name").on("change",(function(t){t.target.checked?l():(e(".country-selector label a, .country-selector label span").text(""),e(".country-selector li a, .country-selector li span").each((t,o)=>{e(o).text("")}))})),e("#is_fullname").on("change",(function(t){if(e("#with_name").is(":checked"))if(t.target.checked)l();else{const t=a.find(t=>t.internal_code===e(".country-selector label").data("code-language"));e(".country-selector label a, .country-selector label span").text(t.internal_code.toUpperCase()),e(".country-selector li").each((t,o)=>{const l=a.find(t=>t.internal_code===e(o).data("code-language"));e(o).find("a").text(l.internal_code.toUpperCase()),e(o).find("span").text(l.internal_code.toUpperCase())})}})),e("#override_css").on("keyup",(function(t){e("#weglot-css-inline").text(t.target.value)}))};document.addEventListener("DOMContentLoaded",()=>{0!==e(".weglot-preview").length&&t()})};var s=function(){const e=jQuery,t=()=>{e("#api_key_private").blur((function(){var t=e(this).val();if(0===t.length)return e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span>'),void e("#wrap-weglot #submit").prop("disabled",!0);function o(){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-nokkey"></span><p class="weglot-keyres">Make sure you enter a valid Weglot API key. If the key is still not validating, you can contact your host provider and ask if it\'s possible to whitelist api.weglot.com and weglot.com</p>'),e("#wrap-weglot #submit").prop("disabled",!0)}e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-ckeckkey"></span>'),e.ajax({method:"POST",url:ajaxurl,data:{action:"get_user_info",api_key:t},success:({data:t,success:a})=>{e(".weglot-keyres").remove(),a?function(t){e(".weglot-keyres").remove(),e("#api_key_private").after('<span class="weglot-keyres weglot-okkey"></span>'),e("#wrap-weglot #submit").prop("disabled",!1);const o=new CustomEvent("weglotCheckApi",{detail:t});window.dispatchEvent(o)}(t):o()}}).fail((function(){o()}))})),e(".toplevel_page_weglot-settings form").submit((function(t){e("#wrap-weglot #submit").prop("disabled",!0)}))};document.addEventListener("DOMContentLoaded",()=>{t()})};var i=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{jQuery(document).ready((function(e){wp.codeEditor.initialize(e("#override_css"),cm_settings)}))})};var c=function(){const e=jQuery;"undefined"!=typeof weglot_css&&e("#weglot-css-flag-css").text(weglot_css.flag_css);const t=()=>{e(".flag-style-openclose").on("click",(function(){e(".flag-style-wrapper").toggle()})),e(".old-flag-style").on("click",(function(){e(".old-flag-wrapper").toggle()})),e("select.flag-en-type, select.flag-es-type, select.flag-pt-type, select.flag-fr-type, select.flag-ar-type, select.flag-tw-type, select.flag-zh-type").on("change",(function(){!function(){var t=new Array,o=new Array,a=new Array,l=new Array,n=new Array,r=new Array,s=new Array;t[1]=[3570,7841,48,2712],t[2]=[3720,449,3048,4440],t[3]=[3840,1281,2712,4224],t[4]=[3240,5217,1224,2112],t[5]=[4050,3585,1944,2496],t[6]=[2340,3457,2016,2016],o[1]=[4320,4641,3144,3552],o[2]=[3750,353,2880,4656],o[3]=[4200,1601,2568,3192],o[4]=[3990,5793,1032,2232],o[5]=[5460,897,4104,3120],o[6]=[3810,7905,216,3888],o[7]=[3630,8065,192,2376],o[8]=[3780,1473,2496,4104],o[9]=[6120,2145,4680,2568],o[10]=[4440,3009,3240,1176],o[11]=[5280,1825,3936,2976],o[12]=[4770,2081,3624,1008],o[13]=[4080,3201,2160,2544],o[14]=[4590,5761,3432,624],o[15]=[4350,2209,3360,2688],o[16]=[5610,5249,3168,528],o[17]=[5070,1729,3792,2952],o[18]=[6870,5953,96,3408],o[19]=[4020,5697,1056,1224],a[1]=[2760,736,2856,4416],a[2]=[3840,1280,2712,4224],a[3]=[5700,7201,5016,2400],a[4]=[2220,4160,1632,1944],l[1]=[1830,129,3096,5664],l[2]=[5100,2177,3840,2904],l[3]=[4890,3425,3648,2136],l[4]=[1320,3681,1896,4080],l[5]=[1260,3841,1824,1200],l[6]=[1020,3969,1608,312],l[7]=[4800,4065,3600,72],l[8]=[4710,4865,3504,480],l[9]=[6720,5984,5112,3792],l[10]=[4500,7233,3288,1800],l[11]=[720,7522,384,3936],l[12]=[690,7745,336,1104],l[13]=[600,8225,120,1272],l[14]=[660,5569,840,576],n[1]=[3690,1505,2592,3240],n[2]=[3600,3233,2112,48],r[1]=[2970,6369,3408,4008],r[2]=[3600,3233,2112,48],s[1]=[6630,993,2784,4344];var i=e("select.flag-en-type").val(),c=e("select.flag-es-type").val(),g=e("select.flag-fr-type").val(),f=e("select.flag-ar-type").val(),p=e("select.flag-tw-type").val(),d=e("select.flag-zh-type").val(),u=e("select.flag-pt-type").val(),w=i<=0?"":".weglot-flags.en > a:before, .weglot-flags.en > span:before { background-position: -"+t[i][0]+"px 0 !important; } .weglot-flags.flag-1.en > a:before, .weglot-flags.flag-1.en > span:before { background-position: -"+t[i][1]+"px 0 !important; } .weglot-flags.flag-2.en > a:before, .weglot-flags.flag-2.en > span:before { background-position: -"+t[i][2]+"px 0 !important; } .weglot-flags.flag-3.en > a:before, .weglot-flags.flag-3.en > span:before { background-position: -"+t[i][3]+"px 0 !important; } ",b=c<=0?"":".weglot-flags.es > a:before, .weglot-flags.es > span:before { background-position: -"+o[c][0]+"px 0 !important; } .weglot-flags.flag-1.es > a:before, .weglot-flags.flag-1.es > span:before { background-position: -"+o[c][1]+"px 0 !important; } .weglot-flags.flag-2.es > a:before, .weglot-flags.flag-2.es > span:before { background-position: -"+o[c][2]+"px 0 !important; } .weglot-flags.flag-3.es > a:before, .weglot-flags.flag-3.es > span:before { background-position: -"+o[c][3]+"px 0 !important; } ",y=g<=0?"":".weglot-flags.fr > a:before, .weglot-flags.fr > span:before { background-position: -"+a[g][0]+"px 0 !important; } .weglot-flags.flag-1.fr > a:before, .weglot-flags.flag-1.fr > span:before { background-position: -"+a[g][1]+"px 0 !important; } .weglot-flags.flag-2.fr > a:before, .weglot-flags.flag-2.fr > span:before { background-position: -"+a[g][2]+"px 0 !important; } .weglot-flags.flag-3.fr > a:before, .weglot-flags.flag-3.fr > span:before { background-position: -"+a[g][3]+"px 0 !important; } ",m=f<=0?"":".weglot-flags.ar > a:before, .weglot-flags.ar > span:before { background-position: -"+l[f][0]+"px 0 !important; } .weglot-flags.flag-1.ar > a:before, .weglot-flags.flag-1.ar > span:before { background-position: -"+l[f][1]+"px 0 !important; } .weglot-flags.flag-2.ar > a:before, .weglot-flags.flag-2.ar > span:before { background-position: -"+l[f][2]+"px 0 !important; } .weglot-flags.flag-3.ar > a:before, .weglot-flags.flag-3.ar > span:before { background-position: -"+l[f][3]+"px 0 !important; } ",v=p<=0?"":".weglot-flags.tw > a:before, .weglot-flags.tw > span:before { background-position: -"+n[p][0]+"px 0 !important; } .weglot-flags.flag-1.tw > a:before, .weglot-flags.flag-1.tw > span:before { background-position: -"+n[p][1]+"px 0 !important; } .weglot-flags.flag-2.tw > a:before, .weglot-flags.flag-2.tw > span:before { background-position: -"+n[p][2]+"px 0 !important; } .weglot-flags.flag-3.tw > a:before, .weglot-flags.flag-3.tw > span:before { background-position: -"+n[p][3]+"px 0 !important; } ",h=d<=0?"":".weglot-flags.zh > a:before, .weglot-flags.zh > span:before { background-position: -"+r[d][0]+"px 0 !important; } .weglot-flags.flag-1.zh > a:before, .weglot-flags.flag-1.zh > span:before { background-position: -"+r[d][1]+"px 0 !important; } .weglot-flags.flag-2.zh > a:before, .weglot-flags.flag-2.zh > span:before { background-position: -"+r[d][2]+"px 0 !important; } .weglot-flags.flag-3.zh > a:before, .weglot-flags.flag-3.zh > span:before { background-position: -"+r[d][3]+"px 0 !important; } ",_=u<=0?"":".weglot-flags.pt > a:before, .weglot-flags.pt > span:before { background-position: -"+s[u][0]+"px 0 !important; } .weglot-flags.flag-1.pt > a:before, .weglot-flags.flag-1.pt > span:before { background-position: -"+s[u][1]+"px 0 !important; } .weglot-flags.flag-2.pt > a:before, .weglot-flags.flag-2.pt > span:before { background-position: -"+s[u][2]+"px 0 !important; } .weglot-flags.flag-3.pt > a:before, .weglot-flags.flag-3.pt > span:before { background-position: -"+s[u][3]+"px 0 !important; } ";e("#flag_css, #weglot-css-flag-css").text(w+b+y+m+v+h+_)}()}));var t=e("#flag_css").text();t.trim()&&e("#weglot-css-flag-css").text(t)};document.addEventListener("DOMContentLoaded",()=>{t()})};var g=function(){jQuery;document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#private_mode");e&&0!=e.length&&(document.querySelector("#private_mode").addEventListener("change",(function(e){document.querySelectorAll(".private-mode-lang--input").forEach(t=>{t.checked=e.target.checked})})),document.querySelectorAll(".private-mode-lang--input").forEach(e=>{e.addEventListener("change",(function(e){0===document.querySelectorAll(".private-mode-lang--input:checked").length&&(document.querySelector("#private_mode").checked=!1)}))}))})};o(1),o(2);a(),n(),l(),r(),s(),i(),c(),g()}]);
dist/css/admin-css.css CHANGED
@@ -322,4 +322,4 @@
322
  opacity: 0.5;
323
  background-color: #fafafa;
324
  }
325
- #weglot-url-translate .CodeMirror-placeholder,#wrap-weglot .CodeMirror-placeholder{color:#c0c0c0}#weglot-url-translate .CodeMirror-wrap,#wrap-weglot .CodeMirror-wrap{border-radius:4px;border:1px solid #c0c0c0;width:100%;max-width:550px;height:200px}#weglot-url-translate .weglot__choice__language,#wrap-weglot .weglot__choice__language{border-bottom:1px solid #eee;margin:5px 0}#weglot-url-translate .weglot__choice__language--local,#wrap-weglot .weglot__choice__language--local{border-width:50px;color:#a6a6a6;display:block}#weglot-url-translate p.weglot-keyres,#wrap-weglot p.weglot-keyres{font-style:italic;color:#ff6464}#weglot-url-translate .weglot_text_error,#wrap-weglot .weglot_text_error{color:#dc3232}#weglot-url-translate .weglot_reset,#wrap-weglot .weglot_reset{text-decoration:underline;font-style:italic}#weglot-url-translate .weglot_reset:hover,#wrap-weglot .weglot_reset:hover{cursor:pointer}#weglot-url-translate .btn,#wrap-weglot .btn{background:#335ee2;display:inline-block;padding:8px 10px;border-radius:4px;-webkit-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;-o-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;outline:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-weight:700;cursor:pointer;text-align:center;text-decoration:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;color:white;border:1px solid #335ee2}#weglot-url-translate .btn.btn-soft,#wrap-weglot .btn.btn-soft{background-color:#fff;color:#24284c;border-radius:4px;border:1px solid #7e8993;line-height:1.4em}#weglot-url-translate .btn.btn-primary:active,#weglot-url-translate .btn.btn-primary:focus,#weglot-url-translate .btn.btn-primary:hover,#wrap-weglot .btn.btn-primary:active,#wrap-weglot .btn.btn-primary:focus,#wrap-weglot .btn.btn-primary:hover{border-color:#446dea;background-color:#446dea}#weglot-url-translate .js-btn-remove,#wrap-weglot .js-btn-remove{border:none;background-color:#e35b5b;color:#fff;display:inline-block;width:22px;height:22px;border-radius:50%;cursor:pointer;-webkit-transform:translateY(-5%);-ms-transform:translateY(-5%);transform:translateY(-5%);-webkit-transition:opacity 175ms linear;-o-transition:opacity 175ms linear;transition:opacity 175ms linear;outline:0;padding:0;margin:4px 0;vertical-align:middle}#weglot-url-translate .js-btn-remove:hover,#wrap-weglot .js-btn-remove:hover{background-color:#c62d2d}#weglot-url-translate .item-exclude,#wrap-weglot .item-exclude{position:relative;margin-bottom:10px}#weglot-url-translate::-webkit-input-placeholder,#weglot-url-translate:-moz-placeholder,#weglot-url-translate::-moz-placeholder,#weglot-url-translate:-ms-input-placeholder,#wrap-weglot::-webkit-input-placeholder,#wrap-weglot:-moz-placeholder,#wrap-weglot::-moz-placeholder,#wrap-weglot:-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .sub-label,#wrap-weglot .sub-label{font-size:13px;font-weight:normal;margin:2px 0 0;color:#444;opacity:0.8}#weglot-url-translate .weglot-select-original,#wrap-weglot .weglot-select-original{height:36px !important;margin:0}#weglot-url-translate .original-select,#weglot-url-translate #type_flags,#wrap-weglot .original-select,#wrap-weglot #type_flags{padding:8px;height:36px !important;width:300px}#weglot-url-translate #type_flags,#wrap-weglot #type_flags{width:150px}#weglot-url-translate .selectize-control.multi .selectize-input,#wrap-weglot .selectize-control.multi .selectize-input{border:1px solid #7e8993;border-radius:4px;-webkit-box-shadow:unset;box-shadow:unset}#weglot-url-translate .selectize-control.multi .selectize-input>div,#wrap-weglot .selectize-control.multi .selectize-input>div{background-color:#eff0ff;border:1px solid #7e8993;border-radius:2px}#weglot-url-translate .selectize-control.multi .selectize-input>div .remove,#wrap-weglot .selectize-control.multi .selectize-input>div .remove{border-left-color:#7e8993}#weglot-url-translate .wg-input-textarea,#wrap-weglot .wg-input-textarea{padding:8px}#weglot-url-translate .wg-input-textarea::-webkit-input-placeholder,#wrap-weglot .wg-input-textarea::-webkit-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-moz-placeholder,#wrap-weglot .wg-input-textarea::-moz-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-ms-input-placeholder,#wrap-weglot .wg-input-textarea::-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::placeholder,#wrap-weglot .wg-input-textarea::placeholder{color:#c0c0c0}#weglot-url-translate .weglot-select.weglot-select-original,#weglot-url-translate input[type="text"],#weglot-url-translate textarea,#weglot-url-translate select,#weglot-url-translate #type_flags,#wrap-weglot .weglot-select.weglot-select-original,#wrap-weglot input[type="text"],#wrap-weglot textarea,#wrap-weglot select,#wrap-weglot #type_flags{padding:0 8px;border-radius:4px;border:1px solid #7e8993}#weglot-url-translate .weglot-select.weglot-select-original:focus,#weglot-url-translate input[type="text"]:focus,#weglot-url-translate textarea:focus,#weglot-url-translate select:focus,#weglot-url-translate #type_flags:focus,#wrap-weglot .weglot-select.weglot-select-original:focus,#wrap-weglot input[type="text"]:focus,#wrap-weglot textarea:focus,#wrap-weglot select:focus,#wrap-weglot #type_flags:focus{border-color:#446dea !important;-webkit-box-shadow:none !important;box-shadow:none !important}#weglot-url-translate .weglot-info,#wrap-weglot .weglot-info{position:relative;color:#3741cc;font-weight:bold}#weglot-url-translate .weglot-info:hover .wg-tooltip,#wrap-weglot .weglot-info:hover .wg-tooltip{line-height:1.4;position:absolute;top:27px;display:block !important;background-color:#24292d;width:160px;padding:10px;color:white;font-weight:normal;border:1px solid #e0e0e0;font-size:12px}#weglot-url-translate .weglot-box-overlay,#wrap-weglot .weglot-box-overlay{position:fixed;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%;background-color:rgba(0,0,0,0.85);z-index:9999;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}#weglot-url-translate .weglot-box-overlay .weglot-box,#wrap-weglot .weglot-box-overlay .weglot-box{background-color:#fff;padding:25px;text-align:center;-webkit-box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75);box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75)}#weglot-url-translate .weglot-box-overlay .weglot-box--title,#wrap-weglot .weglot-box-overlay .weglot-box--title{font-size:24px;line-height:1.3}#weglot-url-translate .weglot-box-overlay .weglot-box--text,#wrap-weglot .weglot-box-overlay .weglot-box--text{font-size:18px}#weglot-url-translate .weglot-box-overlay .weglot-box--subtext,#wrap-weglot .weglot-box-overlay .weglot-box--subtext{font-size:12px;font-style:italic}#weglot-url-translate .weglot-box-overlay .weglot-btn-close,#wrap-weglot .weglot-box-overlay .weglot-btn-close{float:right;cursor:pointer}#weglot-url-translate .flag-style-openclose,#wrap-weglot .flag-style-openclose{display:inline-block;font-size:12px;text-decoration:underline;cursor:default;margin:12px 15px 0 10px;color:#46b450}#weglot-url-translate .flag-style-openclose:hover,#wrap-weglot .flag-style-openclose:hover{color:#399648;cursor:pointer}#weglot-url-translate .flag-style-wrapper,#wrap-weglot .flag-style-wrapper{padding:15px 0px}#weglot-url-translate .flag-style-wrapper p,#wrap-weglot .flag-style-wrapper p{font-size:12px !important}#weglot-url-translate .flag-style-wrapper select,#wrap-weglot .flag-style-wrapper select{font-size:12px;margin:0 2px 6px 0;padding:0 26px 0 8px}#weglot-url-translate #private_mode+p+div,#wrap-weglot #private_mode+p+div{display:none}#weglot-url-translate #private_mode:checked+p+div,#wrap-weglot #private_mode:checked+p+div{display:block}#weglot-url-translate #private-mode-detail,#wrap-weglot #private-mode-detail{margin-top:20px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang,#wrap-weglot #private-mode-detail .private-mode-detail-lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:10px;margin-left:25px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang input[type="checkbox"],#wrap-weglot #private-mode-detail .private-mode-detail-lang input[type="checkbox"]{margin-top:-1px}#wrap-weglot{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:15px}#wrap-weglot .wrap{-webkit-box-flex:4;-ms-flex:4;flex:4}#wrap-weglot input[type="text"]:not(#destination_language-selectized),#wrap-weglot input[type="url"]{padding:0 8px;height:36px}#wrap-weglot select{height:36px;vertical-align:top;border-radius:4px;padding:0 26px 0 8px}#wrap-weglot input[type="checkbox"]{margin-top:-4px}#wrap-weglot .weglot-ckeckkey:before{content:"\21BB";display:inline-block;color:#666;padding:0 6px 0 0;font-size:16px;padding:0 10px;line-height:1em;-webkit-animation:spin 2s infinite linear}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}#wrap-weglot .weglot-nokkey:before{content:"\274C";display:inline-block;color:#dc3232;padding:0 6px 0 0;font-size:15px;padding:0 10px}#wrap-weglot .weglot-okkey:before{content:"\2713";display:inline-block;color:#46b450;padding:0 10px;font-size:20px;font-weight:bold;padding:0 10px}#wrap-weglot .weglot-infobox{-webkit-box-flex:2;-ms-flex:2;flex:2;-ms-flex-item-align:start;align-self:start;margin:10px 20px 0 2px;background-color:white;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden}#wrap-weglot .weglot-infobox h3{color:#18164c;background-color:white;padding:30px 30px 0 30px;margin:0px;font-size:23px;line-height:1.3}#wrap-weglot .weglot-infobox div{padding:15px 30px 30px 30px}#wrap-weglot .weglot-infobox .weglot-editbtn{-webkit-box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);background-color:#3d46fb;color:#fff;height:45px;border-radius:23px;line-height:45px;font-size:14px !important;text-decoration:none;padding:0 30px;display:inline-block;-webkit-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;transition:all 0.2s ease-in}#wrap-weglot .weglot-infobox .weglot-editbtn:hover{color:white;background:#252ed7}#wrap-weglot input[type="text"],#wrap-weglot .selectize-control,#wrap-weglot .wg-input-textarea,#wrap-weglot .weglot-select-original{width:100%;max-width:320px}#wrap-weglot #submit{height:50px;padding:0 30px !important;font-size:16px}#wrap-weglot .description{display:inline}#wrap-weglot .wg-tooltip{position:absolute;display:none}#wrap-weglot #mainform{margin-bottom:50px}#wrap-weglot .arrow-up{width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #24292d;position:absolute;top:-10px;left:36px}#wrap-weglot .question-icon{font-size:17px}#wrap-weglot .form-table{margin-bottom:50px}#wrap-weglot .country-selector{z-index:1 !important}#weglot-url-translate .weglot_custom_url{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:10px}#weglot-url-translate .weglot_custom_url a{margin:5px 0px;display:inline-block}#weglot-url-translate .weglot_custom_url--text_link{margin-bottom:4px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link input[type="text"]{min-height:24px !important;height:24px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button{margin-top:-2px;font-size:11px;padding:0 8px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button.button-weglot-lang .dashicons{font-size:14px;line-height:21px;margin-right:-3px;margin-left:-4px}#weglot-url-translate .weglot_custom_url a.weglot_reset{text-decoration:none}#weglot-url-translate .weglot_custom_url a.weglot_reset:link,#weglot-url-translate .weglot_custom_url a.weglot_reset:visited,#weglot-url-translate .weglot_custom_url a.weglot_reset:hover,#weglot-url-translate .weglot_custom_url a.weglot_reset:active{text-decoration:none}
322
  opacity: 0.5;
323
  background-color: #fafafa;
324
  }
325
+ #custom_flag_tips{font-size:12px}#weglot-url-translate .CodeMirror-placeholder,#wrap-weglot .CodeMirror-placeholder{color:#c0c0c0}#weglot-url-translate .CodeMirror-wrap,#wrap-weglot .CodeMirror-wrap{border-radius:4px;border:1px solid #c0c0c0;width:100%;max-width:550px;height:200px}#weglot-url-translate .weglot__choice__language,#wrap-weglot .weglot__choice__language{border-bottom:1px solid #eee;margin:5px 0}#weglot-url-translate .weglot__choice__language--local,#wrap-weglot .weglot__choice__language--local{border-width:50px;color:#a6a6a6;display:block}#weglot-url-translate p.weglot-keyres,#wrap-weglot p.weglot-keyres{font-style:italic;color:#ff6464}#weglot-url-translate .weglot_text_error,#wrap-weglot .weglot_text_error{color:#dc3232}#weglot-url-translate .weglot_reset,#wrap-weglot .weglot_reset{text-decoration:underline;font-style:italic}#weglot-url-translate .weglot_reset:hover,#wrap-weglot .weglot_reset:hover{cursor:pointer}#weglot-url-translate .btn,#wrap-weglot .btn{background:#335ee2;display:inline-block;padding:8px 10px;border-radius:4px;-webkit-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;-o-transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;transition:0.2s background linear, 0.2s color linear, 0.2s border linear, 0.2s text-shadow linear;outline:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-weight:700;cursor:pointer;text-align:center;text-decoration:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;color:white;border:1px solid #335ee2}#weglot-url-translate .btn.btn-soft,#wrap-weglot .btn.btn-soft{background-color:#fff;color:#24284c;border-radius:4px;border:1px solid #7e8993;line-height:1.4em}#weglot-url-translate .btn.btn-primary:active,#weglot-url-translate .btn.btn-primary:focus,#weglot-url-translate .btn.btn-primary:hover,#wrap-weglot .btn.btn-primary:active,#wrap-weglot .btn.btn-primary:focus,#wrap-weglot .btn.btn-primary:hover{border-color:#446dea;background-color:#446dea}#weglot-url-translate .js-btn-remove,#wrap-weglot .js-btn-remove{border:none;background-color:#e35b5b;color:#fff;display:inline-block;width:22px;height:22px;border-radius:50%;cursor:pointer;-webkit-transform:translateY(-5%);-ms-transform:translateY(-5%);transform:translateY(-5%);-webkit-transition:opacity 175ms linear;-o-transition:opacity 175ms linear;transition:opacity 175ms linear;outline:0;padding:0;margin:4px 0;vertical-align:middle}#weglot-url-translate .js-btn-remove:hover,#wrap-weglot .js-btn-remove:hover{background-color:#c62d2d}#weglot-url-translate .item-exclude,#wrap-weglot .item-exclude{position:relative;margin-bottom:10px}#weglot-url-translate::-webkit-input-placeholder,#weglot-url-translate:-moz-placeholder,#weglot-url-translate::-moz-placeholder,#weglot-url-translate:-ms-input-placeholder,#wrap-weglot::-webkit-input-placeholder,#wrap-weglot:-moz-placeholder,#wrap-weglot::-moz-placeholder,#wrap-weglot:-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .sub-label,#wrap-weglot .sub-label{font-size:13px;font-weight:normal;margin:2px 0 0;color:#444;opacity:0.8}#weglot-url-translate .weglot-select-original,#wrap-weglot .weglot-select-original{height:36px !important;margin:0}#weglot-url-translate .original-select,#weglot-url-translate #type_flags,#wrap-weglot .original-select,#wrap-weglot #type_flags{padding:8px;height:36px !important;width:300px}#weglot-url-translate #type_flags,#wrap-weglot #type_flags{width:150px}#weglot-url-translate .selectize-control.multi .selectize-input,#wrap-weglot .selectize-control.multi .selectize-input{border:1px solid #7e8993;border-radius:4px;-webkit-box-shadow:unset;box-shadow:unset}#weglot-url-translate .selectize-control.multi .selectize-input>div,#wrap-weglot .selectize-control.multi .selectize-input>div{background-color:#eff0ff;border:1px solid #7e8993;border-radius:2px}#weglot-url-translate .selectize-control.multi .selectize-input>div .remove,#wrap-weglot .selectize-control.multi .selectize-input>div .remove{border-left-color:#7e8993}#weglot-url-translate .wg-input-textarea,#wrap-weglot .wg-input-textarea{padding:8px}#weglot-url-translate .wg-input-textarea::-webkit-input-placeholder,#wrap-weglot .wg-input-textarea::-webkit-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-moz-placeholder,#wrap-weglot .wg-input-textarea::-moz-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::-ms-input-placeholder,#wrap-weglot .wg-input-textarea::-ms-input-placeholder{color:#c0c0c0}#weglot-url-translate .wg-input-textarea::placeholder,#wrap-weglot .wg-input-textarea::placeholder{color:#c0c0c0}#weglot-url-translate .weglot-select.weglot-select-original,#weglot-url-translate input[type="text"],#weglot-url-translate textarea,#weglot-url-translate select,#weglot-url-translate #type_flags,#wrap-weglot .weglot-select.weglot-select-original,#wrap-weglot input[type="text"],#wrap-weglot textarea,#wrap-weglot select,#wrap-weglot #type_flags{padding:0 8px;border-radius:4px;border:1px solid #7e8993}#weglot-url-translate .weglot-select.weglot-select-original:focus,#weglot-url-translate input[type="text"]:focus,#weglot-url-translate textarea:focus,#weglot-url-translate select:focus,#weglot-url-translate #type_flags:focus,#wrap-weglot .weglot-select.weglot-select-original:focus,#wrap-weglot input[type="text"]:focus,#wrap-weglot textarea:focus,#wrap-weglot select:focus,#wrap-weglot #type_flags:focus{border-color:#446dea !important;-webkit-box-shadow:none !important;box-shadow:none !important}#weglot-url-translate .weglot-info,#wrap-weglot .weglot-info{position:relative;color:#3741cc;font-weight:bold}#weglot-url-translate .weglot-info:hover .wg-tooltip,#wrap-weglot .weglot-info:hover .wg-tooltip{line-height:1.4;position:absolute;top:27px;display:block !important;background-color:#24292d;width:160px;padding:10px;color:white;font-weight:normal;border:1px solid #e0e0e0;font-size:12px}#weglot-url-translate .weglot-box-overlay,#wrap-weglot .weglot-box-overlay{position:fixed;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%;background-color:rgba(0,0,0,0.85);z-index:9999;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}#weglot-url-translate .weglot-box-overlay .weglot-box,#wrap-weglot .weglot-box-overlay .weglot-box{background-color:#fff;padding:25px;text-align:center;-webkit-box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75);box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75)}#weglot-url-translate .weglot-box-overlay .weglot-box--title,#wrap-weglot .weglot-box-overlay .weglot-box--title{font-size:24px;line-height:1.3}#weglot-url-translate .weglot-box-overlay .weglot-box--text,#wrap-weglot .weglot-box-overlay .weglot-box--text{font-size:18px}#weglot-url-translate .weglot-box-overlay .weglot-box--subtext,#wrap-weglot .weglot-box-overlay .weglot-box--subtext{font-size:12px;font-style:italic}#weglot-url-translate .weglot-box-overlay .weglot-btn-close,#wrap-weglot .weglot-box-overlay .weglot-btn-close{float:right;cursor:pointer}#weglot-url-translate .flag-style-openclose,#wrap-weglot .flag-style-openclose{display:inline-block;font-size:12px;text-decoration:underline;cursor:default;margin:12px 15px 0 10px;color:#46b450}#weglot-url-translate .flag-style-openclose:hover,#wrap-weglot .flag-style-openclose:hover{color:#399648;cursor:pointer}#weglot-url-translate .flag-style-wrapper,#wrap-weglot .flag-style-wrapper{padding:15px 0px}#weglot-url-translate .flag-style-wrapper p,#wrap-weglot .flag-style-wrapper p{font-size:12px !important}#weglot-url-translate .flag-style-wrapper select,#wrap-weglot .flag-style-wrapper select{font-size:12px;margin:0 2px 6px 0;padding:0 26px 0 8px}#weglot-url-translate #private_mode+p+div,#wrap-weglot #private_mode+p+div{display:none}#weglot-url-translate #private_mode:checked+p+div,#wrap-weglot #private_mode:checked+p+div{display:block}#weglot-url-translate #private-mode-detail,#wrap-weglot #private-mode-detail{margin-top:20px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang,#wrap-weglot #private-mode-detail .private-mode-detail-lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:10px;margin-left:25px}#weglot-url-translate #private-mode-detail .private-mode-detail-lang input[type="checkbox"],#wrap-weglot #private-mode-detail .private-mode-detail-lang input[type="checkbox"]{margin-top:-1px}#wrap-weglot{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:15px}#wrap-weglot .wrap{-webkit-box-flex:4;-ms-flex:4;flex:4}#wrap-weglot input[type="text"]:not(#destination_language-selectized),#wrap-weglot input[type="url"]{padding:0 8px;height:36px}#wrap-weglot select{height:36px;vertical-align:top;border-radius:4px;padding:0 26px 0 8px}#wrap-weglot input[type="checkbox"]{margin-top:-4px}#wrap-weglot .weglot-ckeckkey:before{content:"\21BB";display:inline-block;color:#666;padding:0 6px 0 0;font-size:16px;padding:0 10px;line-height:1em;-webkit-animation:spin 2s infinite linear}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}#wrap-weglot .weglot-nokkey:before{content:"\274C";display:inline-block;color:#dc3232;padding:0 6px 0 0;font-size:15px;padding:0 10px}#wrap-weglot .weglot-okkey:before{content:"\2713";display:inline-block;color:#46b450;padding:0 10px;font-size:20px;font-weight:bold;padding:0 10px}#wrap-weglot .weglot-infobox{-webkit-box-flex:2;-ms-flex:2;flex:2;-ms-flex-item-align:start;align-self:start;margin:10px 20px 0 2px;background-color:white;border:1px solid #e0e0e0;border-radius:12px;overflow:hidden}#wrap-weglot .weglot-infobox h3{color:#18164c;background-color:white;padding:30px 30px 0 30px;margin:0px;font-size:23px;line-height:1.3}#wrap-weglot .weglot-infobox div{padding:15px 30px 30px 30px}#wrap-weglot .weglot-infobox .weglot-editbtn{-webkit-box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);box-shadow:0 2px 4px 0 rgba(1,1,2,0.05);background-color:#3d46fb;color:#fff;height:45px;border-radius:23px;line-height:45px;font-size:14px !important;text-decoration:none;padding:0 30px;display:inline-block;-webkit-transition:all 0.2s ease-in;-o-transition:all 0.2s ease-in;transition:all 0.2s ease-in}#wrap-weglot .weglot-infobox .weglot-editbtn:hover{color:white;background:#252ed7}#wrap-weglot input[type="text"],#wrap-weglot .selectize-control,#wrap-weglot .wg-input-textarea,#wrap-weglot .weglot-select-original{width:100%;max-width:320px}#wrap-weglot #submit{height:50px;padding:0 30px !important;font-size:16px}#wrap-weglot .description{display:inline}#wrap-weglot .wg-tooltip{position:absolute;display:none}#wrap-weglot #mainform{margin-bottom:50px}#wrap-weglot .arrow-up{width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #24292d;position:absolute;top:-10px;left:36px}#wrap-weglot .question-icon{font-size:17px}#wrap-weglot .form-table{margin-bottom:50px}#wrap-weglot .country-selector{z-index:1 !important}#weglot-url-translate .weglot_custom_url{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:10px}#weglot-url-translate .weglot_custom_url a{margin:5px 0px;display:inline-block}#weglot-url-translate .weglot_custom_url--text_link{margin-bottom:4px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link input[type="text"]{min-height:24px !important;height:24px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button{margin-top:-2px;font-size:11px;padding:0 8px}#weglot-url-translate .weglot_custom_url .weglot_custom_url--text_link button.button-weglot-lang .dashicons{font-size:14px;line-height:21px;margin-right:-3px;margin-left:-4px}#weglot-url-translate .weglot_custom_url a.weglot_reset{text-decoration:none}#weglot-url-translate .weglot_custom_url a.weglot_reset:link,#weglot-url-translate .weglot_custom_url a.weglot_reset:visited,#weglot-url-translate .weglot_custom_url a.weglot_reset:hover,#weglot-url-translate .weglot_custom_url a.weglot_reset:active{text-decoration:none}
readme.txt CHANGED
@@ -1,18 +1,18 @@
1
- === WordPress Translation Plugin – Weglot Translate ===
2
  Contributors: remyb92, gmulti, wysija, wpr0ck, glx77
3
- Tags: translate, multilingual, language, translation, localization
4
  Requires at least: 4.5
5
- Tested up to: 5.7
6
  Requires PHP: 5.6
7
- Stable tag: 3.3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Translate your WordPress website in 100+ languages within minutes with Weglot Translate, without any coding.
12
 
13
  == Description ==
14
 
15
- Weglot Translate is the leading WordPress translation plugin, trusted by 50,000+ users worldwide. Translate your WordPress website into 100+ languages within minutes, no coding required.
16
 
17
  Increase visibility and boost conversions with ease by adding multilingual functionality. Weglot Translate is fully optimized for SEO, with every translated page automatically indexed by Google. Say hello in multiple languages to millions of new visitors.
18
 
@@ -26,13 +26,13 @@ Make your website multilingual in minutes with a free trial. Visit [https://wegl
26
 
27
  ### Why Weglot Translate
28
 
29
- **It’s easy to install:** Weglot Translate is easily installable and quick to set up. Reach out to millions of new visitors worldwide with a few clicks, without any coding.
30
 
31
  **It’s built for maximum compatibility:** Weglot Translate is fully compatible with all platforms, WordPress themes, and plugins. From WooCommerce product descriptions to Elementor order forms, everything is translated into the languages of your choice. So you can focus on your content, not the technical details.
32
 
33
  **It’s optimized for SEO:** Weglot Translate follows Google’s best practices for multilingual website translation, serving all translated web pages with clean source code. Google will automatically index every translated page with dedicated URLs.
34
 
35
- **It’s easy to set and forget:** Weglot Translate automatically detects all your website content for easy translation. No more time-consuming manual duplication of every single line of content within your website. All translations are updated in real-time, so you don’t need to worry about maintenance.
36
 
37
  **It takes translation seriously:** Weglot Translate gives you an edge on your translation tasks with the first layer of automatic translation provided by the best machine learning providers on the market (DeepL, Google, Microsoft, and Yandex). You can also edit the translations and collaborate with your team to work on translations together, directly within Weglot.
38
 
@@ -46,9 +46,11 @@ Make your website multilingual in minutes with a free trial. Visit [https://wegl
46
 
47
  ### Multilingual functionality like no other
48
 
49
- **Increase visibility:** All translated pages are automatically indexed following Google’s best practices with dedicated URLs.
 
50
  **Reduce bounce rate:** Redirect visitors automatically to serve them in the language of their choice, based on their browser settings.
51
- **Enhance user experience:** From the landing page to the email confirmation, get all your key conversion steps in your customers' language. You can even add different images and videos for various languages. Useful for images with text, Weglot Translate makes it easy to display “translated” images in your translated versions. Media localization is an essential aspect of any multilingual project and Weglot Translate makes it simple to do so.
 
52
 
53
 
54
  “We really loved the localization features provided by Weglot, such as the ability to translate images and other types of media depending on the language the visitor is viewing the site in.”
@@ -67,7 +69,7 @@ Make your website multilingual in minutes with a free trial. Visit [https://wegl
67
  "Weglot removed the pain of having to manage multiple stores for multiple locales. The integration was easy, and the support is incredibly helpful. I highly recommend Weglot to anyone looking for a simple and cost-effective solution to translate their stores!"
68
  **Mike Robertson – Director of Sales Operations, Nikon**
69
 
70
- With an increase in site visitors and session duration, you can expect a massive boost to your conversions. See why thousands of e-commerce platforms, SaaS firms, marketplaces, corporate websites, and blogs worldwide love Weglot Translate. [Try it today for free](https://dashboard.weglot.com/register-wordpress)
71
 
72
 
73
  == Installation ==
@@ -78,7 +80,7 @@ With an increase in site visitors and session duration, you can expect a massive
78
  * Rewrite rules activated
79
 
80
 
81
- = Weglot translate instructions =
82
 
83
  Weglot Translate is easy to set up:
84
 
@@ -89,7 +91,7 @@ Weglot Translate is easy to set up:
89
  5. Now’s the fun part: personalize your translation button style (add or delete flag icons, make the language list a dropdown if you want, display each language’s full name or 2-letter language code...)
90
  6. Click “Save.”.
91
  7.(Optional) Go to Appearance -&gt; Widgets, then drag and drop the « Weglot Translate » widget where you want it to appear.
92
- Refresh your web page.Your website is now available in the selected translation languages. You can switch languages to see your live translated pages.
93
 
94
  When you’re ready, you can edit your translations directly in [your account](https://dashboard.weglot.com/translations/).
95
 
@@ -106,18 +108,18 @@ When you’re ready, you can edit your translations directly in [your account](h
106
 
107
  = Is Weglot compatible with SEO? =
108
 
109
- Weglot Translate creates a dedicated URL for each language to ensure the proper indexation of your translated content on search engines like Google. SEO tags are also translated and editable within your Weglot Translate account.
110
 
111
 
112
  = Is Weglot Translate compatible with WooCommerce? =
113
 
114
- Yes, you can use Weglot Translate to translate WooCommerce store sites without any compatibility issues. Even your checkout page is translated—and the translations are editable from your Weglot Translate dashboard.
115
 
116
 
117
  = Can I migrate from WPML or Polylang to Weglot Translate? =
118
 
119
- - Yes, you can easily migrate from Polylang or WPML to Weglot Translate. Simply deactivate your existing translation plugin, and you’ll immediately be able to start using Weglot Translate.
120
- - If you need to import any preexisting translations, feel free to contact us directly at support@weglot.com.
121
 
122
 
123
  = How do I set up Weglot Translate? =
@@ -133,7 +135,7 @@ Weglot Translate is easy to set up.
133
  6. Click “Save”.
134
  7. (Optional) Go to Appearance -> Widgets, then drag and drop the « Weglot Translate » widget where you want it to appear.
135
 
136
- Refresh your web page. Your website is now available in the selected translation languages. You can switch languages to see your live translated pages.
137
 
138
  When you’re ready, you can edit your translations directly in your Weglot dashboard.
139
 
@@ -158,26 +160,26 @@ Yes, you can translate your URL slugs with Weglot. This is useful if you’d lik
158
  You certainly can! Exclude pages, or parts of pages, from translation if you want to stick to the original content. You can also create custom translation rules to translate pages and posts precisely the way you want it.
159
 
160
 
161
- = Can I use Weglot Translate for more than one website translation? =
162
 
163
- Yes, Pro plans and above offer multisite support. This allows you to manage several languages and several websites separately and gives access to one person per website.
164
 
165
 
166
  = Does Weglot Translate provide support? =
167
 
168
- Yes, and our users love us for it; just check out our reviews! The Weglot Translate team offers support for all users, with priority accorded to premium members. Be sure to checkout our [Help center](https://support.weglot.com/). Post a topic on the [support forum](https://wordpress.org/support/plugin/weglot/), or email us at support@weglot.com if you have any questions.
169
 
170
 
171
  == Screenshots ==
172
 
173
- 1. Localize your website in minutes, no code needed
174
  2. Collaborate with your team or professional translators
175
  3. Manage all your translations inside one simple dashboard
176
- 4. Drive new visitors to your website with SEO optimized translated pages
177
  5. Redirect your visitors to their preferred language
178
  6. Save time in your translation management process
179
  7. Customize your language switcher to fit your website design
180
- 8. Join thousands of global brands trusting Weglot
181
 
182
 
183
  == Upgrade Notice ==
@@ -187,6 +189,14 @@ See changelog for upgrade changes.
187
 
188
  == Changelog ==
189
 
 
 
 
 
 
 
 
 
190
  = 3.3.5 (12/04/2021) =
191
  * Add url from canonical if existing
192
  * Add vip code review
1
+ === Translate WordPress – Weglot Translate ===
2
  Contributors: remyb92, gmulti, wysija, wpr0ck, glx77
3
+ Tags: translate, multilingual, language, translation, localization, multilingual SEO, languages, translator, website translation, multilanguage, international, traduction
4
  Requires at least: 4.5
5
+ Tested up to: 5.8
6
  Requires PHP: 5.6
7
+ Stable tag: 3.3.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Translate your WordPress website in 110+ languages within minutes with Weglot Translate, without any coding.
12
 
13
  == Description ==
14
 
15
+ Weglot Translate is the leading WordPress translation plugin, trusted by 60,000+ users worldwide. Translate your WordPress website into 110+ languages within minutes, no coding required.
16
 
17
  Increase visibility and boost conversions with ease by adding multilingual functionality. Weglot Translate is fully optimized for SEO, with every translated page automatically indexed by Google. Say hello in multiple languages to millions of new visitors.
18
 
26
 
27
  ### Why Weglot Translate
28
 
29
+ **It’s easy to install:** Weglot Translate is quick to set up to have a [multilingual WordPress website](https://weglot.com/best-practice-guide-for-wordpress-multilingual-websites/) ready, instantly. Reach out to millions of new visitors worldwide with a few clicks, without any coding.
30
 
31
  **It’s built for maximum compatibility:** Weglot Translate is fully compatible with all platforms, WordPress themes, and plugins. From WooCommerce product descriptions to Elementor order forms, everything is translated into the languages of your choice. So you can focus on your content, not the technical details.
32
 
33
  **It’s optimized for SEO:** Weglot Translate follows Google’s best practices for multilingual website translation, serving all translated web pages with clean source code. Google will automatically index every translated page with dedicated URLs.
34
 
35
+ **It’s easy to set and forget:** Weglot Translate automatically detects all your website content for easy translation. No more time-consuming manual duplication of every single line of content to get a multilingual website. All translations are updated in real-time, so you don’t need to worry about maintenance and any newly added content is automatically translated.
36
 
37
  **It takes translation seriously:** Weglot Translate gives you an edge on your translation tasks with the first layer of automatic translation provided by the best machine learning providers on the market (DeepL, Google, Microsoft, and Yandex). You can also edit the translations and collaborate with your team to work on translations together, directly within Weglot.
38
 
46
 
47
  ### Multilingual functionality like no other
48
 
49
+ **Increase visibility:** All translated pages are automatically indexed following Google’s best practices with dedicated URLs. Get new traffic with your multilingual website.
50
+
51
  **Reduce bounce rate:** Redirect visitors automatically to serve them in the language of their choice, based on their browser settings.
52
+
53
+ **Enhance user experience:** From the landing page to the email confirmation, get all your key conversion steps translated in your customers' language. You can even add different images and videos for various languages. Useful for images with text, Weglot Translate makes it easy to display “translated” images in your translated versions. Media localization is an essential aspect of any multilingual project and Weglot Translate makes it simple to do so.
54
 
55
 
56
  “We really loved the localization features provided by Weglot, such as the ability to translate images and other types of media depending on the language the visitor is viewing the site in.”
69
  "Weglot removed the pain of having to manage multiple stores for multiple locales. The integration was easy, and the support is incredibly helpful. I highly recommend Weglot to anyone looking for a simple and cost-effective solution to translate their stores!"
70
  **Mike Robertson – Director of Sales Operations, Nikon**
71
 
72
+ With an increase in site visitors and session duration thanks to your multilingual website, you can expect a massive boost to your conversions. See why thousands of e-commerce platforms, SaaS firms, marketplaces, corporate websites, and blogs worldwide love Weglot Translate. [Try it today for free](https://dashboard.weglot.com/register-wordpress)
73
 
74
 
75
  == Installation ==
80
  * Rewrite rules activated
81
 
82
 
83
+ = Weglot Translate instructions =
84
 
85
  Weglot Translate is easy to set up:
86
 
91
  5. Now’s the fun part: personalize your translation button style (add or delete flag icons, make the language list a dropdown if you want, display each language’s full name or 2-letter language code...)
92
  6. Click “Save.”.
93
  7.(Optional) Go to Appearance -&gt; Widgets, then drag and drop the « Weglot Translate » widget where you want it to appear.
94
+ Refresh your web page.Your website is now multilingual and available in the selected translation languages. You can switch languages to see your live translated pages.
95
 
96
  When you’re ready, you can edit your translations directly in [your account](https://dashboard.weglot.com/translations/).
97
 
108
 
109
  = Is Weglot compatible with SEO? =
110
 
111
+ Weglot Translate is 100% optimized for multilingual SEO. It creates a dedicated URL for each language to ensure the proper indexation of your translated content on search engines like Google. SEO tags are also translated and editable within your Weglot Translate account.
112
 
113
 
114
  = Is Weglot Translate compatible with WooCommerce? =
115
 
116
+ Yes, you can use Weglot Translate to create a multilingual WooCommerce store without any compatibility issues. Even your checkout page is translated—and the translations are editable from your Weglot Translate dashboard.
117
 
118
 
119
  = Can I migrate from WPML or Polylang to Weglot Translate? =
120
 
121
+ - Yes, you can easily migrate from Polylang or WPML to Weglot Translate. Simply deactivate your Polylang or WPML existing translation plugin, and you’ll immediately be able to start using Weglot Translate.
122
+ - If you need to import any preexisting translations from WPML, Polylang or any other multilingual plugin, feel free to contact us directly at support@weglot.com.
123
 
124
 
125
  = How do I set up Weglot Translate? =
135
  6. Click “Save”.
136
  7. (Optional) Go to Appearance -> Widgets, then drag and drop the « Weglot Translate » widget where you want it to appear.
137
 
138
+ Refresh your web page. Your website is now multilingual and available in the selected translation languages. You can switch languages to see your live translated pages.
139
 
140
  When you’re ready, you can edit your translations directly in your Weglot dashboard.
141
 
160
  You certainly can! Exclude pages, or parts of pages, from translation if you want to stick to the original content. You can also create custom translation rules to translate pages and posts precisely the way you want it.
161
 
162
 
163
+ = Can I use Weglot Translate on more than one website? =
164
 
165
+ Yes, Pro plans and above offer multisite support. This allows you to manage several languages and several multilingual websites separately and gives access to one person per website.
166
 
167
 
168
  = Does Weglot Translate provide support? =
169
 
170
+ Yes, and our users love us for it; just check out our reviews! The Weglot Translate team offers support for all users, with priority accorded to premium members. Be sure to check out our [Help center](https://support.weglot.com/). Post a topic on the [support forum](https://wordpress.org/support/plugin/weglot/), or email us at support@weglot.com if you have any questions.
171
 
172
 
173
  == Screenshots ==
174
 
175
+ 1. Translate your website in minutes, no code needed
176
  2. Collaborate with your team or professional translators
177
  3. Manage all your translations inside one simple dashboard
178
+ 4. Drive new visitors to your website with multilingual SEO optimized translated pages
179
  5. Redirect your visitors to their preferred language
180
  6. Save time in your translation management process
181
  7. Customize your language switcher to fit your website design
182
+ 8. Join thousands of global brands trusting Weglot to translate their website
183
 
184
 
185
  == Upgrade Notice ==
189
 
190
  == Changelog ==
191
 
192
+ = 3.3.6 (15/06/2021) =
193
+ * Add new flag from dashboard
194
+ * Improve hreflang display
195
+ * Dynamise limit languages check
196
+ * Fix bug when excluded URL /cart gives empty URL
197
+ * Fix small bug on multisite where we translated links from / website when located on /subsite
198
+ * Better handle 301 redirect
199
+
200
  = 3.3.5 (12/04/2021) =
201
  * Add url from canonical if existing
202
  * Add vip code review
src/actions/admin/class-admin-enqueue-weglot.php CHANGED
@@ -7,6 +7,8 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  }
8
 
9
  use Exception;
 
 
10
  use WeglotWP\Models\Hooks_Interface_Weglot;
11
  use WeglotWP\Helpers\Helper_Pages_Weglot;
12
  use WeglotWP\Services\Language_Service_Weglot;
@@ -44,10 +46,10 @@ class Admin_Enqueue_Weglot implements Hooks_Interface_Weglot {
44
  }
45
 
46
  /**
 
 
47
  * @see Hooks_Interface_Weglot
48
  *
49
- * @since 2.0
50
- * @return void
51
  */
52
  public function hooks() {
53
  add_action( 'admin_enqueue_scripts', array( $this, 'weglot_admin_enqueue_scripts' ) );
@@ -59,6 +61,7 @@ class Admin_Enqueue_Weglot implements Hooks_Interface_Weglot {
59
  * Register CSS and JS
60
  *
61
  * @param string $page
 
62
  * @return void
63
  * @throws Exception
64
  * @since 2.0
@@ -69,34 +72,25 @@ class Admin_Enqueue_Weglot implements Hooks_Interface_Weglot {
69
  return;
70
  }
71
 
72
- wp_enqueue_script( 'weglot-admin-selectize-js', WEGLOT_URL_DIST . '/selectize.js', array( 'jquery', 'jquery-ui-sortable' ) );
 
 
 
73
 
74
  wp_enqueue_script( 'weglot-admin', WEGLOT_URL_DIST . '/admin-js.js', array( 'weglot-admin-selectize-js' ), WEGLOT_VERSION );
75
 
76
  $user_info = $this->user_api_services->get_user_info();
77
- $plans = $this->user_api_services->get_plans();
78
- $limit = 1000;
79
- if (
80
- isset( $user_info['plan_id'] ) &&
81
- $user_info['plan_id'] <= 1 ||
82
- isset( $user_info['plan_id'] ) &&
83
- in_array( $user_info['plan_id'], $plans['starter_free']['ids'] ) // phpcs:ignore
84
- ) {
85
- $limit = $plans['starter_free']['limit_language'];
86
- } elseif (
87
- isset( $user_info['plan_id'] ) &&
88
- in_array( $user_info['plan_id'], $plans['business']['ids'] ) // phpcs:ignore
89
- ) {
90
- $limit = $plans['business']['limit_language'];
91
- }
92
 
 
 
 
93
  wp_localize_script(
94
  'weglot-admin',
95
  'weglot_languages',
96
  array(
97
  'available' => $this->language_services->get_all_languages(),
98
  'limit' => $limit,
99
- 'plans' => $this->user_api_services->get_plans(),
100
  'original' => $this->language_services->get_original_language()->getInternalCode(),
101
  )
102
  );
@@ -104,6 +98,14 @@ class Admin_Enqueue_Weglot implements Hooks_Interface_Weglot {
104
  wp_enqueue_style( 'weglot-admin-css', WEGLOT_URL_DIST . '/css/admin-css.css', array(), WEGLOT_VERSION );
105
 
106
  wp_enqueue_style( 'weglot-css', WEGLOT_URL_DIST . '/css/front-css.css', array(), WEGLOT_VERSION );
 
 
 
 
 
 
 
 
107
  wp_localize_script(
108
  'weglot-admin',
109
  'weglot_css',
@@ -132,7 +134,17 @@ class Admin_Enqueue_Weglot implements Hooks_Interface_Weglot {
132
  */
133
  public function weglot_admin_print_head() {
134
  ?>
135
- <style type="text/css"> #toplevel_page_weglot-settings .wp-menu-image.svg {background-size: 24px auto !important;} #wp-admin-bar-weglot > .ab-item {background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZyBmaWxsPSIjYTBhNWFhIj48cGF0aCBkPSJNMjEuNzM5IDkyLjU2NWw1MS44MjggMTI5LjczMiAyMy42Ni02MC4yNzkgMjQuMTQ0IDYwLjI3OUwxNzMuMiA5Mi41NjVoLTI4LjAwN2wtMjMuODIyIDU4Ljc1LTIzLjkwMi01OC43NS0yMy45MDIgNTguNzUtMjMuOTAyLTU4Ljc1SDIxLjczOXoiLz48cGF0aCBkPSJNMjEwLjAwNiA5Mi43MWMtMTcuODY2IDAtMzMuMTU3IDYuMzU4LTQ1Ljg3MyAxOS4wNzQtMTIuNzE1IDEyLjcxNi0xOC45OTMgMjguMDA2LTE4Ljk5MyA0NS43OTIgMCAxNy44NjcgNi4yNzggMzMuMTU4IDE4Ljk5MyA0NS44NzMgMTIuNzE2IDEyLjcxNiAyOC4wMDcgMTguOTkzIDQ1Ljg3MyAxOC45OTMgMTcuNzg2IDAgMzMuMDc3LTYuMjc3IDQ1Ljc5My0xOC45OTMgMTIuNzE1LTEyLjcxNSAxOS4wNzMtMjguMDA2IDE5LjA3My00NS44NzMgMC00LjUwNy0uNDgzLTguODUyLTEuMjg4LTEyLjk1N2gtNjMuNTc4djI1LjkxNGgzNi42OTljLTIuNzM3IDcuNTY1LTcuNDg1IDEzLjg0My0xNC4wODQgMTguNjcxLTYuNjggNC44My0xNC4yNDUgNy4yNDQtMjIuNjE1IDcuMjQ0LTEwLjc4NCAwLTE5Ljk1OC0zLjc4My0yNy41MjMtMTEuMzQ4LTcuNTY2LTcuNTY1LTExLjM0OC0xNi43NC0xMS4zNDgtMjcuNTI0IDAtMTAuNjIzIDMuNzgyLTE5Ljc5OCAxMS4zNDgtMjcuNDQzIDcuNTY1LTcuNjQ1IDE2Ljc0LTExLjUwOCAyNy41MjMtMTEuNTA4IDEwLjYyMyAwIDE5Ljc5OCAzLjg2MyAyNy41MjQgMTEuNDI4bDE4LjM1LTE4LjM1YTY3Ljk2MyA2Ny45NjMgMCAwMC0yMC43NjQtMTMuODQyYy03Ljg4Ny0zLjM4LTE2LjI1Ny01LjE1LTI1LjExLTUuMTV6Ii8+PC9nPjwvc3ZnPg==") !important;background-size: 22px auto !important;background-repeat: no-repeat !important;background-position: 4px 5px !important;padding-left: 30px !important;}</style>
 
 
 
 
 
 
 
 
 
 
136
  <?php
137
  }
138
  }
7
  }
8
 
9
  use Exception;
10
+ use WeglotWP\Helpers\Helper_API;
11
+ use WeglotWP\Helpers\Helper_Flag_Type;
12
  use WeglotWP\Models\Hooks_Interface_Weglot;
13
  use WeglotWP\Helpers\Helper_Pages_Weglot;
14
  use WeglotWP\Services\Language_Service_Weglot;
46
  }
47
 
48
  /**
49
+ * @return void
50
+ * @since 2.0
51
  * @see Hooks_Interface_Weglot
52
  *
 
 
53
  */
54
  public function hooks() {
55
  add_action( 'admin_enqueue_scripts', array( $this, 'weglot_admin_enqueue_scripts' ) );
61
  * Register CSS and JS
62
  *
63
  * @param string $page
64
+ *
65
  * @return void
66
  * @throws Exception
67
  * @since 2.0
72
  return;
73
  }
74
 
75
+ wp_enqueue_script( 'weglot-admin-selectize-js', WEGLOT_URL_DIST . '/selectize.js', array(
76
+ 'jquery',
77
+ 'jquery-ui-sortable'
78
+ ) );
79
 
80
  wp_enqueue_script( 'weglot-admin', WEGLOT_URL_DIST . '/admin-js.js', array( 'weglot-admin-selectize-js' ), WEGLOT_VERSION );
81
 
82
  $user_info = $this->user_api_services->get_user_info();
83
+ $limit = 10;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
+ if(isset($user_info['languages_limit'])){
86
+ $limit = $user_info['languages_limit'];
87
+ }
88
  wp_localize_script(
89
  'weglot-admin',
90
  'weglot_languages',
91
  array(
92
  'available' => $this->language_services->get_all_languages(),
93
  'limit' => $limit,
 
94
  'original' => $this->language_services->get_original_language()->getInternalCode(),
95
  )
96
  );
98
  wp_enqueue_style( 'weglot-admin-css', WEGLOT_URL_DIST . '/css/admin-css.css', array(), WEGLOT_VERSION );
99
 
100
  wp_enqueue_style( 'weglot-css', WEGLOT_URL_DIST . '/css/front-css.css', array(), WEGLOT_VERSION );
101
+
102
+ //display new flags
103
+ if ( empty( $this->option_services->get_option( 'flag_css' ) )
104
+ && strpos( $this->option_services->get_css_custom_inline(), 'background-position' ) == false
105
+ && strpos( $this->option_services->get_css_custom_inline(), 'background-image' ) == false ) {
106
+ Helper_Flag_Type::get_new_flags(true);
107
+ }
108
+
109
  wp_localize_script(
110
  'weglot-admin',
111
  'weglot_css',
134
  */
135
  public function weglot_admin_print_head() {
136
  ?>
137
+ <style type="text/css"> #toplevel_page_weglot-settings .wp-menu-image.svg {
138
+ background-size: 24px auto !important;
139
+ }
140
+
141
+ #wp-admin-bar-weglot > .ab-item {
142
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZyBmaWxsPSIjYTBhNWFhIj48cGF0aCBkPSJNMjEuNzM5IDkyLjU2NWw1MS44MjggMTI5LjczMiAyMy42Ni02MC4yNzkgMjQuMTQ0IDYwLjI3OUwxNzMuMiA5Mi41NjVoLTI4LjAwN2wtMjMuODIyIDU4Ljc1LTIzLjkwMi01OC43NS0yMy45MDIgNTguNzUtMjMuOTAyLTU4Ljc1SDIxLjczOXoiLz48cGF0aCBkPSJNMjEwLjAwNiA5Mi43MWMtMTcuODY2IDAtMzMuMTU3IDYuMzU4LTQ1Ljg3MyAxOS4wNzQtMTIuNzE1IDEyLjcxNi0xOC45OTMgMjguMDA2LTE4Ljk5MyA0NS43OTIgMCAxNy44NjcgNi4yNzggMzMuMTU4IDE4Ljk5MyA0NS44NzMgMTIuNzE2IDEyLjcxNiAyOC4wMDcgMTguOTkzIDQ1Ljg3MyAxOC45OTMgMTcuNzg2IDAgMzMuMDc3LTYuMjc3IDQ1Ljc5My0xOC45OTMgMTIuNzE1LTEyLjcxNSAxOS4wNzMtMjguMDA2IDE5LjA3My00NS44NzMgMC00LjUwNy0uNDgzLTguODUyLTEuMjg4LTEyLjk1N2gtNjMuNTc4djI1LjkxNGgzNi42OTljLTIuNzM3IDcuNTY1LTcuNDg1IDEzLjg0My0xNC4wODQgMTguNjcxLTYuNjggNC44My0xNC4yNDUgNy4yNDQtMjIuNjE1IDcuMjQ0LTEwLjc4NCAwLTE5Ljk1OC0zLjc4My0yNy41MjMtMTEuMzQ4LTcuNTY2LTcuNTY1LTExLjM0OC0xNi43NC0xMS4zNDgtMjcuNTI0IDAtMTAuNjIzIDMuNzgyLTE5Ljc5OCAxMS4zNDgtMjcuNDQzIDcuNTY1LTcuNjQ1IDE2Ljc0LTExLjUwOCAyNy41MjMtMTEuNTA4IDEwLjYyMyAwIDE5Ljc5OCAzLjg2MyAyNy41MjQgMTEuNDI4bDE4LjM1LTE4LjM1YTY3Ljk2MyA2Ny45NjMgMCAwMC0yMC43NjQtMTMuODQyYy03Ljg4Ny0zLjM4LTE2LjI1Ny01LjE1LTI1LjExLTUuMTV6Ii8+PC9nPjwvc3ZnPg==") !important;
143
+ background-size: 22px auto !important;
144
+ background-repeat: no-repeat !important;
145
+ background-position: 4px 5px !important;
146
+ padding-left: 30px !important;
147
+ }</style>
148
  <?php
149
  }
150
  }
src/actions/admin/class-customize-menu-weglot.php CHANGED
@@ -75,11 +75,9 @@ class Customize_Menu_Weglot implements Hooks_Interface_Weglot {
75
  $options_menu = array();
76
  }
77
 
78
- if ( array_key_exists( 'menu-item-weglot-dropdown', $_POST ) ) {
79
- $options_menu[ 'menu-item-' . $menu_item_db_id ]['dropdown'] = empty( $_POST[ 'menu-item-weglot-dropdown' ][ $menu_item_db_id ] ) ? 0 : 1; //phpcs:ignore
80
- } else {
81
- $options_menu[ 'menu-item-' . $menu_item_db_id ]['dropdown'] = 0;
82
- }
83
  if ( array_key_exists( 'menu-item-weglot-hide_current', $_POST ) ) {
84
  $options_menu[ 'menu-item-' . $menu_item_db_id ]['hide_current'] = empty( $_POST[ 'menu-item-weglot-hide_current' ][ $menu_item_db_id ] ) ? 0 : 1; //phpcs:ignore
85
  } else {
@@ -144,7 +142,7 @@ class Customize_Menu_Weglot implements Hooks_Interface_Weglot {
144
  </div>
145
  <p class="button-controls">
146
  <span class="add-to-menu">
147
- <button type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to menu', 'weglot' ); ?>" name="add-post-type-menu-item" id="submit-posttype-weglot-languages"><?php esc_attr_e( 'Add to Menu' ); ?></button>
148
  <span class="spinner"></span>
149
  </span>
150
  </p>
75
  $options_menu = array();
76
  }
77
 
78
+ $is_dropdown = $this->option_services->get_option_button( 'is_dropdown' );
79
+ $options_menu[ 'menu-item-' . $menu_item_db_id ]['dropdown'] = $is_dropdown;
80
+
 
 
81
  if ( array_key_exists( 'menu-item-weglot-hide_current', $_POST ) ) {
82
  $options_menu[ 'menu-item-' . $menu_item_db_id ]['hide_current'] = empty( $_POST[ 'menu-item-weglot-hide_current' ][ $menu_item_db_id ] ) ? 0 : 1; //phpcs:ignore
83
  } else {
142
  </div>
143
  <p class="button-controls">
144
  <span class="add-to-menu">
145
+ <button type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to menu', 'weglot' ); ?>" name="add-post-type-menu-item" id="submit-posttype-weglot-languages"><?php esc_html_e( 'Add to Menu' ); ?></button>
146
  <span class="spinner"></span>
147
  </span>
148
  </p>
src/actions/admin/class-options-weglot.php CHANGED
@@ -176,16 +176,11 @@ class Options_Weglot implements Hooks_Interface_Weglot {
176
  $plans = $this->user_api_services->get_plans();
177
 
178
  // Limit language
179
- if (
180
- $user_info['plan_id'] <= 1 ||
181
- in_array( $user_info['plan_id'], $plans['starter_free']['ids'] ) // phpcs:ignore
182
- ) {
183
- $options['languages'] = array_splice( $options['languages'], 0, $plans['starter_free']['limit_language'] );
184
- } elseif (
185
- in_array( $user_info['plan_id'], $plans['business']['ids'] ) // phpcs:ignore
186
- ) {
187
- $options['languages'] = array_splice( $options['languages'], 0, $plans['business']['limit_language'] );
188
  }
 
189
 
190
  $default_options = $this->option_services->get_options_default();
191
 
176
  $plans = $this->user_api_services->get_plans();
177
 
178
  // Limit language
179
+ $limit = 30;
180
+ if(isset($user_info['languages_limit'])){
181
+ $limit = $user_info['languages_limit'];
 
 
 
 
 
 
182
  }
183
+ $options['languages'] = array_splice( $options['languages'], 0, $limit );
184
 
185
  $default_options = $this->option_services->get_options_default();
186
 
src/actions/front/class-front-enqueue-weglot.php CHANGED
@@ -6,6 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  exit;
7
  }
8
 
 
9
  use WeglotWP\Models\Hooks_Interface_Weglot;
10
  use WeglotWP\Services\Option_Service_Weglot;
11
 
@@ -56,6 +57,13 @@ class Front_Enqueue_Weglot implements Hooks_Interface_Weglot {
56
  wp_register_style( 'weglot-css', WEGLOT_URL_DIST . '/css/front-css.css', false, WEGLOT_VERSION, false );
57
  wp_enqueue_style( 'weglot-css' );
58
 
 
 
 
 
 
 
 
59
  wp_add_inline_style( 'weglot-css', $this->option_services->get_flag_css() );
60
  wp_add_inline_style( 'weglot-css', $this->option_services->get_css_custom_inline() );
61
  }
6
  exit;
7
  }
8
 
9
+ use WeglotWP\Helpers\Helper_Flag_Type;
10
  use WeglotWP\Models\Hooks_Interface_Weglot;
11
  use WeglotWP\Services\Option_Service_Weglot;
12
 
57
  wp_register_style( 'weglot-css', WEGLOT_URL_DIST . '/css/front-css.css', false, WEGLOT_VERSION, false );
58
  wp_enqueue_style( 'weglot-css' );
59
 
60
+ //display new flags
61
+ if ( empty( $this->option_services->get_option( 'flag_css' ) )
62
+ && strpos( $this->option_services->get_css_custom_inline(), 'background-position' ) == false
63
+ && strpos( $this->option_services->get_css_custom_inline(), 'background-image' ) == false ) {
64
+ Helper_Flag_Type::get_new_flags();
65
+ }
66
+
67
  wp_add_inline_style( 'weglot-css', $this->option_services->get_flag_css() );
68
  wp_add_inline_style( 'weglot-css', $this->option_services->get_css_custom_inline() );
69
  }
src/actions/front/class-translate-page-weglot.php CHANGED
@@ -234,8 +234,8 @@ class Translate_Page_Weglot implements Hooks_Interface_Weglot {
234
  }
235
 
236
  // //If we receive a not translated slug we return a 301. For example if we have /fr/products but should have /fr/produits we should redirect to /fr/produits.
237
- if ( strpos( $this->request_url_services->get_weglot_url()->getPathAndQuery(), '301_' ) !== false ) {
238
- $redirect_to = str_replace( '301_', '', $this->request_url_services->get_weglot_url()->getPathAndQuery() );
239
  wp_redirect( '/' . $this->current_language->getExternalCode() . $redirect_to, 301 );
240
  exit;
241
  }
234
  }
235
 
236
  // //If we receive a not translated slug we return a 301. For example if we have /fr/products but should have /fr/produits we should redirect to /fr/produits.
237
+ if ( $this->request_url_services->get_weglot_url()->getRedirect() !== null ) {
238
+ $redirect_to = $this->request_url_services->get_weglot_url()->getRedirect();
239
  wp_redirect( '/' . $this->current_language->getExternalCode() . $redirect_to, 301 );
240
  exit;
241
  }
src/domcheckers/class-video-source.php CHANGED
@@ -14,7 +14,7 @@ class Video_Source extends AbstractDomChecker {
14
  /**
15
  * {@inheritdoc}
16
  */
17
- const DOM = 'video source';
18
  /**
19
  * {@inheritdoc}
20
  */
14
  /**
15
  * {@inheritdoc}
16
  */
17
+ const DOM = 'video source,video';
18
  /**
19
  * {@inheritdoc}
20
  */
src/helpers/class-helper-filter-url-weglot.php CHANGED
@@ -23,8 +23,11 @@ abstract class Helper_Filter_Url_Weglot {
23
  */
24
  public static function filter_url_lambda( $url ) {
25
  $request_url_service = weglot_get_request_url_service();
26
- $url = $request_url_service->create_url_object( $url );
27
- return $url->getForLanguage( $request_url_service->get_current_language() );
 
 
 
28
  }
29
 
30
  /**
23
  */
24
  public static function filter_url_lambda( $url ) {
25
  $request_url_service = weglot_get_request_url_service();
26
+ $replaced_url = $request_url_service->create_url_object( $url )->getForLanguage( $request_url_service->get_current_language() );
27
+ if($replaced_url)
28
+ return $replaced_url;
29
+ else
30
+ return $url;
31
  }
32
 
33
  /**
src/helpers/class-helper-flag-type.php CHANGED
@@ -33,9 +33,10 @@ class Helper_Flag_Type {
33
  const CIRCLE = 'circle';
34
 
35
  /**
36
- * @since 3.0.0
37
  * @param string|int $number
 
38
  * @return string
 
39
  */
40
  public static function get_flag_type_with_number( $number ) {
41
  switch ( (int) $number ) {
@@ -56,6 +57,7 @@ class Helper_Flag_Type {
56
 
57
  /**
58
  * @param string $type
 
59
  * @return string
60
  */
61
  public static function get_flag_number_with_type( $type ) {
@@ -70,4 +72,53 @@ class Helper_Flag_Type {
70
  return 3;
71
  }
72
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  }
33
  const CIRCLE = 'circle';
34
 
35
  /**
 
36
  * @param string|int $number
37
+ *
38
  * @return string
39
+ * @since 3.0.0
40
  */
41
  public static function get_flag_type_with_number( $number ) {
42
  switch ( (int) $number ) {
57
 
58
  /**
59
  * @param string $type
60
+ *
61
  * @return string
62
  */
63
  public static function get_flag_number_with_type( $type ) {
72
  return 3;
73
  }
74
  }
75
+
76
+ /**
77
+ * @param boolean $is_admin
78
+ *
79
+ * @return string
80
+ */
81
+ public static function get_new_flags( $is_admin = false) {
82
+ $options = get_transient( 'weglot_cache_cdn', false );
83
+ $custom_flag_css = '';
84
+
85
+ for ( $flag_number = 0; $flag_number <= 3; $flag_number++ ) {
86
+ if ( ! empty( $options['language_from_custom_flag'] ) ) {
87
+ $custom_flag_css .= self::get_custom_flag_for_one_language( $options['language_from'], $options['language_from_custom_flag'], $flag_number );
88
+ }
89
+
90
+ if(isset($options['languages']) && !empty($options['languages'])){
91
+ foreach ( $options['languages'] as $item ) {
92
+ if ( ! empty( $item['custom_flag'] ) ) {
93
+ $custom_flag_css .= self::get_custom_flag_for_one_language( $item['language_to'], $item['custom_flag'], $flag_number );
94
+ }
95
+ }
96
+ }
97
+
98
+ }
99
+
100
+
101
+ if($is_admin == true){
102
+ $custom_flag_css .= '.flag-style-openclose,#custom_flag_tips{display:none !important}';
103
+ }
104
+
105
+ wp_enqueue_style( 'new-flag-css', WEGLOT_DIRURL . 'app/styles/new-flags.css', array(), WEGLOT_VERSION );
106
+ wp_register_style( 'custom-flag-handle', false );
107
+ wp_enqueue_style( 'custom-flag-handle' );
108
+ wp_add_inline_style( 'custom-flag-handle', $custom_flag_css );
109
+ return $custom_flag_css;
110
+ }
111
+
112
+ public static function get_custom_flag_for_one_language( $language_code, $flag_code, $flag_number ) {
113
+ $flag_type = self::get_flag_type_with_number( $flag_number );
114
+ if ( strlen( $flag_code ) < 5 ) {
115
+ $flag_url = "https://cdn.weglot.com/flags/{$flag_type}/{$flag_code}.svg";
116
+ } else {
117
+ $flag_url = $flag_code;
118
+ }
119
+ return ".weglot-flags.flag-{$flag_number}.{$language_code}>a:before," .
120
+ ".weglot-flags.flag-{$flag_number}.{$language_code}>span:before {" .
121
+ "background-image: url({$flag_url}); }";
122
+
123
+ }
124
  }
src/services/class-replace-link-service-weglot.php CHANGED
@@ -209,7 +209,7 @@ class Replace_Link_Service_Weglot {
209
  */
210
  public function replace_meta( $translated_page, $current_url, $quote1, $quote2, $sometags = null, $sometags2 = null ) {
211
  $current_language = $this->request_url_services->get_current_language();
212
- $translated_page = preg_replace( '/<meta property="og:url"' . preg_quote( $sometags, '/' ) . 'content=' . preg_quote( $quote1 . $current_url . $quote2, '/' ) . '/', '<meta property="og:url"' . $sometags . 'content=' . $quote1 . $this->replace_url( $current_url, $current_language ) . $quote2, $translated_page );
213
 
214
  return $translated_page;
215
  }
209
  */
210
  public function replace_meta( $translated_page, $current_url, $quote1, $quote2, $sometags = null, $sometags2 = null ) {
211
  $current_language = $this->request_url_services->get_current_language();
212
+ $translated_page = preg_replace( '/<meta property="og:url"' . preg_quote( $sometags, '/' ) . 'content=' . preg_quote( $quote1 . $current_url . $quote2, '/' ) . '/', '<meta property="og:url"' . $sometags . 'content=' . $quote1 . esc_url( $this->replace_url( $current_url, $current_language ) ) . $quote2, $translated_page );
213
 
214
  return $translated_page;
215
  }
src/services/class-replace-url-service-weglot.php CHANGED
@@ -42,8 +42,7 @@ class Replace_Url_Service_Weglot {
42
  $this->multisite_other_paths = array_filter(
43
  $this->multisite_service->get_list_of_network_path() ,
44
  function($elem) {
45
- return strlen($elem) > 1
46
- && $elem !== $this->request_url_services->get_home_wordpress_directory()."/" ;
47
  });
48
  }
49
  }
@@ -161,6 +160,10 @@ class Replace_Url_Service_Weglot {
161
  if(isset($paths[1])) {
162
  $not_other_site = !in_array('/' . $paths[1] . '/' , $this->multisite_other_paths);
163
  }
 
 
 
 
164
  }
165
  }
166
 
@@ -224,8 +227,8 @@ class Replace_Url_Service_Weglot {
224
  $len_needle = strlen( $needle );
225
 
226
  return '' === $needle ||
227
- (
228
- ( $temp - $len_needle ) >= 0 && strpos( $haystack, $needle, $temp - $len_needle ) !== false
229
- );
230
  }
231
  }
42
  $this->multisite_other_paths = array_filter(
43
  $this->multisite_service->get_list_of_network_path() ,
44
  function($elem) {
45
+ return $elem !== $this->request_url_services->get_home_wordpress_directory()."/" ;
 
46
  });
47
  }
48
  }
160
  if(isset($paths[1])) {
161
  $not_other_site = !in_array('/' . $paths[1] . '/' , $this->multisite_other_paths);
162
  }
163
+ if( strlen( $this->request_url_services->get_home_wordpress_directory() ) > 1
164
+ && ( !isset($paths[1]) || ( '/' . $paths[1] !== $this->request_url_services->get_home_wordpress_directory() ) ) ) {
165
+ $not_other_site = false;
166
+ }
167
  }
168
  }
169
 
227
  $len_needle = strlen( $needle );
228
 
229
  return '' === $needle ||
230
+ (
231
+ ( $temp - $len_needle ) >= 0 && strpos( $haystack, $needle, $temp - $len_needle ) !== false
232
+ );
233
  }
234
  }
src/services/class-translate-service-weglot.php CHANGED
@@ -93,6 +93,24 @@ class Translate_Service_Weglot {
93
  return $this;
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  /**
97
  * @param string $content
98
  * @return string
@@ -104,15 +122,17 @@ class Translate_Service_Weglot {
104
  $this->set_original_language( $this->language_services->get_original_language() );
105
  $this->set_current_language( $this->request_url_services->get_current_language() ); // Need to reset
106
 
107
- // Choose type translate
108
  $type = ( Helper_Json_Inline_Weglot::is_json( $content ) ) ? 'json' : 'html';
109
  $type = apply_filters( 'weglot_type_treat_page', $type );
110
 
111
  $active_translation = apply_filters( 'weglot_active_translation', true );
112
 
113
- // No need to translate but prepare new dom with button
 
 
114
  if ( $this->current_language === $this->original_language || ! $active_translation ) {
115
- return $this->weglot_render_dom( $content );
116
  }
117
 
118
  $parser = $this->parser_services->get_parser();
@@ -126,9 +146,9 @@ class Translate_Service_Weglot {
126
  $translated_content = apply_filters( 'weglot_json_treat_page', $translated_content );
127
  return $translated_content;
128
  case 'html':
129
- $translated_content = $parser->translate( $content, $this->original_language, $this->current_language ); // phpcs:ignore
130
  $translated_content = apply_filters( 'weglot_html_treat_page', $translated_content );
131
- return $this->weglot_render_dom( $translated_content );
132
  default:
133
  $name_filter = sprintf( 'weglot_%s_treat_page', $type );
134
  return apply_filters( $name_filter, $content, $parser, $this->original_language, $this->current_language );
@@ -175,7 +195,7 @@ class Translate_Service_Weglot {
175
  * @param string $dom the final translated HTML.
176
  * @return string
177
  */
178
- public function weglot_render_dom( $dom ) {
179
  $dom = $this->generate_switcher_service->generate_switcher_from_dom( $dom );
180
 
181
  // We only need this on translated page.
@@ -183,20 +203,13 @@ class Translate_Service_Weglot {
183
  $dom = $this->replace_url_services->replace_link_in_dom( $dom );
184
  }
185
 
186
- preg_match( '/<link rel="canonical"(.*?)?href=(\"|\')([^\s\>]+?)(\"|\')/', $dom, $matches );
187
- if ( isset( $matches[3] ) && ! empty( $matches[3] ) ) {
188
- $canonical = $matches[3];
189
- $canonical_url = $this->request_url_services->create_url_object( $canonical );
190
- if ( isset( $canonical_url ) && $canonical_url instanceof Url ) {
191
- foreach ( $canonical_url->getAllUrls() as $url ) {
192
- preg_match( '/href=(\"|\')([^\s\>]+?)(\"|\') hreflang=(\"|\')' . $url['language']->getExternalCode() . '(\"|\')/', $dom, $matches );
193
- if ( isset( $matches[0] ) && ! empty( $matches[0] ) ) {
194
- $dom = preg_replace( '/href=(\"|\')([^\s\>]+?)(\"|\') hreflang=(\"|\')' . $url['language']->getExternalCode() . '(\"|\')/', 'href=$1' . esc_url( $url['url'] ) . '$3 hreflang="' . $url['language']->getExternalCode() . '"', $dom );
195
- }
196
- }
197
  }
198
  }
199
-
200
  return apply_filters( 'weglot_render_dom', $dom );
201
  }
202
  }
93
  return $this;
94
  }
95
 
96
+ /**
97
+ * @param string $content
98
+ * @return string
99
+ */
100
+ public function get_canonical_url_from_content( $content ) {
101
+ $check_canonical = preg_match( '/<link rel="canonical"(.*?)?href=(\"|\')([^\s\>]+?)(\"|\')/', $content, $matches );
102
+
103
+ if ( 1 === $check_canonical ) {
104
+ if ( isset( $matches[3] ) && ! empty( $matches[3] ) ) {
105
+ return $matches[3];
106
+ } else {
107
+ return '';
108
+ }
109
+ } else {
110
+ return '';
111
+ }
112
+ }
113
+
114
  /**
115
  * @param string $content
116
  * @return string
122
  $this->set_original_language( $this->language_services->get_original_language() );
123
  $this->set_current_language( $this->request_url_services->get_current_language() ); // Need to reset
124
 
125
+ // Choose type translate.
126
  $type = ( Helper_Json_Inline_Weglot::is_json( $content ) ) ? 'json' : 'html';
127
  $type = apply_filters( 'weglot_type_treat_page', $type );
128
 
129
  $active_translation = apply_filters( 'weglot_active_translation', true );
130
 
131
+ $canonical = $this->get_canonical_url_from_content( $content );
132
+
133
+ // No need to translate but prepare new dom with button.
134
  if ( $this->current_language === $this->original_language || ! $active_translation ) {
135
+ return $this->weglot_render_dom( $content, $canonical );
136
  }
137
 
138
  $parser = $this->parser_services->get_parser();
146
  $translated_content = apply_filters( 'weglot_json_treat_page', $translated_content );
147
  return $translated_content;
148
  case 'html':
149
+ $translated_content = $parser->translate( $content, $this->original_language, $this->current_language, [] , $canonical );
150
  $translated_content = apply_filters( 'weglot_html_treat_page', $translated_content );
151
+ return $this->weglot_render_dom( $translated_content, $canonical );
152
  default:
153
  $name_filter = sprintf( 'weglot_%s_treat_page', $type );
154
  return apply_filters( $name_filter, $content, $parser, $this->original_language, $this->current_language );
195
  * @param string $dom the final translated HTML.
196
  * @return string
197
  */
198
+ public function weglot_render_dom( $dom, $canonical = '' ) {
199
  $dom = $this->generate_switcher_service->generate_switcher_from_dom( $dom );
200
 
201
  // We only need this on translated page.
203
  $dom = $this->replace_url_services->replace_link_in_dom( $dom );
204
  }
205
 
206
+ // Remove hreflangs if non canonical page.
207
+ if ( '' !== $canonical ) {
208
+ $current_url = $this->request_url_services->get_weglot_url();
209
+ if ( $current_url->getForLanguage( $this->language_services->get_original_language() ) !== $canonical ) {
210
+ $dom = preg_replace( '/<link rel="alternate" href=(\"|\')([^\s\>]+?)(\"|\') hreflang=(\"|\')([^\s\>]+?)(\"|\')\/>/', '', $dom );
 
 
 
 
 
 
211
  }
212
  }
 
213
  return apply_filters( 'weglot_render_dom', $dom );
214
  }
215
  }
src/services/class-user-api-service-weglot.php CHANGED
@@ -22,11 +22,15 @@ class User_Api_Service_Weglot {
22
  public function get_plans() {
23
  return array(
24
  'starter_free' => array(
25
- 'ids' => array( 2, 3 ),
26
  'limit_language' => 1,
27
  ),
28
  'business' => array(
29
  'ids' => array( 4, 5 ),
 
 
 
 
30
  'limit_language' => 5,
31
  ),
32
  );
22
  public function get_plans() {
23
  return array(
24
  'starter_free' => array(
25
+ 'ids' => array( 1, 2, 3 ),
26
  'limit_language' => 1,
27
  ),
28
  'business' => array(
29
  'ids' => array( 4, 5 ),
30
+ 'limit_language' => 3,
31
+ ),
32
+ 'pro' => array(
33
+ 'ids' => array( 6, 7 ),
34
  'limit_language' => 5,
35
  ),
36
  );
src/third/woocommerce/class-wc-filter-urls-weglot.php CHANGED
@@ -101,7 +101,9 @@ class WC_Filter_Urls_Weglot implements Hooks_Interface_Weglot {
101
  preg_match( '#wp-resetpass-(.*?)=(.*?);#', $header, $matches_name );
102
  preg_match( '#path=(.*?);#', $header, $matches_path );
103
  if ( isset( $matches_name[0] ) && isset( $matches_path[0] ) && isset( $matches_path[1] ) ) {
104
- setcookie( 'wp-resetpass-' . $matches_name[1], urldecode( $matches_name[2] ), 0, '/' . $this->request_url_services->get_current_language()->getExternalCode() . $matches_path[1], '', is_ssl(), true ); // phpcs:ignore
 
 
105
  }
106
  }
107
  }
101
  preg_match( '#wp-resetpass-(.*?)=(.*?);#', $header, $matches_name );
102
  preg_match( '#path=(.*?);#', $header, $matches_path );
103
  if ( isset( $matches_name[0] ) && isset( $matches_path[0] ) && isset( $matches_path[1] ) ) {
104
+ $url = $this->request_url_services->create_url_object( $matches_path[1] );
105
+ $translated_url = $url->getForLanguage( $this->request_url_services->get_current_language() );
106
+ setcookie( 'wp-resetpass-' . $matches_name[1], urldecode( $matches_name[2] ), 0, $translated_url, '', is_ssl(), true ); // phpcs:ignore
107
  }
108
  }
109
  }
src/third/woocommerce/class-wc-mail-weglot.php CHANGED
@@ -116,9 +116,7 @@ class WC_Mail_Weglot implements Hooks_Interface_Weglot {
116
  }
117
 
118
  $current_language = $this->request_url_services->get_current_language()->getInternalCode();
119
- if ( $this->language_services->get_original_language()->getInternalCode() !== $current_language ) {
120
- add_post_meta( $order_id, 'weglot_language', $this->request_url_services->get_current_language()->getExternalCode() );
121
- }
122
 
123
  return $order_id;
124
  }
116
  }
117
 
118
  $current_language = $this->request_url_services->get_current_language()->getInternalCode();
119
+ add_post_meta( $order_id, 'weglot_language', $current_language );
 
 
120
 
121
  return $order_id;
122
  }
src/third/wprocket/class-wprocket-cache.php CHANGED
@@ -34,7 +34,7 @@ class Wprocket_Cache implements Hooks_Interface_Weglot {
34
  */
35
  public function __construct() {
36
  $this->wprocket_active_services = weglot_get_service( 'Wprocket_Active' );
37
- $this->option_services = weglot_get_service( 'Option_Service_Weglot' );
38
  }
39
 
40
  /**
@@ -48,8 +48,8 @@ class Wprocket_Cache implements Hooks_Interface_Weglot {
48
  return;
49
  }
50
 
51
- if(!isset($_COOKIE["weglot_wp_rocket_cache"]) && $this->option_services->get_option( 'auto_redirect' )) {
52
- setcookie("weglot_wp_rocket_cache" , "true");
53
  }
54
  }
55
  }
34
  */
35
  public function __construct() {
36
  $this->wprocket_active_services = weglot_get_service( 'Wprocket_Active' );
37
+ $this->option_services = weglot_get_service( 'Option_Service_Weglot' );
38
  }
39
 
40
  /**
48
  return;
49
  }
50
 
51
+ if ( ! isset( $_COOKIE['weglot_wp_rocket_cache'] ) && $this->option_services->get_option( 'auto_redirect' ) ) {
52
+ setcookie( 'weglot_wp_rocket_cache', 'true' ); //phpcs:ignore
53
  }
54
  }
55
  }
templates/admin/pages/tabs/appearance.php CHANGED
@@ -137,6 +137,7 @@ $options_available = [
137
  </option>
138
  </select>
139
  <div class="flag-style-openclose"><?php esc_html_e( 'Change country flags', 'weglot' ); ?></div>
 
140
  <div class="flag-style-wrapper" style="display:none;">
141
  <select class="flag-en-type wg-input-select">
142
  <option value=0><?php esc_html_e( 'Choose English flag:', 'weglot' ); ?></option>
137
  </option>
138
  </select>
139
  <div class="flag-style-openclose"><?php esc_html_e( 'Change country flags', 'weglot' ); ?></div>
140
+ <p id="custom_flag_tips">You are still using old flags. To use new SVG flags, make sure you are using the default flags (if you have some custom CSS related to background-position or background-image, remove it). Then save your settings and you will be using the flags</p>
141
  <div class="flag-style-wrapper" style="display:none;">
142
  <select class="flag-en-type wg-input-select">
143
  <option value=0><?php esc_html_e( 'Choose English flag:', 'weglot' ); ?></option>
templates/admin/pages/tabs/settings.php CHANGED
@@ -152,6 +152,13 @@ $plans = $this->user_api_services->get_plans();
152
  <?php echo sprintf( esc_html__( 'On the Business plan, you can choose 3 languages. If you need more, please %1$supgrade your plan%2$s.', 'weglot' ), '<a target="_blank" href="https://dashboard.weglot.com/billing/upgrade">', '</a>' ); ?>
153
  </p>
154
  <?php
 
 
 
 
 
 
 
155
  }
156
  ?>
157
  </td>
152
  <?php echo sprintf( esc_html__( 'On the Business plan, you can choose 3 languages. If you need more, please %1$supgrade your plan%2$s.', 'weglot' ), '<a target="_blank" href="https://dashboard.weglot.com/billing/upgrade">', '</a>' ); ?>
153
  </p>
154
  <?php
155
+ } elseif ( isset( $user_info['plan_id'] ) && in_array( $user_info['plan_id'], $plans['pro']['ids'] ) ) { //phpcs:ignore
156
+ ?>
157
+ <p class="description">
158
+ <?php // translators: 1 HTML Tag, 2 HTML Tag ?>
159
+ <?php echo sprintf( esc_html__( 'On the Pro plan, you can choose 5 languages. If you need more, please %1$supgrade your plan%2$s.', 'weglot' ), '<a target="_blank" href="https://dashboard.weglot.com/billing/upgrade">', '</a>' ); ?>
160
+ </p>
161
+ <?php
162
  }
163
  ?>
164
  </td>
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitd52bbb336ecfa182085a37bec21ca20c::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit4953aeb301b8b9fa666bb93bba17b1d0::getLoader();
vendor/composer/InstalledVersions.php CHANGED
@@ -30,7 +30,7 @@ private static $installed = array (
30
  'aliases' =>
31
  array (
32
  ),
33
- 'reference' => '19f1be41e48260d1a412c6083ba581b7455e909d',
34
  'name' => 'weglot/translate-wordpress',
35
  ),
36
  'versions' =>
@@ -69,7 +69,7 @@ private static $installed = array (
69
  'aliases' =>
70
  array (
71
  ),
72
- 'reference' => '19f1be41e48260d1a412c6083ba581b7455e909d',
73
  ),
74
  'weglot/translation-definitions' =>
75
  array (
@@ -82,12 +82,12 @@ private static $installed = array (
82
  ),
83
  'weglot/weglot-php' =>
84
  array (
85
- 'pretty_version' => '1.1.10',
86
- 'version' => '1.1.10.0',
87
  'aliases' =>
88
  array (
89
  ),
90
- 'reference' => '6b2f1abd63aec7ace158a842ae7f76938b3084d3',
91
  ),
92
  ),
93
  );
30
  'aliases' =>
31
  array (
32
  ),
33
+ 'reference' => '1f38df2e07af25cd408b027dbc364943249ec194',
34
  'name' => 'weglot/translate-wordpress',
35
  ),
36
  'versions' =>
69
  'aliases' =>
70
  array (
71
  ),
72
+ 'reference' => '1f38df2e07af25cd408b027dbc364943249ec194',
73
  ),
74
  'weglot/translation-definitions' =>
75
  array (
82
  ),
83
  'weglot/weglot-php' =>
84
  array (
85
+ 'pretty_version' => '1.1.11',
86
+ 'version' => '1.1.11.0',
87
  'aliases' =>
88
  array (
89
  ),
90
+ 'reference' => '75317f46c0bb1b9c55c4c30258cd17533c1ea2fb',
91
  ),
92
  ),
93
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitd52bbb336ecfa182085a37bec21ca20c
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitd52bbb336ecfa182085a37bec21ca20c
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInitd52bbb336ecfa182085a37bec21ca20c', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInitd52bbb336ecfa182085a37bec21ca20c', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInitd52bbb336ecfa182085a37bec21ca20c
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequired52bbb336ecfa182085a37bec21ca20c($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequired52bbb336ecfa182085a37bec21ca20c($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit4953aeb301b8b9fa666bb93bba17b1d0
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit4953aeb301b8b9fa666bb93bba17b1d0', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit4953aeb301b8b9fa666bb93bba17b1d0', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit4953aeb301b8b9fa666bb93bba17b1d0::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInit4953aeb301b8b9fa666bb93bba17b1d0::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire4953aeb301b8b9fa666bb93bba17b1d0($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequire4953aeb301b8b9fa666bb93bba17b1d0($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
@@ -66,10 +66,10 @@ class ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c
66
  public static function getInitializer(ClassLoader $loader)
67
  {
68
  return \Closure::bind(function () use ($loader) {
69
- $loader->prefixLengthsPsr4 = ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c::$prefixLengthsPsr4;
70
- $loader->prefixDirsPsr4 = ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c::$prefixDirsPsr4;
71
- $loader->prefixesPsr0 = ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c::$prefixesPsr0;
72
- $loader->classMap = ComposerStaticInitd52bbb336ecfa182085a37bec21ca20c::$classMap;
73
 
74
  }, null, ClassLoader::class);
75
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit4953aeb301b8b9fa666bb93bba17b1d0
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
66
  public static function getInitializer(ClassLoader $loader)
67
  {
68
  return \Closure::bind(function () use ($loader) {
69
+ $loader->prefixLengthsPsr4 = ComposerStaticInit4953aeb301b8b9fa666bb93bba17b1d0::$prefixLengthsPsr4;
70
+ $loader->prefixDirsPsr4 = ComposerStaticInit4953aeb301b8b9fa666bb93bba17b1d0::$prefixDirsPsr4;
71
+ $loader->prefixesPsr0 = ComposerStaticInit4953aeb301b8b9fa666bb93bba17b1d0::$prefixesPsr0;
72
+ $loader->classMap = ComposerStaticInit4953aeb301b8b9fa666bb93bba17b1d0::$classMap;
73
 
74
  }, null, ClassLoader::class);
75
  }
vendor/composer/installed.json CHANGED
@@ -190,17 +190,17 @@
190
  },
191
  {
192
  "name": "weglot/weglot-php",
193
- "version": "1.1.10",
194
- "version_normalized": "1.1.10.0",
195
  "source": {
196
  "type": "git",
197
  "url": "git@github.com:weglot/weglot-php.git",
198
- "reference": "6b2f1abd63aec7ace158a842ae7f76938b3084d3"
199
  },
200
  "dist": {
201
  "type": "zip",
202
- "url": "https://api.github.com/repos/weglot/weglot-php/zipball/6b2f1abd63aec7ace158a842ae7f76938b3084d3",
203
- "reference": "6b2f1abd63aec7ace158a842ae7f76938b3084d3",
204
  "shasum": ""
205
  },
206
  "require": {
@@ -213,7 +213,7 @@
213
  "codeception/codeception": "^2.4",
214
  "vlucas/phpdotenv": "^2.4"
215
  },
216
- "time": "2021-03-26T16:51:45+00:00",
217
  "type": "library",
218
  "installation-source": "dist",
219
  "autoload": {
190
  },
191
  {
192
  "name": "weglot/weglot-php",
193
+ "version": "1.1.11",
194
+ "version_normalized": "1.1.11.0",
195
  "source": {
196
  "type": "git",
197
  "url": "git@github.com:weglot/weglot-php.git",
198
+ "reference": "75317f46c0bb1b9c55c4c30258cd17533c1ea2fb"
199
  },
200
  "dist": {
201
  "type": "zip",
202
+ "url": "https://api.github.com/repos/weglot/weglot-php/zipball/75317f46c0bb1b9c55c4c30258cd17533c1ea2fb",
203
+ "reference": "75317f46c0bb1b9c55c4c30258cd17533c1ea2fb",
204
  "shasum": ""
205
  },
206
  "require": {
213
  "codeception/codeception": "^2.4",
214
  "vlucas/phpdotenv": "^2.4"
215
  },
216
+ "time": "2021-06-10T12:49:11+00:00",
217
  "type": "library",
218
  "installation-source": "dist",
219
  "autoload": {
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => '19f1be41e48260d1a412c6083ba581b7455e909d',
10
  'name' => 'weglot/translate-wordpress',
11
  ),
12
  'versions' =>
@@ -45,7 +45,7 @@
45
  'aliases' =>
46
  array (
47
  ),
48
- 'reference' => '19f1be41e48260d1a412c6083ba581b7455e909d',
49
  ),
50
  'weglot/translation-definitions' =>
51
  array (
@@ -58,12 +58,12 @@
58
  ),
59
  'weglot/weglot-php' =>
60
  array (
61
- 'pretty_version' => '1.1.10',
62
- 'version' => '1.1.10.0',
63
  'aliases' =>
64
  array (
65
  ),
66
- 'reference' => '6b2f1abd63aec7ace158a842ae7f76938b3084d3',
67
  ),
68
  ),
69
  );
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => '1f38df2e07af25cd408b027dbc364943249ec194',
10
  'name' => 'weglot/translate-wordpress',
11
  ),
12
  'versions' =>
45
  'aliases' =>
46
  array (
47
  ),
48
+ 'reference' => '1f38df2e07af25cd408b027dbc364943249ec194',
49
  ),
50
  'weglot/translation-definitions' =>
51
  array (
58
  ),
59
  'weglot/weglot-php' =>
60
  array (
61
+ 'pretty_version' => '1.1.11',
62
+ 'version' => '1.1.11.0',
63
  'aliases' =>
64
  array (
65
  ),
66
+ 'reference' => '75317f46c0bb1b9c55c4c30258cd17533c1ea2fb',
67
  ),
68
  ),
69
  );
vendor/weglot/weglot-php/src/Client/Client.php CHANGED
@@ -196,12 +196,22 @@ class Client
196
  public function makeRequest($method, $endpoint, $body = [], $asArray = true)
197
  {
198
  try {
199
- list($rawBody, $httpStatusCode, $httpHeader) = $this->getHttpClient()->request(
200
- $method,
201
- $this->makeAbsUrl($endpoint),
202
- ['api_key' => $this->apiKey],
203
- $body
204
- );
 
 
 
 
 
 
 
 
 
 
205
 
206
  $array = json_decode($rawBody, true);
207
  } catch (\Exception $e) {
196
  public function makeRequest($method, $endpoint, $body = [], $asArray = true)
197
  {
198
  try {
199
+ if($method === 'GET') {
200
+ list($rawBody, $httpStatusCode, $httpHeader) = $this->getHttpClient()->request(
201
+ $method,
202
+ $this->makeAbsUrl($endpoint),
203
+ array_merge( ['api_key' => $this->apiKey , ], $body),
204
+ []
205
+ );
206
+ }
207
+ else {
208
+ list($rawBody, $httpStatusCode, $httpHeader) = $this->getHttpClient()->request(
209
+ $method,
210
+ $this->makeAbsUrl($endpoint),
211
+ ['api_key' => $this->apiKey],
212
+ $body
213
+ );
214
+ }
215
 
216
  $array = json_decode($rawBody, true);
217
  } catch (\Exception $e) {
vendor/weglot/weglot-php/src/Client/Endpoint/CdnTranslate.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Weglot\Client\Endpoint;
4
+
5
+ use Weglot\Client\Api\Exception\ApiError;
6
+ use Weglot\Client\Api\Exception\InputAndOutputCountMatchException;
7
+ use Weglot\Client\Api\Exception\InvalidWordTypeException;
8
+ use Weglot\Client\Api\Exception\MissingRequiredParamException;
9
+ use Weglot\Client\Api\Exception\MissingWordsOutputException;
10
+ use Weglot\Client\Api\TranslateEntry;
11
+ use Weglot\Client\Client;
12
+ use Weglot\Client\Factory\Translate as TranslateFactory;
13
+
14
+ /**
15
+ * Class Translate
16
+ * @package Weglot\Client\Endpoint
17
+ */
18
+ class CdnTranslate extends Endpoint
19
+ {
20
+ const METHOD = 'GET';
21
+ const ENDPOINT = '/translate';
22
+
23
+ /**
24
+ * @var TranslateEntry
25
+ */
26
+ protected $translateEntry;
27
+
28
+ /**
29
+ * Translate constructor.
30
+ * @param TranslateEntry $translateEntry
31
+ * @param Client $client
32
+ */
33
+ public function __construct(TranslateEntry $translateEntry, Client $client)
34
+ {
35
+ $this->setTranslateEntry($translateEntry);
36
+ $currentHost = $client->getOptions()['host'];
37
+ if($currentHost) {
38
+ $cdnHost = str_replace('https://api.weglot.' , 'https://cdn-api.weglot.' , $currentHost);
39
+ $client->setOptions(array('host' => $cdnHost ));
40
+ }
41
+ parent::__construct($client);
42
+ }
43
+
44
+ /**
45
+ * @return TranslateEntry
46
+ */
47
+ public function getTranslateEntry()
48
+ {
49
+ return $this->translateEntry;
50
+ }
51
+
52
+ /**
53
+ * @param TranslateEntry $translateEntry
54
+ * @return $this
55
+ */
56
+ public function setTranslateEntry(TranslateEntry $translateEntry)
57
+ {
58
+ $this->translateEntry = $translateEntry;
59
+
60
+ return $this;
61
+ }
62
+
63
+ /**
64
+ * @return array
65
+ */
66
+ protected function beforeRequest()
67
+ {
68
+ // init
69
+ $words = $this->getTranslateEntry()->getInputWords()->jsonSerialize();
70
+ $requestWords = $cachedWords = $fullWords = [];
71
+
72
+ $defaultParams = [
73
+ 'from' => $this->getTranslateEntry()->getParams('language_from'),
74
+ 'to' => $this->getTranslateEntry()->getParams('language_to')
75
+ ];
76
+
77
+ // fetch words to check if anything hit the cache
78
+ foreach ($words as $key => $word) {
79
+
80
+ // adding from & to languages to make key unique by language-pair
81
+ $word = array_merge($word, $defaultParams);
82
+ $cachedWord = $this->getCache()->getWithGenerate($word);
83
+
84
+ // default behavior > sending word to request
85
+ $where = 'request';
86
+ $element = $word;
87
+ $array = &$requestWords;
88
+
89
+ // cached behavior > word is present in cache !
90
+ if ($cachedWord->isHit()) {
91
+ $where = 'cached';
92
+ $element = $cachedWord->get();
93
+ $array = &$cachedWords;
94
+ }
95
+
96
+ // get next element place
97
+ $next = \count($array);
98
+
99
+ // apply choosed behavior
100
+ $array[$next] = $element;
101
+ $fullWords[$key] = [
102
+ 'where' => $where,
103
+ 'place' => $next
104
+ ];
105
+ }
106
+
107
+ return [
108
+ $requestWords,
109
+ $cachedWords,
110
+ $fullWords
111
+ ];
112
+ }
113
+
114
+ /**
115
+ * @param array $response
116
+ * @param array $beforeRequestResult
117
+ * @return array
118
+ */
119
+ protected function afterRequest(array $response, array $beforeRequestResult)
120
+ {
121
+ // init
122
+ list($requestWords, $cachedWords, $fullWords) = $beforeRequestResult;
123
+ $fromWords = $toWords = [];
124
+
125
+ $defaultParams = [
126
+ 'from' => $this->getTranslateEntry()->getParams('language_from'),
127
+ 'to' => $this->getTranslateEntry()->getParams('language_to')
128
+ ];
129
+
130
+ // fetch all words in one array
131
+ foreach ($fullWords as $key => $details) {
132
+ // if current word was in cache, just retrieve it
133
+ if ($details['where'] === 'cached') {
134
+ $fromWords[$key] = $cachedWords[$details['place']]['from'];
135
+ $toWords[$key] = $cachedWords[$details['place']]['to'];
136
+ continue;
137
+ }
138
+
139
+ // word was requested, let's retrieve data from response
140
+ $word = $requestWords[$details['place']];
141
+ $from = $response['from_words'][$details['place']];
142
+ $to = $response['to_words'][$details['place']];
143
+
144
+ // caching requested word
145
+ $word = array_merge($word, $defaultParams);
146
+ $cachedWord = $this->getCache()->getWithGenerate($word);
147
+
148
+ $cachedWord->set([
149
+ 'from' => $from,
150
+ 'to' => $to
151
+ ]);
152
+ $this->getCache()->save($cachedWord);
153
+
154
+ // then re-inject word inside
155
+ $fromWords[$key] = $from;
156
+ $toWords[$key] = $to;
157
+ }
158
+
159
+ $response['from_words'] = $fromWords;
160
+ $response['to_words'] = $toWords;
161
+
162
+ return $response;
163
+ }
164
+
165
+ /**
166
+ * @return TranslateEntry
167
+ * @throws ApiError
168
+ * @throws InputAndOutputCountMatchException
169
+ * @throws InvalidWordTypeException
170
+ * @throws MissingRequiredParamException
171
+ * @throws MissingWordsOutputException
172
+ */
173
+ public function handle()
174
+ {
175
+ $beforeRequest = [];
176
+ $asArray = $this->translateEntry->jsonSerialize();
177
+
178
+ $words = $asArray['words'];
179
+ $w = [];
180
+ foreach ($words as $word) {
181
+ $w[$word['t']][] = $word['w'];
182
+
183
+ }
184
+ $asArray['w'] = $w;
185
+ unset($asArray['words']);
186
+
187
+ if (!empty($asArray['w'])) {
188
+ list($rawBody, $httpStatusCode) = $this->request($asArray, false);
189
+ if ($httpStatusCode !== 200) {
190
+ throw new ApiError($rawBody, $asArray);
191
+ }
192
+
193
+ $response = json_decode($rawBody, true);
194
+ }
195
+
196
+ $factory = new TranslateFactory($response);
197
+ return $factory->handle();
198
+ }
199
+ }
vendor/weglot/weglot-php/src/Client/Endpoint/LanguagesList.php CHANGED
@@ -32,7 +32,8 @@ class LanguagesList extends Endpoint
32
  'internal_code' => $data['code'],
33
  'english' => $data['english'],
34
  'local' => $data['local'],
35
- 'rtl' => $data['rtl']
 
36
  );
37
  }, $data);
38
 
32
  'internal_code' => $data['code'],
33
  'english' => $data['english'],
34
  'local' => $data['local'],
35
+ 'rtl' => $data['rtl'],
36
+ 'external_code' => ($data['code'] == 'tw') ? 'zh-tw' : $data['code'],
37
  );
38
  }, $data);
39
 
vendor/weglot/weglot-php/src/Parser/ConfigProvider/ServerConfigProvider.php CHANGED
@@ -23,12 +23,16 @@ class ServerConfigProvider extends AbstractConfigProvider
23
  /**
24
  * Is used to load server data, you have to run it manually !
25
  */
26
- public function loadFromServer()
27
  {
28
- if (http_response_code() !== 200) {
29
- $url = Server::urlOrigin($_SERVER).'/404';
30
- } else {
31
- $url = Server::fullUrl($_SERVER);
 
 
 
 
32
  }
33
 
34
  $this
23
  /**
24
  * Is used to load server data, you have to run it manually !
25
  */
26
+ public function loadFromServer($canonical = '')
27
  {
28
+ if(!empty($canonical)){
29
+ $url = $canonical;
30
+ }else{
31
+ if (http_response_code() !== 200) {
32
+ $url = Server::urlOrigin($_SERVER).'/404';
33
+ } else {
34
+ $url = Server::fullUrl($_SERVER);
35
+ }
36
  }
37
 
38
  $this
vendor/weglot/weglot-php/src/Parser/Parser.php CHANGED
@@ -5,6 +5,7 @@ namespace Weglot\Parser;
5
  use phpDocumentor\Reflection\DocBlock\Tags\Source;
6
  use Weglot\Client\Api\Enum\WordType;
7
  use Weglot\Client\Api\WordEntry;
 
8
  use Weglot\Parser\Check\Regex\JsonChecker;
9
  use Weglot\Parser\Check\RegexCheckerProvider;
10
  use Weglot\Parser\Formatter\JsonFormatter;
@@ -33,8 +34,7 @@ use Weglot\Parser\Formatter\JsonLdFormatter;
33
  * Class Parser
34
  * @package Weglot\Parser
35
  */
36
- class Parser
37
- {
38
  /**
39
  * Attribute to match in DOM when we don't want to translate innertext & childs.
40
  */
@@ -88,28 +88,28 @@ class Parser
88
 
89
  /**
90
  * Parser constructor.
 
91
  * @param Client $client
92
  * @param ConfigProviderInterface $config
93
  * @param array $excludeBlocks
94
  */
95
- public function __construct(Client $client, ConfigProviderInterface $config, array $excludeBlocks = [])
96
- {
97
  $this
98
- ->setClient($client)
99
- ->setConfigProvider($config)
100
- ->setExcludeBlocks($excludeBlocks)
101
- ->setWords(new WordCollection())
102
- ->setDomCheckerProvider(new DomCheckerProvider($this, $client->getProfile()->getTranslationEngine()))
103
- ->setRegexCheckerProvider(new RegexCheckerProvider($this))
104
- ->setIgnoredNodesFormatter(new IgnoredNodes());
105
  }
106
 
107
  /**
108
  * @param Client $client
 
109
  * @return $this
110
  */
111
- public function setClient(Client $client)
112
- {
113
  $this->client = $client;
114
 
115
  return $this;
@@ -118,17 +118,16 @@ class Parser
118
  /**
119
  * @return Client
120
  */
121
- public function getClient()
122
- {
123
  return $this->client;
124
  }
125
 
126
  /**
127
  * @param array $excludeBlocks
 
128
  * @return $this
129
  */
130
- public function setExcludeBlocks(array $excludeBlocks)
131
- {
132
  $this->excludeBlocks = $excludeBlocks;
133
 
134
  return $this;
@@ -137,17 +136,16 @@ class Parser
137
  /**
138
  * @return array
139
  */
140
- public function getExcludeBlocks()
141
- {
142
  return $this->excludeBlocks;
143
  }
144
 
145
  /**
146
  * @param ConfigProviderInterface $config
 
147
  * @return $this
148
  */
149
- public function setConfigProvider(ConfigProviderInterface $config)
150
- {
151
  $this->configProvider = $config;
152
 
153
  return $this;
@@ -156,17 +154,16 @@ class Parser
156
  /**
157
  * @return ConfigProviderInterface
158
  */
159
- public function getConfigProvider()
160
- {
161
  return $this->configProvider;
162
  }
163
 
164
  /**
165
  * @param string $languageFrom
 
166
  * @return $this
167
  */
168
- public function setLanguageFrom($languageFrom)
169
- {
170
  $this->languageFrom = $languageFrom;
171
 
172
  return $this;
@@ -175,17 +172,16 @@ class Parser
175
  /**
176
  * @return string
177
  */
178
- public function getLanguageFrom()
179
- {
180
  return $this->languageFrom;
181
  }
182
 
183
  /**
184
  * @param string $languageTo
 
185
  * @return $this
186
  */
187
- public function setLanguageTo($languageTo)
188
- {
189
  $this->languageTo = $languageTo;
190
 
191
  return $this;
@@ -194,17 +190,16 @@ class Parser
194
  /**
195
  * @return string
196
  */
197
- public function getLanguageTo()
198
- {
199
  return $this->languageTo;
200
  }
201
 
202
  /**
203
  * @param WordCollection $wordCollection
 
204
  * @return $this
205
  */
206
- public function setWords(WordCollection $wordCollection)
207
- {
208
  $this->words = $wordCollection;
209
 
210
  return $this;
@@ -213,62 +208,61 @@ class Parser
213
  /**
214
  * @return WordCollection
215
  */
216
- public function getWords()
217
- {
218
  return $this->words;
219
  }
220
 
221
  /**
222
  * @param RegexCheckerProvider $regexCheckerProvider
 
223
  * @return $this
224
  */
225
- public function setRegexCheckerProvider(RegexCheckerProvider $regexCheckerProvider)
226
- {
227
  $this->regexCheckerProvider = $regexCheckerProvider;
 
228
  return $this;
229
  }
230
 
231
  /**
232
  * @return RegexCheckerProvider
233
  */
234
- public function getRegexCheckerProvider()
235
- {
236
  return $this->regexCheckerProvider;
237
  }
238
 
239
  /**
240
  * @param DomCheckerProvider $domCheckerProvider
 
241
  * @return $this
242
  */
243
- public function setDomCheckerProvider(DomCheckerProvider $domCheckerProvider)
244
- {
245
  $this->domCheckerProvider = $domCheckerProvider;
 
246
  return $this;
247
  }
248
 
249
  /**
250
  * @return DomCheckerProvider
251
  */
252
- public function getDomCheckerProvider()
253
- {
254
  return $this->domCheckerProvider;
255
  }
256
 
257
  /**
258
  * @param IgnoredNodes $ignoredNodesFormatter
 
259
  * @return $this
260
  */
261
- public function setIgnoredNodesFormatter(IgnoredNodes $ignoredNodesFormatter)
262
- {
263
  $this->ignoredNodesFormatter = $ignoredNodesFormatter;
 
264
  return $this;
265
  }
266
 
267
  /**
268
  * @return IgnoredNodes
269
  */
270
- public function getIgnoredNodesFormatter()
271
- {
272
  return $this->ignoredNodesFormatter;
273
  }
274
 
@@ -277,6 +271,7 @@ class Parser
277
  * @param string $languageFrom
278
  * @param string $languageTo
279
  * @param array $extraKeys
 
280
  * @return string
281
  * @throws ApiError
282
  * @throws InputAndOutputCountMatchException
@@ -284,63 +279,60 @@ class Parser
284
  * @throws MissingRequiredParamException
285
  * @throws MissingWordsOutputException
286
  */
287
- public function translate($source, $languageFrom, $languageTo, $extraKeys = [])
288
- {
289
  // setters
290
  $this
291
- ->setLanguageFrom($languageFrom)
292
- ->setLanguageTo($languageTo);
293
 
294
- $results = $this->parse($source, $extraKeys);
295
 
296
  $tree = $results['tree'];
297
 
298
- if($tree['type'] === SourceType::SOURCE_HTML) {
299
- $title = $this->getTitle($tree['dom']);
300
- }
301
- else {
302
  $title = "";
303
  }
304
 
305
  // api communication
306
- if(count($this->getWords()) === 0) {
307
  return $source;
308
  }
309
 
310
- $translated = $this->apiTranslate($title);
311
- $source = $this->formatters($source, $translated, $tree);
 
312
  return $source;
313
  }
314
 
315
  /**
316
  * @param $source
317
  * @param $extraKeys
 
318
  * @return array
319
  * @throws InvalidWordTypeException
320
  */
321
- public function parse($source, $extraKeys = [])
322
- {
323
- $type = self::getSourceType($source);
324
 
325
- if($type === SourceType::SOURCE_HTML) {
326
- $tree = $this->parseHTML($source);
 
 
 
 
327
  }
328
- elseif($type === SourceType::SOURCE_JSON) {
329
- $tree = $this->parseJSON($source, $extraKeys);
330
- }
331
- else {
332
- $tree = $this->parseText($source);
333
- }
334
- return array( 'tree' => $tree, 'words' => $this->getWords());
335
  }
336
 
337
- public function parseHTML($source)
338
- {
339
- if ($this->client->getProfile()->getTranslationEngine() == 2) {
340
  $ignoredNodesFormatter = $this->getIgnoredNodesFormatter();
341
 
342
- $ignoredNodesFormatter->setSource($source)
343
- ->handle();
344
 
345
  $source = $ignoredNodesFormatter->getSource();
346
  }
@@ -356,35 +348,43 @@ class Parser
356
 
357
  // if simple_html_dom can't parse the $source, it returns false
358
  // so we just return raw $source
359
- if ($dom === false) {
360
  return $source;
361
  }
362
 
363
  // exclude blocks
364
- if (!empty($this->excludeBlocks)) {
365
- $excludeBlocks = new ExcludeBlocksFormatter($dom, $this->excludeBlocks);
366
- $dom = $excludeBlocks->getDom();
367
  }
368
 
369
  // checkers
370
- list($nodes, $regexes) = $this->checkers($dom, $source);
371
 
372
- return [ 'type' => SourceType::SOURCE_HTML , 'source' => $source , 'dom' => $dom, 'nodes' => $nodes, 'regexes' => $regexes ];
 
 
 
 
 
373
  }
374
 
375
- public function parseJSON($jsonString, $extraKeys = []) {
376
- $checker = new JsonChecker($this, $jsonString, $extraKeys);
 
377
  return $checker->handle();
378
  }
379
 
380
- public function parseText($text, $regex = null) {
 
 
381
 
382
- $this->getWords()->addOne(new WordEntry($text, WordType::TEXT));
383
- return array( "type" => SourceType::SOURCE_TEXT, "source" => $regex , "text" => $text );
384
  }
385
 
386
  /**
387
  * @param string $title
 
388
  * @return TranslateEntry
389
  * @throws ApiError
390
  * @throws InputAndOutputCountMatchException
@@ -392,62 +392,65 @@ class Parser
392
  * @throws MissingRequiredParamException
393
  * @throws MissingWordsOutputException
394
  */
395
- protected function apiTranslate($title = null)
396
- {
397
  // Translate endpoint parameters
398
  $params = [
399
  'language_from' => $this->getLanguageFrom(),
400
- 'language_to' => $this->getLanguageTo()
401
  ];
402
 
403
  // if data is coming from $_SERVER, load it ...
404
- if ($this->getConfigProvider() instanceof ServerConfigProvider) {
405
- $this->getConfigProvider()->loadFromServer();
406
  }
407
 
408
- if ($this->getConfigProvider()->getAutoDiscoverTitle()) {
409
  $params['title'] = $title;
410
  }
411
- $params = array_merge($params, $this->getConfigProvider()->asArray());
412
 
413
  try {
414
- $translate = new TranslateEntry($params);
415
- $translate->setInputWords($this->getWords());
416
- } catch (\Exception $e) {
417
- die($e->getMessage());
418
  }
419
- $translate = new Translate($translate, $this->client);
420
-
421
- $translated = $translate->handle();
422
 
423
- return $translated;
 
 
 
 
 
 
424
  }
425
 
426
  /**
427
  * @param simple_html_dom $dom
 
428
  * @return string
429
  */
430
- protected function getTitle(simple_html_dom $dom)
431
- {
432
  $title = 'Empty title';
433
- foreach ($dom->find('title') as $k => $node) {
434
- if ($node->innertext != '') {
435
  $title = $node->innertext;
436
  }
437
  }
 
438
  return $title;
439
  }
440
 
441
  /**
442
  * @param $dom
443
  * @param $source
 
444
  * @return array
445
  * @throws InvalidWordTypeException
446
  */
447
- protected function checkers($dom, $source)
448
- {
449
- $nodes = $this->getDomCheckerProvider()->handle($dom);
450
- $regexes = $this->getRegexCheckerProvider()->handle($source);
451
 
452
  return [
453
  $nodes,
@@ -460,53 +463,53 @@ class Parser
460
  * @param TranslateEntry $translateEntry
461
  * @param mixed $tree
462
  * @param int $index
 
463
  * @return string $source
464
  */
465
- public function formatters($source, TranslateEntry $translateEntry, $tree, &$index = 0)
466
- {
467
- if (empty($tree['type'])) {
468
  return $source;
469
  }
470
- if($tree['type'] === SourceType::SOURCE_TEXT) {
471
- $source = str_replace($tree['text'] , $translateEntry->getOutputWords()[$index]->getWord(), $source);
472
- $index++;
473
  }
474
- if($tree['type'] === SourceType::SOURCE_JSON) {
475
- $formatter = new JsonFormatter($this, $source, $translateEntry);
476
- $source = $formatter->handle($tree, $index);
477
  }
478
- if($tree['type'] === SourceType::SOURCE_HTML) {
479
- $formatter = new DomFormatter($this, $translateEntry);
480
- $formatter->handle($tree['nodes'], $index);
481
  $source = $tree['dom']->save();
482
- foreach ($tree['regexes'] as $regex) {
483
- if (empty($regex['source'])) {
484
  continue;
485
  }
486
- $translatedRegex = $this->formatters($regex['source'], $translateEntry, $regex, $index);
487
- if($regex['revert_callback']) {
488
- $translatedRegex = call_user_func($regex['revert_callback'], $translatedRegex);
489
  }
490
 
491
- if($regex['type'] === SourceType::SOURCE_TEXT && $regex['source'] == $regex['text']) {
492
- $source = preg_replace( '#\b' . preg_quote( $regex['source'], '#' ) . '\b#' , $translatedRegex, $source);
493
- }
494
- else {
495
- $source = str_replace($regex['source_before_callback'] , $translatedRegex, $source);
496
  }
497
  }
498
  }
 
499
  return $source;
500
  }
501
 
502
 
503
-
504
- public static function getSourceType($source) {
505
- if(Text::isJSON($source))
506
  return SourceType::SOURCE_JSON;
507
- elseif(Text::isHTML($source))
508
  return SourceType::SOURCE_HTML;
509
- else
510
  return SourceType::SOURCE_TEXT;
 
511
  }
512
  }
5
  use phpDocumentor\Reflection\DocBlock\Tags\Source;
6
  use Weglot\Client\Api\Enum\WordType;
7
  use Weglot\Client\Api\WordEntry;
8
+ use Weglot\Client\Endpoint\CdnTranslate;
9
  use Weglot\Parser\Check\Regex\JsonChecker;
10
  use Weglot\Parser\Check\RegexCheckerProvider;
11
  use Weglot\Parser\Formatter\JsonFormatter;
34
  * Class Parser
35
  * @package Weglot\Parser
36
  */
37
+ class Parser {
 
38
  /**
39
  * Attribute to match in DOM when we don't want to translate innertext & childs.
40
  */
88
 
89
  /**
90
  * Parser constructor.
91
+ *
92
  * @param Client $client
93
  * @param ConfigProviderInterface $config
94
  * @param array $excludeBlocks
95
  */
96
+ public function __construct( Client $client, ConfigProviderInterface $config, array $excludeBlocks = [] ) {
 
97
  $this
98
+ ->setClient( $client )
99
+ ->setConfigProvider( $config )
100
+ ->setExcludeBlocks( $excludeBlocks )
101
+ ->setWords( new WordCollection() )
102
+ ->setDomCheckerProvider( new DomCheckerProvider( $this, $client->getProfile()->getTranslationEngine() ) )
103
+ ->setRegexCheckerProvider( new RegexCheckerProvider( $this ) )
104
+ ->setIgnoredNodesFormatter( new IgnoredNodes() );
105
  }
106
 
107
  /**
108
  * @param Client $client
109
+ *
110
  * @return $this
111
  */
112
+ public function setClient( Client $client ) {
 
113
  $this->client = $client;
114
 
115
  return $this;
118
  /**
119
  * @return Client
120
  */
121
+ public function getClient() {
 
122
  return $this->client;
123
  }
124
 
125
  /**
126
  * @param array $excludeBlocks
127
+ *
128
  * @return $this
129
  */
130
+ public function setExcludeBlocks( array $excludeBlocks ) {
 
131
  $this->excludeBlocks = $excludeBlocks;
132
 
133
  return $this;
136
  /**
137
  * @return array
138
  */
139
+ public function getExcludeBlocks() {
 
140
  return $this->excludeBlocks;
141
  }
142
 
143
  /**
144
  * @param ConfigProviderInterface $config
145
+ *
146
  * @return $this
147
  */
148
+ public function setConfigProvider( ConfigProviderInterface $config ) {
 
149
  $this->configProvider = $config;
150
 
151
  return $this;
154
  /**
155
  * @return ConfigProviderInterface
156
  */
157
+ public function getConfigProvider() {
 
158
  return $this->configProvider;
159
  }
160
 
161
  /**
162
  * @param string $languageFrom
163
+ *
164
  * @return $this
165
  */
166
+ public function setLanguageFrom( $languageFrom ) {
 
167
  $this->languageFrom = $languageFrom;
168
 
169
  return $this;
172
  /**
173
  * @return string
174
  */
175
+ public function getLanguageFrom() {
 
176
  return $this->languageFrom;
177
  }
178
 
179
  /**
180
  * @param string $languageTo
181
+ *
182
  * @return $this
183
  */
184
+ public function setLanguageTo( $languageTo ) {
 
185
  $this->languageTo = $languageTo;
186
 
187
  return $this;
190
  /**
191
  * @return string
192
  */
193
+ public function getLanguageTo() {
 
194
  return $this->languageTo;
195
  }
196
 
197
  /**
198
  * @param WordCollection $wordCollection
199
+ *
200
  * @return $this
201
  */
202
+ public function setWords( WordCollection $wordCollection ) {
 
203
  $this->words = $wordCollection;
204
 
205
  return $this;
208
  /**
209
  * @return WordCollection
210
  */
211
+ public function getWords() {
 
212
  return $this->words;
213
  }
214
 
215
  /**
216
  * @param RegexCheckerProvider $regexCheckerProvider
217
+ *
218
  * @return $this
219
  */
220
+ public function setRegexCheckerProvider( RegexCheckerProvider $regexCheckerProvider ) {
 
221
  $this->regexCheckerProvider = $regexCheckerProvider;
222
+
223
  return $this;
224
  }
225
 
226
  /**
227
  * @return RegexCheckerProvider
228
  */
229
+ public function getRegexCheckerProvider() {
 
230
  return $this->regexCheckerProvider;
231
  }
232
 
233
  /**
234
  * @param DomCheckerProvider $domCheckerProvider
235
+ *
236
  * @return $this
237
  */
238
+ public function setDomCheckerProvider( DomCheckerProvider $domCheckerProvider ) {
 
239
  $this->domCheckerProvider = $domCheckerProvider;
240
+
241
  return $this;
242
  }
243
 
244
  /**
245
  * @return DomCheckerProvider
246
  */
247
+ public function getDomCheckerProvider() {
 
248
  return $this->domCheckerProvider;
249
  }
250
 
251
  /**
252
  * @param IgnoredNodes $ignoredNodesFormatter
253
+ *
254
  * @return $this
255
  */
256
+ public function setIgnoredNodesFormatter( IgnoredNodes $ignoredNodesFormatter ) {
 
257
  $this->ignoredNodesFormatter = $ignoredNodesFormatter;
258
+
259
  return $this;
260
  }
261
 
262
  /**
263
  * @return IgnoredNodes
264
  */
265
+ public function getIgnoredNodesFormatter() {
 
266
  return $this->ignoredNodesFormatter;
267
  }
268
 
271
  * @param string $languageFrom
272
  * @param string $languageTo
273
  * @param array $extraKeys
274
+ *
275
  * @return string
276
  * @throws ApiError
277
  * @throws InputAndOutputCountMatchException
279
  * @throws MissingRequiredParamException
280
  * @throws MissingWordsOutputException
281
  */
282
+ public function translate( $source, $languageFrom, $languageTo, $extraKeys = [], $canonical = '' ) {
 
283
  // setters
284
  $this
285
+ ->setLanguageFrom( $languageFrom )
286
+ ->setLanguageTo( $languageTo );
287
 
288
+ $results = $this->parse( $source, $extraKeys );
289
 
290
  $tree = $results['tree'];
291
 
292
+ if ( $tree['type'] === SourceType::SOURCE_HTML ) {
293
+ $title = $this->getTitle( $tree['dom'] );
294
+ } else {
 
295
  $title = "";
296
  }
297
 
298
  // api communication
299
+ if ( count( $this->getWords() ) === 0 ) {
300
  return $source;
301
  }
302
 
303
+ $translated = $this->apiTranslate( $title, $canonical );
304
+ $source = $this->formatters( $source, $translated, $tree );
305
+
306
  return $source;
307
  }
308
 
309
  /**
310
  * @param $source
311
  * @param $extraKeys
312
+ *
313
  * @return array
314
  * @throws InvalidWordTypeException
315
  */
316
+ public function parse( $source, $extraKeys = [] ) {
317
+ $type = self::getSourceType( $source );
 
318
 
319
+ if ( $type === SourceType::SOURCE_HTML ) {
320
+ $tree = $this->parseHTML( $source );
321
+ } elseif ( $type === SourceType::SOURCE_JSON ) {
322
+ $tree = $this->parseJSON( $source, $extraKeys );
323
+ } else {
324
+ $tree = $this->parseText( $source );
325
  }
326
+
327
+ return array( 'tree' => $tree, 'words' => $this->getWords() );
 
 
 
 
 
328
  }
329
 
330
+ public function parseHTML( $source ) {
331
+ if ( $this->client->getProfile()->getTranslationEngine() == 2 ) {
 
332
  $ignoredNodesFormatter = $this->getIgnoredNodesFormatter();
333
 
334
+ $ignoredNodesFormatter->setSource( $source )
335
+ ->handle();
336
 
337
  $source = $ignoredNodesFormatter->getSource();
338
  }
348
 
349
  // if simple_html_dom can't parse the $source, it returns false
350
  // so we just return raw $source
351
+ if ( $dom === false ) {
352
  return $source;
353
  }
354
 
355
  // exclude blocks
356
+ if ( ! empty( $this->excludeBlocks ) ) {
357
+ $excludeBlocks = new ExcludeBlocksFormatter( $dom, $this->excludeBlocks );
358
+ $dom = $excludeBlocks->getDom();
359
  }
360
 
361
  // checkers
362
+ list( $nodes, $regexes ) = $this->checkers( $dom, $source );
363
 
364
+ return [ 'type' => SourceType::SOURCE_HTML,
365
+ 'source' => $source,
366
+ 'dom' => $dom,
367
+ 'nodes' => $nodes,
368
+ 'regexes' => $regexes
369
+ ];
370
  }
371
 
372
+ public function parseJSON( $jsonString, $extraKeys = [] ) {
373
+ $checker = new JsonChecker( $this, $jsonString, $extraKeys );
374
+
375
  return $checker->handle();
376
  }
377
 
378
+ public function parseText( $text, $regex = null ) {
379
+
380
+ $this->getWords()->addOne( new WordEntry( $text, WordType::TEXT ) );
381
 
382
+ return array( "type" => SourceType::SOURCE_TEXT, "source" => $regex, "text" => $text );
 
383
  }
384
 
385
  /**
386
  * @param string $title
387
+ *
388
  * @return TranslateEntry
389
  * @throws ApiError
390
  * @throws InputAndOutputCountMatchException
392
  * @throws MissingRequiredParamException
393
  * @throws MissingWordsOutputException
394
  */
395
+ protected function apiTranslate( $title = null, $canonical = '' ) {
 
396
  // Translate endpoint parameters
397
  $params = [
398
  'language_from' => $this->getLanguageFrom(),
399
+ 'language_to' => $this->getLanguageTo()
400
  ];
401
 
402
  // if data is coming from $_SERVER, load it ...
403
+ if ( $this->getConfigProvider() instanceof ServerConfigProvider ) {
404
+ $this->getConfigProvider()->loadFromServer( $canonical );
405
  }
406
 
407
+ if ( $this->getConfigProvider()->getAutoDiscoverTitle() ) {
408
  $params['title'] = $title;
409
  }
410
+ $params = array_merge( $params, $this->getConfigProvider()->asArray() );
411
 
412
  try {
413
+ $translate = new TranslateEntry( $params );
414
+ $translate->setInputWords( $this->getWords() );
415
+ } catch ( \Exception $e ) {
416
+ die( $e->getMessage() );
417
  }
 
 
 
418
 
419
+ if (strpos($this->getConfigProvider()->getUrl(), '/404') !== false) {
420
+ $translate = new CdnTranslate($translate, $this->client);
421
+ }
422
+ else {
423
+ $translate = new Translate($translate, $this->client);
424
+ }
425
+ return $translate->handle();
426
  }
427
 
428
  /**
429
  * @param simple_html_dom $dom
430
+ *
431
  * @return string
432
  */
433
+ protected function getTitle( simple_html_dom $dom ) {
 
434
  $title = 'Empty title';
435
+ foreach ( $dom->find( 'title' ) as $k => $node ) {
436
+ if ( $node->innertext != '' ) {
437
  $title = $node->innertext;
438
  }
439
  }
440
+
441
  return $title;
442
  }
443
 
444
  /**
445
  * @param $dom
446
  * @param $source
447
+ *
448
  * @return array
449
  * @throws InvalidWordTypeException
450
  */
451
+ protected function checkers( $dom, $source ) {
452
+ $nodes = $this->getDomCheckerProvider()->handle( $dom );
453
+ $regexes = $this->getRegexCheckerProvider()->handle( $source );
 
454
 
455
  return [
456
  $nodes,
463
  * @param TranslateEntry $translateEntry
464
  * @param mixed $tree
465
  * @param int $index
466
+ *
467
  * @return string $source
468
  */
469
+ public function formatters( $source, TranslateEntry $translateEntry, $tree, &$index = 0 ) {
470
+ if ( empty( $tree['type'] ) ) {
 
471
  return $source;
472
  }
473
+ if ( $tree['type'] === SourceType::SOURCE_TEXT ) {
474
+ $source = str_replace( $tree['text'], $translateEntry->getOutputWords()[ $index ]->getWord(), $source );
475
+ $index ++;
476
  }
477
+ if ( $tree['type'] === SourceType::SOURCE_JSON ) {
478
+ $formatter = new JsonFormatter( $this, $source, $translateEntry );
479
+ $source = $formatter->handle( $tree, $index );
480
  }
481
+ if ( $tree['type'] === SourceType::SOURCE_HTML ) {
482
+ $formatter = new DomFormatter( $this, $translateEntry );
483
+ $formatter->handle( $tree['nodes'], $index );
484
  $source = $tree['dom']->save();
485
+ foreach ( $tree['regexes'] as $regex ) {
486
+ if ( empty( $regex['source'] ) ) {
487
  continue;
488
  }
489
+ $translatedRegex = $this->formatters( $regex['source'], $translateEntry, $regex, $index );
490
+ if ( $regex['revert_callback'] ) {
491
+ $translatedRegex = call_user_func( $regex['revert_callback'], $translatedRegex );
492
  }
493
 
494
+ if ( $regex['type'] === SourceType::SOURCE_TEXT && $regex['source'] == $regex['text'] ) {
495
+ $source = preg_replace( '#\b' . preg_quote( $regex['source'], '#' ) . '\b#', $translatedRegex, $source );
496
+ } else {
497
+ $source = str_replace( $regex['source_before_callback'], $translatedRegex, $source );
 
498
  }
499
  }
500
  }
501
+
502
  return $source;
503
  }
504
 
505
 
506
+ public static function getSourceType( $source ) {
507
+ if ( Text::isJSON( $source ) ) {
 
508
  return SourceType::SOURCE_JSON;
509
+ } elseif ( Text::isHTML( $source ) ) {
510
  return SourceType::SOURCE_HTML;
511
+ } else {
512
  return SourceType::SOURCE_TEXT;
513
+ }
514
  }
515
  }
vendor/weglot/weglot-php/src/Util/Url.php CHANGED
@@ -71,6 +71,8 @@ class Url
71
  */
72
  protected $customUrls;
73
 
 
 
74
  /**
75
  * Url constructor.
76
  * @param string $url Current visited url
@@ -169,6 +171,10 @@ class Url
169
  return $pathAndQuery;
170
  }
171
 
 
 
 
 
172
  /**
173
  * Returns the destination languages external codes
174
  * @return string[]
@@ -299,11 +305,11 @@ class Url
299
  }
300
  }
301
  }
 
302
  if($mustRedirect) {
303
- $this->path = "301_".implode('/' , $fully_translated_slug_array);
304
- } else {
305
- $this->path = implode('/' , $slugs);
306
  }
 
307
  }
308
 
309
  $url = $this->getHost() . $this->getPathPrefix() . $this->getPath();
71
  */
72
  protected $customUrls;
73
 
74
+ protected $redirect = null;
75
+
76
  /**
77
  * Url constructor.
78
  * @param string $url Current visited url
171
  return $pathAndQuery;
172
  }
173
 
174
+ public function getRedirect() {
175
+ return $this->redirect;
176
+ }
177
+
178
  /**
179
  * Returns the destination languages external codes
180
  * @return string[]
305
  }
306
  }
307
  }
308
+
309
  if($mustRedirect) {
310
+ $this->redirect = implode('/' , $fully_translated_slug_array);
 
 
311
  }
312
+ $this->path = implode('/' , $slugs);
313
  }
314
 
315
  $url = $this->getHost() . $this->getPathPrefix() . $this->getPath();
weglot.php CHANGED
@@ -7,7 +7,7 @@ Author: Weglot Translate team
7
  Author URI: https://weglot.com/
8
  Text Domain: weglot
9
  Domain Path: /languages/
10
- Version: 3.3.5
11
  */
12
 
13
  /**
@@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
22
  define( 'WEGLOT_NAME', 'Weglot' );
23
  define( 'WEGLOT_SLUG', 'weglot-translate' );
24
  define( 'WEGLOT_OPTION_GROUP', 'group-weglot-translate' );
25
- define( 'WEGLOT_VERSION', '3.3.5' );
26
  define( 'WEGLOT_PHP_MIN', '5.6' );
27
  define( 'WEGLOT_BNAME', plugin_basename( __FILE__ ) );
28
  define( 'WEGLOT_DIR', __DIR__ );
7
  Author URI: https://weglot.com/
8
  Text Domain: weglot
9
  Domain Path: /languages/
10
+ Version: 3.3.6
11
  */
12
 
13
  /**
22
  define( 'WEGLOT_NAME', 'Weglot' );
23
  define( 'WEGLOT_SLUG', 'weglot-translate' );
24
  define( 'WEGLOT_OPTION_GROUP', 'group-weglot-translate' );
25
+ define( 'WEGLOT_VERSION', '3.3.6' );
26
  define( 'WEGLOT_PHP_MIN', '5.6' );
27
  define( 'WEGLOT_BNAME', plugin_basename( __FILE__ ) );
28
  define( 'WEGLOT_DIR', __DIR__ );