NativePDF: How to access the 'lang' attribute from the merged HTML file | Community
Skip to main content
September 26, 2024
Solved

NativePDF: How to access the 'lang' attribute from the merged HTML file

  • September 26, 2024
  • 1 reply
  • 629 views

Using JavaScript I would like to find out what the 'lang' attribute variable is set to. I have used:

  • document.getAttribute('lang').value;
  • document.head.parentNode.getAttribute('lang').value;
  • document.body.parentNode.getAttribute('lang').value;
  • document.querySelector('html').getAttribute('lang').value;

without success.

 

Is it possible and if so, how do I get the value?

 

Thanks in advance

 

Tony

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by PrashantPa

Hello @tholtham ,

 

Can you please try to use below :

document.documentElement.getAttribute('lang');

Please let me know if this solution works.

 

Thanks,

Prashant

 

 

 

1 reply

PrashantPaAdobe EmployeeAccepted solution
Adobe Employee
September 27, 2024

Hello @tholtham ,

 

Can you please try to use below :

document.documentElement.getAttribute('lang');

Please let me know if this solution works.

 

Thanks,

Prashant

 

 

 

THolthamAuthor
September 27, 2024

That worked perfectly. Thank you.