i18next / next-app-dir-i18next-example

Next.js 13/14 app directory feature in combination with i18next
https://locize.com/blog/next-app-dir-i18n/
175 stars 38 forks source link

Use Translations from multiple sources at once #33

Closed creib closed 11 months ago

creib commented 11 months ago

Hi, is it also possible to read from multiple translation files at the same time? Something like const { t } = useTranslation(['page1-text', 'common'])

Thanks a lot

adrai commented 11 months ago

yes

adrai commented 11 months ago
const { t } = useTranslation(lng, ['page1-text', 'common'])

t('key', { ns: 'common' })