useLocale #

The locale of the current route, and the links to the same page in every locale.

Usage #

TypeScript
import { 
useLocale
} from 'kawapress/client'
const {
locale
,
locales
} =
useLocale
()
console
.
log
(
locale
.
value
?.
label
,
locales
.
value
.
length
)

Returns The current locale and the locale links.

Full type signature
TypeScript
function useLocale(): LocaleContext

Edit this page

Comments