You can try
export default (): string => { const { $i18n } = useNuxtApp(); const t = $i18n.t; return t('my-translation-key'); };
The answer from: https://stackoverflow.com/a/77288091/3680164