Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
Google Translate Element get current language

I am using Google translate on my website with:

let lang = new google.translate.TranslateElement({pageLanguage: 'pt', autoDisplay: false}, 'google_translate_element');

Now I want to get the current language so I do console.log(lang) which gives me:

enter image description here

In "P" I find the language but I am not able to access "P"

console.log(google.translate.TranslateElement('google_translate_element').P)
console.log(google.translate.TranslateElement('google_translate_element')['P'])

all just return undefined.

Any idea how to get that "en"?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!