Skip to main content

LOCALE_REGEX

Stentor API Reference


Stentor API Reference / stentor-locales/src / LOCALE_REGEX

Variable: LOCALE_REGEX

const LOCALE_REGEX: RegExp

Defined in: packages/stentor-locales/src/Constants.ts:14

Dialogflow follows the language tag specifications here:

https://tools.ietf.org/html/rfc2616#section-3.10

Alexa does not specify a specification it falls under, but so far, all locales fit the same pattern.

And while the specification says that it can be only ALPHA characters, there is at least one language tag in Google that does not follow this pattern (es-419). So we must include numbers as well for any subtag.