import { defineRouting } from 'next-intl/routing';

export const routing = defineRouting({
  locales: [
    'en-GB', 'de-DE', 'fr-FR', 'es-ES', 'it-IT', 'nl-NL', 'pl-PL', 'pt-PT',
    'ja-JP', 'ko-KR', 'ru-RU', 'uk-UA', 'sr-RS', 'mk-MK', 'bg-BG', 'hr-HR',
    'sl-SI', 'sr-ME', 'bs-BA', 'sq-AL', 'el-GR',
  ],
  defaultLocale: 'en-GB',
  localePrefix: 'as-needed',
  // Disable automatic locale detection from Accept-Language headers.
  // Without this, the middleware issues a 302 redirect on every request to /
  // based on the visitor's browser language — causing Google to classify the
  // page as a redirect and users to land on unexpected locale URLs.
  localeDetection: false,
});
