Skip to main content

getBrowserLocale

Returns the user's language, defined by its browser settings.

API

function getBrowserLocale(): string;

Usage

import { getBrowserLocale } from "@feedzai/js-utilities";

const LANGUAGE = getBrowserLocale();

console.log(`Your language is ${LANGUAGE}`); // Your language is en-GB