amannn / next-intl

🌐 Internationalization (i18n) for Next.js
https://next-intl-docs.vercel.app
MIT License
2.58k stars 236 forks source link

Is it possible to load more than one translation? #1230

Closed pedroota closed 3 months ago

pedroota commented 3 months ago

Is your feature request related to a problem? Please describe.

I've always wondered if is it possible to load more than one translation at a time, for example:

` const home = () => { const t = useTranslations(["HomePage", "utils"])

return

{t('home.title')} {t('utils.buy_now')}</p

} `

Describe the solution you'd like

`const home = () => { const t = useTranslations(["HomePage", "utils"])

return

{t('home.title')} {t('utils.buy_now')}</p

}`

Describe alternatives you've considered

`const home = () => { const t = useTranslations(["HomePage", "utils"])

return

{t('home.title')} {t('utils.buy_now')}</p

}`

amannn commented 3 months ago

This has been discussed a few times already: https://github.com/amannn/next-intl/issues/217