Pulled ALL skills from 15 source repositories: - anthropics/skills: 16 (docs, design, MCP, testing) - obra/superpowers: 14 (TDD, debugging, agents, planning) - coreyhaines31/marketingskills: 25 (marketing, CRO, SEO, growth) - better-auth/skills: 5 (auth patterns) - vercel-labs/agent-skills: 5 (React, design, Vercel) - antfu/skills: 16 (Vue, Vite, Vitest, pnpm, Turborepo) - Plus 13 individual skills from various repos Mosaic Stack is not limited to coding — the Orchestrator and subagents serve coding, business, design, marketing, writing, logistics, analysis, and more. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
58 lines
1.4 KiB
Markdown
58 lines
1.4 KiB
Markdown
---
|
|
category: Sensors
|
|
---
|
|
|
|
# useNavigatorLanguage
|
|
|
|
Reactive [navigator.language](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language).
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import { useNavigatorLanguage } from '@vueuse/core'
|
|
|
|
const { language } = useNavigatorLanguage()
|
|
|
|
watch(language, () => {
|
|
// Listen to the value changing
|
|
})
|
|
```
|
|
|
|
## Type Declarations
|
|
|
|
```ts
|
|
export interface NavigatorLanguageState {
|
|
isSupported: ComputedRef<boolean>
|
|
/**
|
|
*
|
|
* ISO 639-1 standard Language Code
|
|
*
|
|
* @info The detected user agent language preference as a language tag
|
|
* (which is sometimes referred to as a "locale identifier").
|
|
* This consists of a 2-3 letter base language tag that indicates a
|
|
* language, optionally followed by additional subtags separated by
|
|
* '-'. The most common extra information is the country or region
|
|
* variant (like 'en-US' or 'fr-CA').
|
|
*
|
|
*
|
|
* @see https://www.iso.org/iso-639-language-codes.html
|
|
* @see https://www.loc.gov/standards/iso639-2/php/code_list.php
|
|
*
|
|
*/
|
|
language: ShallowRef<string | undefined>
|
|
}
|
|
/**
|
|
*
|
|
* Reactive useNavigatorLanguage
|
|
*
|
|
* Detects the currently selected user language and returns a reactive language
|
|
* @see https://vueuse.org/useNavigatorLanguage
|
|
*
|
|
* @__NO_SIDE_EFFECTS__
|
|
*/
|
|
export declare function useNavigatorLanguage(
|
|
options?: ConfigurableWindow,
|
|
): Readonly<NavigatorLanguageState>
|
|
export type UseNavigatorLanguageReturn = ReturnType<typeof useNavigatorLanguage>
|
|
```
|