diff --git a/README.md b/README.md index 46b6c4a..adeaf8a 100644 --- a/README.md +++ b/README.md @@ -297,16 +297,21 @@ The advantage of this way is that it is not necessary to specify the resource sc - `getHeaderLocale(event, options)`: get locale from `accept-language` header - `getHeaderLocales(event, options)`: get some locales from `accept-language` header +- `tryHeaderLocale(event, options)`: try to get locale from `accept-language` header +- `tryHeaderLocales(event, options)`: try to get some locales from `accept-language` header ### Cookies - `getCookieLocale(event, options)`: get locale from cookie +- `tryCookieLocale(event, options)`: try to get locale from cookie - `setCookieLocale(event, options)`: set locale to cookie ### Misc - `getPathLocale(event, options)`: get locale from path +- `tryPathLocale(event, options)`: try to get locale from path - `getQueryLocale(event, options)`: get locale from query +- `tryQueryLocale(event, options)`: try to get locale from query ## Helpers diff --git a/bun.lockb b/bun.lockb index 697de6e..97d2e26 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 4849d00..269abad 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,6 @@ }, "dependencies": { "@intlify/core": "^9.8.0", - "@intlify/utils": "^0.11.1" + "@intlify/utils": "^0.12.0" } } diff --git a/src/index.ts b/src/index.ts index 27eeda9..511118c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,16 +3,7 @@ import { createCoreContext, NOT_REOSLVED, translate as _translate } from '@intlify/core' import { getHeaderLocale } from '@intlify/utils/h3' -export { - getCookieLocale, - getHeaderLanguage, - getHeaderLanguages, - getHeaderLocale, - getHeaderLocales, - getPathLocale, - getQueryLocale, - setCookieLocale, -} from '@intlify/utils/h3' +export * from '@intlify/utils/h3' export type { CoreContext } from '@intlify/core'