Set a custom language for your site

by Matt Bilotti

Say you have two versions of your website, one in English and one in German. How do you use the same widget on both sites, but specify the appropriate language for each? Now you can just by adding a little extra configuration to your Drift snippet...

<!-- Start of Async Drift Code -->
// ...
drift.SNIPPET_VERSION = '0.3.0';
 locale: "de-DE"
<!-- End of Async Drift Code -->

Notice this little bit at the end that we added manually...

 locale: "de-DE"

Make sure you grab the latest snippet for your Drift account from to use this new config method.

If you just want to change the language of your widget on all sites, there's no custom code necessary. Head on over to this help doc to see how.

If this is helpful please let us know! If there are other parameters you'd like to override on a per-site basis just chat with us and let us know what else you'd like to see added.

Supported language codes

  • en
  • es
  • de
  • de-DE
  • de-DE-formal
  • hi
  • hu
  • et
  • is
  • nl
  • pt
  • pt-PT
  • pt-BR
  • sv
  • zh
  • fr
  • it
  • tr
  • ru
  • pl
  • sl
  • da
  • fi
  • hr
  • ko
  • nb
  • ro
  • sr
  • th
  • vi

Additional customization options

When using a language separate from your account default configuration, you will need update the Welcome message and Away message content as well. Here is the configuration option to set that up:

  locale: "fr",
  messages: {
    welcomeMessage: "Translated Welcome Message Here",
    awayMessage: "Translated Away Message Here"
Be sure to replace the "Translated..." messages with what you'd like yours to be.

Was this article helpful?