Introduction

Prelude automatically detects the language of the phone number from the country code and sends the verification message in the appropriate language.

However, you can also specify a custom language for the message by setting the options.locale parameter on the POST /v2/verification endpoint.

options.locale
string

A BCP-47 formatted locale string with the language the text message will be sent to. If there’s no locale set, the language will be determined by the country code of the phone number. If the language specified doesn’t exist, it defaults to US English.

BCP-47 Format

The locale parameter uses the BCP-47 format to specify the language of the message.

The BCP-47 format is a standard for identifying languages and their variants. It is a two-letter language code followed by a dash and a two-letter country code. For example, en-US is US English and fr-FR is French from France.

When you send a locale, Prelude will try to find the closest match for the language and country code. If it doesn’t find a match, it will default to US English.

Supported locales

Prelude currently supports the following languages to send verification messages:

  • Arabic (ar)
  • Bulgarian (bg)
  • Chinese (zh)
  • Czech (cs)
  • Danish (da)
  • Dutch (nl)
  • English (en)
  • French (fr)
  • German (de)
  • Greek (el)
  • Hebrew (he)
  • Hungarian (hu)
  • Italian (it)
  • Japanese (ja)
  • Latvian (lv)
  • Lithuanian (lt)
  • Macedonian (mk)
  • Norwegian (no)
  • Polish (pl)
  • Portuguese (pt)
  • Romanian (ro)
  • Russian (ru)
  • Slovak (sk)
  • Spanish (es)
  • Swiss German (de-CH)
  • Turkish (tr)
  • Ukrainian (uk)
  • Vietnamese (vi)

If a language is not listed above and you need it for your implementation, please contact our support team to get it added to the list.