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 startClient() {
console.log('nav', getLocaleFromNavigator());
init({
...INIT_OPTIONS,
initialLocale: getCookie('locale') || INIT_OPTIONS.localeOptions.find(option => option == cropCountryCode(getLocaleFromNavigator())) || INIT_OPTIONS.initialLocale,
});
}
export default async () => {
let locale = getLocaleFromNavigator();
if (process.env.AVAILABLE_LOCALES && process.env.AVAILABLE_LOCALES.indexOf(locale) < 0) {
locale = locale.split("-")[0];
}
const messages = await import(`@/locales/${locale}.json`);
addMessages(locale, messages.default);
init({
fallbackLocale: "en",
initialLocale: locale,
});
};
initialLocale: getCookie('locale') || INIT_OPTIONS.localeOptions.find(option => option == cropCountryCode(getLocaleFromNavigator())) || INIT_OPTIONS.initialLocale,
});