1

next-i18next works but not on Safari.

I even set regional localizations in our Next.js app, because Safari usually does not pass hu but hu-hu. I would not create a separate translation json for regional differences. So both hu and hu-hu should use the Hungarian JSON in the subfolder. But strange though that english is loaded, when opening site in Safari. Why? Am I using something wrong? With i18next it all worked. Even the defaultLocale is set to hu.

const { nextI18NextRewrites } = require("next-i18next/rewrites");

const localeSubpaths = {
  hu: "hu",
  "hu-hu": "hu",
  "hu-HU": "hu",
  en: "en",
};

module.exports = {
  rewrites: async () => nextI18NextRewrites(localeSubpaths),
  publicRuntimeConfig: {
    localeSubpaths,
  },
  images: {
    domains: ["ticket-t01.s3.eu-central-1.amazonaws.com"],
  },
  defaultLocale: "hu",
};
János
  • 32,867
  • 38
  • 193
  • 353

1 Answers1

0

Try to use parameter:

load : 'languageOnly'
Griha Mikhailov
  • 655
  • 1
  • 9
  • 16