mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 17:13:56 +00:00
7 lines
195 B
TypeScript
7 lines
195 B
TypeScript
|
import { useState } from '#app'
|
||
|
|
||
|
export default defineNuxtPlugin((nuxt) => {
|
||
|
const locale = useState('locale')
|
||
|
locale.value = nuxt.ssrContext.req.headers['accept-language']?.split(',')[0]
|
||
|
})
|