Translations
locale
$locale
$locale returns the language code Discord sends with the interaction, such as fr, en-US or pt-BR. It is empty when there is no interaction (a text command, an event, a schedule).
Syntax
$locale
Return value
- A Discord locale code, or an empty text.
Examples
$if[$locale==fr]
Bonjour !
$endif
See also $guildLocale and $t.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.