---
schema_version: "1"
id: 1816406a7899070cf9a493d2fecf5d31c7c71db03914bdd2045472d29c07afd9
title: Use the Host Site Language in ECv2
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-web/guides/use-host-site-language.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-web/guide/use-host-site-language.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: afebd8b4e2b559e06759d356fab7adb127cc0e30ee1aed2caea9b44fc81b2ee7
products:
  - Enhanced Web Chat
  - Service Cloud Developer Content
---
# Use the Host Site Language in ECv2

**important:** This setting is only available in Enhanced Web Chat v2 (ECv2) on Lightning Web Runtime (LWR) sites.

By default, the Enhanced Chat client loads inside an iframe with the language attribute set to English. This default prevents the chat client from inheriting the host site's language and can cause base Lightning components to render in the wrong language. To have Enhanced Chat v2 inherit the language configured on your Experience Cloud site, enable the `useHostSiteLanguage` setting snippet.

**note:** This setting is opt-in to prevent unintended changes to existing deployments.

For the syntax and default value, see [`useHostSiteLanguage`](/docs/service/messaging-web/references/m4w-reference/settingsAPI.html) in the Settings reference.

## Prerequisites

Before you enable `useHostSiteLanguage`, add each language you want to support to your LWR site. To add a language to your LWR site, see [Add a Language to Your LWR Site](https://developer.salesforce.com/docs/atlas.en-us.exp_cloud_lwr.meta/exp_cloud_lwr/multilingual_lwr_add_language.htm) in the Experience Cloud Developer Guide.

The ECv2 runtime can't validate whether a language is supported by your site, so you must configure the languages in your digital experience first. If you skip these steps, users can encounter 404 errors when the chat client attempts to load an unsupported language.

## Troubleshooting

- **404 errors when the chat client loads:** If users see 404 errors, the requested language isn't configured on the LWR site. Confirm that you completed the prerequisite steps in [Add a Language to Your LWR Site](https://developer.salesforce.com/docs/atlas.en-us.exp_cloud_lwr.meta/exp_cloud_lwr/multilingual_lwr_add_language.htm) for each language you want to support.
- **Chat still loads in English after enabling the setting:** Verify that the host site's active language matches a language you've added to the LWR site, and that the deployment was republished after you enabled the setting.
