• Get the client's locales from the Accept-Language header. If the header is not defined returns null. If the header is defined return an array of locales, sorted by the quality value.

    Parameters

    Returns Locales

    export async function loader({ request }: LoaderFunctionArgs) {
    let locales = getClientLocales(request)
    let date = new Date().toLocaleDateString(locales, {
    "day": "numeric",
    });
    return json({ date })
    }
  • Get the client's locales from the Accept-Language header. If the header is not defined returns null. If the header is defined return an array of locales, sorted by the quality value.

    Parameters

    Returns Locales

    export async function loader({ request }: LoaderFunctionArgs) {
    let locales = getClientLocales(request)
    let date = new Date().toLocaleDateString(locales, {
    "day": "numeric",
    });
    return json({ date })
    }