Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function setDefaultLocale(locale: string) {
if (!locale || !isString(locale)) {
throw new Error('[I18n] A `locale` must be a non-empty string.');
}
defaultLocale = normalizeLocale(locale);
IntlMessageFormat.defaultLocale = defaultLocale;
IntlRelativeFormat.defaultLocale = defaultLocale;
}