Skip to main content
All CollectionsProjects
How to change the language HTML attribute to a different language
How to change the language HTML attribute to a different language
Julius avatar
Written by Julius
Updated over a week ago

The default language attribute (lang) is English (en). If you are creating a website using ExploreMyPC in another language you might want to change the HTML language declaration to your preferred language. Here is how to do it:

You'll use our Code Injection feature that lets you inject scripts in the header (or footer) of your website.

Step 1. Copy the following code

<script>
const html = document.querySelector("html");
if (html) {
html.setAttribute("lang", "es");
}
</script>

Where "es" is the language parameter. You'll need to change that to your preferred language. Find all the language tags in the IANA Language Subtag Registry.

Step 2. Paste the code in the Header section in our Code Injection feature.

lang.png

Step 3. Press the Save Changes button.


Did this answer your question?