Courses • Unity Assets • PlayStore • Hosting • Channel • بالعربي

Ahmad Naser Navigation
  • Home
    • Apps
    • Arabic Website
    • Our Academy
    • Udemy Courses
    • Certification
    • Youtube
    • Code Snippets
  • About
    • About Us
    • Services
    • Apps
    • Clients
    • Projects
    • Professional Training
  • Courses
  • My Account
  • Shop
    • Go Shopping
    • Online Coaching
    • One-To-One Training Pricing
    • Hosting
    • Cart
    • Checkout
  • Blog
  • Contact
  • 0 Items$0.00
  • Home
    • Apps
    • Arabic Website
    • Our Academy
    • Udemy Courses
    • Certification
    • Youtube
    • Code Snippets
  • About
    • About Us
    • Services
    • Apps
    • Clients
    • Projects
    • Professional Training
  • Courses
  • My Account
  • Shop
    • Go Shopping
    • Online Coaching
    • One-To-One Training Pricing
    • Hosting
    • Cart
    • Checkout
  • Blog
  • Contact
  • 0 Items$0.00
Home Gist doGTranslate(this) using jQuery handing manual translation into Arabic
back to snippest | Comment | Share

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script>
jQuery(document).ready(function($){
 
//original_text_dafault_language
var _text1 = jQuery('.elementor-widget.elementor-widget-heading > div > h1').html();
 
 
function languageHandle(){
var lang = jQuery("html").attr('lang');
if(lang == 'ar'){
//arabic code here start
     console.log(lang);
jQuery('.elementor-widget.elementor-widget-heading > div > h1').html("أوجد رحلتك المميزة معنا");
//end of arabic code
}else{
  console.log(lang);
  //reset to default language
  jQuery('.elementor-widget.elementor-widget-heading > div > h1').html(_text1);
  
}
}
 
 
//handle on document load
var ArabicVar = window.setInterval(function(){
  languageHandle();
  clearInterval(ArabicVar);
},3000);
//handle on select menu changed for google translate
jQuery( "#gtranslate_selector" ).change(function() {
var ArabicVar = window.setInterval(function(){
  languageHandle();
  clearInterval(ArabicVar);
},3000);
});
 
});
 
</script>