Knowledge base
Guides
Academy
Video tutorials
Try searching for:
Recently viewed articles:

Table of contents

Forcing language selection in your storefront

If you have a multilingual catalog, Ecwid automatically detects the preferred language of your customers’ browsers and shows your store in that language.

In some cases, you might want to add your store in a specific language to a webpage, regardless of the browser language detection. You can force a language by following these steps:

  1. Enable the necessary language in your store and translate your catalog into it.
  2. Add the "lang" variable to all inclusions of the "script.js" file in Ecwid widgets that you have in the source code of your web page:

    <script type="text/javascript" src="https://app.ecwid.com/script.js? YOUR_STORE_ID&lang=LOCALE_CODE" charset="utf-8"> </script>

    Instead of LOCALE_CODE you should put the two-letter code of the language that you want to use on this page — for example, en for English, es for Spanish, fr for French, de for German, etc (also, make sure that instead of YOUR_STORE_ID there is your actual Store ID.)

Example: You’ve enabled French as an additional language, added your catalog translations into French and wish to show your whole store in French to everyone in a certain site page. In this case, your Ecwid widget in that webpage source code must contain the lang=fr variable:

<script type="text/javascript" src="https://app.ecwid.com/script.js?1003&lang=fr" charset="utf-8"> </script>

If you’ve added your multilingual Ecwid store to a multilingual Wix, multilingual Wordpress site, or Ecwid Instant Site, your customers can use their language switcher to change the language for the entire site, including the store.
If you want to always display your store to all store visitors in one language only, you should remove additional languages, if any, and set the necessary language as the default store language.

Related articles

Offering your store in multiple languages
Changing your store language
Changing texts in your Ecwid store

Was this article helpful?

Awesome! Thanks for your feedback!

Thanks for your feedback!

Sorry about that! What went wrong?
4 out of 7 found this helpful
10
We use cookies and similar technologies to remember your preferences, measure effectiveness of our campaigns, and analyze depersonalized data to improve performance of our site. By choosing «Accept», you consent to the use of cookies.
Accept cookies Decline