Skip to content

Function: locale() ​

ts
function locale(key?: string): string;

This function sets the current locale. If no arguments are passed in, it will simply return the current global locale key.

Parameters ​

ParameterType
key?string

Returns ​

string