MCPcopy
hub / github.com/lingodotdev/lingo.dev / loadLocaleFromHeaders

Function loadLocaleFromHeaders

packages/react/src/rsc/utils.ts:19–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 * ```
18 */
19export async function loadLocaleFromHeaders() {
20 const requestHeaders = await headers();
21 const result = requestHeaders.get(LOCALE_HEADER_NAME);
22 return result;
23}
24
25/**
26 * Gets the current locale code from the `"lingo-locale"` cookie.

Callers 1

utils.spec.tsFile · 0.90

Calls 1

getMethod · 0.65

Tested by

no test coverage detected