mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
wip: refresh design
This commit is contained in:
11
packages/lib/server-only/headers/get-locale.tsx
Normal file
11
packages/lib/server-only/headers/get-locale.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user