Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.92 KB

File metadata and controls

41 lines (32 loc) · 1.92 KB

@intlify/h3


@intlify/h3

Internationalization middleware & utilities for h3

Functions

Function Description
defineI18nMiddleware define i18n middleware for h3
detectLocaleFromAcceptLanguageHeader locale detection with Accept-Language header
getCookieLocale get locale from cookie
getHeaderLanguage get language from header
getHeaderLanguages get languages from header
getHeaderLocale get locale from header
getHeaderLocales get locales from header
getPathLocale get the locale from the path
getQueryLocale get the locale from the query
setCookieLocale set locale to the response Set-Cookie header.
tryCookieLocale try to get locale from cookie
tryHeaderLocale try to get locale from header
tryHeaderLocales try to get locales from header
tryPathLocale try to get the locale from the path
tryQueryLocale try to get the locale from the query
useTranslation use translation function in event handler

Interfaces

Interface Description
DefineLocaleMessage The type definition of Locale Message for @intlify/h3 package
I18nMiddleware i18n middleware for h3

Type Aliases

Type Alias Description
CoreContext -