Astro + Hybrid + i18Next (SSR, SSG)


I’m a bit new with Astro. Issue as follows:

export default defineConfig({
output: ‘hybrid’,
integrations: [
defaultLocale: ‘en’,
locales: [‘en’, ‘es’],
ssr: true,
resourcesBasePath: ‘/public/locales’
adapter: netlify(),

Anything that I could be missing?


Hi @Zigor, thanks for the post and welcome.
Kindly make sure that your translations are organized in the correct folder structure under /public/locales . For example, you should have folders like /public/locales/en and /public/locales/es with the translation files inside.

If the above does not work, you can go to the Official Astro GitHub issues page below and then try to also get help there.


1 Like

Thanks for your answer.

1 Like

I got the SSR working adding the files as resources in the astro-i18next.config file:

import en from ‘./public/locales/en/translation.json’ assert { type: ‘json’ }
import es from ‘./public/locales/es/translation.json’ assert { type: ‘json’ }

and then:

i18nextServer: {
resources: {
en: {
translation: {
es: {
translation: {

Thanks for your advice.

1 Like

thanks for sharing this!

1 Like