Jump to content
View in the app

A better way to browse. Learn more.

Learn more

How to change the language specified in the HTML tag? <html lang="en-US">

Featured Replies

I'm creating some pages in French on my site, and I need to change the HTML tag from <html lang="en-US"> to <html lang="fr-FR">

Where do I make that change?

  • Author
Just now, Jim M said:

This would be done via the locale of the language pack in use.

Thank you. Is that the only way?

Ideally I'd like to have most of my site in English with only a dozen pages in French.

Can I have a specific page (or theme) have its own default language?

1 minute ago, David N. said:

Thank you. Is that the only way?

Ideally I'd like to have most of my site in English with only a dozen pages in French.

Can I have a specific page (or theme) have its own default language?

This would be the only way that does not require some form of customization ;) .

  • Author

Thanks.

What kind of customization are you referring to? Is that something I could do myself, or would it require work on your end?

25 minutes ago, David N. said:

What kind of customization are you referring to? Is that something I could do myself, or would it require work on your end?

That would be done on your end. Customizations are outside our scope of support.

  • Author
10 minutes ago, Jim M said:

That would be done on your end. Customizations are outside our scope of support.

Understood. Ok, thanks for your answers.

  • Community Expert
8 hours ago, David N. said:

Ideally I'd like to have most of my site in English with only a dozen pages in French.

Will the entire page be in French, including the navigation, user panel, footer, etc? Or just the content area?

If it's just the content area, you should keep the lang attribute as en-US on the <html> element, because you'll have English content in the header/footer. You could then wrap your French content on your custom pages using:

<div lang="fr-FR">

</div>
  • Author
7 hours ago, Ehren said:

Will the entire page be in French, including the navigation, user panel, footer, etc? Or just the content area?

If it's just the content area, you should keep the lang attribute as en-US on the <html> element, because you'll have English content in the header/footer. You could then wrap your French content on your custom pages using:

<div lang="fr-FR">

</div>

Great! Thanks a lot Ehren, that makes sense.

Recently Browsing 0

  • No registered users viewing this page.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.