mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
12 lines
234 B
TypeScript
12 lines
234 B
TypeScript
import { headers } from 'next/headers';
|
|
|
|
export const getLocale = () => {
|
|
const headerItems = headers();
|
|
|
|
const locales = headerItems.get('accept-language') ?? 'en-US';
|
|
|
|
const [locale] = locales.split(',');
|
|
|
|
return locale;
|
|
};
|