diff --git a/src/runtime/index.ts b/src/runtime/index.ts index 95b93f2..f54ecda 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -1,3 +1,3 @@ -export { useI18n } from './useI18n.js' +export { useI18n, useVIntl } from './useI18n.js' export { useFormatters } from './useFormatters.js' export { useTranslate } from './useTranslate.js' diff --git a/src/runtime/useI18n.ts b/src/runtime/useI18n.ts index ff70eec..d3a313d 100644 --- a/src/runtime/useI18n.ts +++ b/src/runtime/useI18n.ts @@ -9,7 +9,7 @@ import type { IntlController } from '../controller.js' * @throws If controller cannot be found in the current application or current * application cannot be determined (called outside of `setup()` call). */ -export function useI18n() { +export function useVIntl() { const controller = inject(controllerKey) if (controller == null) { @@ -20,3 +20,13 @@ export function useI18n() { return controller as IntlController } + +/** + * Alias for {@link useVIntl}. + * + * @deprecated This composable name is deprecated and will be removed in next + * major version. Please use {@link useVIntl} instead. + */ +export function useI18n() { + return useVIntl() +}