Multiple language codes


I have a site with an english language code (en-US) in the site settings. I need 2-3 pages in this site to have a different language code. How can I do this?

Can the language code be set in the head or body custom code on the individual pages? I only find examples of the language code being set in the html wrapper for the entire site.

You can’t have multiple values in the site settings but you can add the lang attribute to an element. See ->

1 Like

Hi @webdev

This nearly solved my problem! I need this language attribute on collection template page that is used for several languages.

I can set the language code in the CMS system and add it to HTML embed elements using dynamic fields, placing all texts and headings in embed elements.

The problem is that I have several rich text elements, that is not available from the dynamic fields dropdown.

Is it possible to set the language attributes in the head/body tag to affect all the content on the collection template page? :thinking:

Can’t you use the before head custom code area on the template page?

That would be an ideal solution. Do you know how this code would look like? I can’t find any examples and it’s a bit beyond my copy-paste coding skills😬