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

151
Views
¿Cómo puedo traducir la página con JS?

Soy realmente nuevo en JavaScript y me preguntaba qué objeto en JS podría usar para traducir (en el idioma) ciertos elementos identificados cuando hago clic en un enlace. Por ejemplo, cuando hago clic en un enlace que dice:

Traducir al alemán

Toda la página se traducirá al alemán.

Entiendo que puedo usar getElementByID, pero realmente no sé específicamente cómo.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puedes usar Google Translate. Aquí hay un ejemplo (tomado de W3Schools):

 <!DOCTYPE html> <html lang="en-US"> <body> <h1>My Web Page</h1> <p>Hello everybody!</p> <p>Translate this page:</p> <div id="google_translate_element"></div> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', includedLanguages: 'de,en' // remove this line if you want to include all languages },'google_translate_element'); } </script> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> <p>You can translate the content of this page by selecting a language in the select box.</p> </body> </html>

Míralo en vivo aquí

about 4 years ago · Juan Pablo Isaza Report
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!