# Next.js Internationalisierung (React / Next.js) > next-intl, Locale-Routing, Übersetzungen, Datums-/Zeitformatierung, RTL-Unterstützung, dynamisches Locale-Wechseln - 20 Interview-Fragen - Senior - [Interview-Fragen: React / Next.js](https://sharpskill.dev/de/technologies/react-next/interviewfragen.md) ## 1. Was ist die Hauptaufgabe der middleware.ts-Datei in einer Next.js-Anwendung mit next-intl? **Antwort** Die next-intl-Middleware erkennt automatisch die Locale des Benutzers (über Accept-Language-Header, Cookies oder URL) und leitet zur entsprechenden URL mit dem Locale-Präfix weiter. Sie wird vor jeder Anfrage ausgeführt und verwaltet die Locale-Aushandlung ohne zusätzlichen Code in Komponenten. Sie ist der erforderliche Einstiegspunkt zur Aktivierung des i18n-Routings im Next.js App Router. ## 2. Wo sollten Übersetzungsdateien in next-intl für eine optimale Projektstruktur abgelegt werden? **Antwort** Übersetzungsdateien werden in messages/[locale].json im Projektstamm abgelegt (z.B. messages/fr.json, messages/en.json). Diese Konvention erleichtert die Erkennung von Übersetzungen und ermöglicht next-intl das automatische Laden über die i18n-Konfiguration. Einige Projekte verwenden auch messages/[locale]/ mit separaten Dateien pro Namespace für eine bessere Organisation. ## 3. Was ist der Hauptunterschied zwischen useTranslations und getTranslations in next-intl? **Antwort** useTranslations ist ein synchroner React-Hook für Client Components, während getTranslations eine async-Funktion für Server Components ist. getTranslations ermöglicht das Abrufen von Übersetzungen serverseitig, ohne JavaScript an den Client zu senden, was die Performance verbessert. useTranslations ist für interaktive Komponenten erforderlich, die die use client-Direktive benötigen. ## 17 weitere Fragen verfügbar - Wie konfiguriert man unterstützte Locales in next-intl? - Was ist die Syntax zur Verwendung von Variablen in einer next-intl-Übersetzung? Kostenlos registrieren: https://sharpskill.dev/de/login ## Weitere React / Next.js-Interviewthemen - [JavaScript-Grundlagen](https://sharpskill.dev/de/technologies/react-next/interviewfragen/javascript-essentials.md): 25 Fragen, Junior - [React-Grundlagen](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-fundamentals.md): 20 Fragen, Junior - [React Hooks](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-hooks.md): 22 Fragen, Junior - [Komponentenlebenszyklus](https://sharpskill.dev/de/technologies/react-next/interviewfragen/component-lifecycle.md): 18 Fragen, Junior - [React Router](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-router.md): 20 Fragen, Junior - [Zustandsverwaltung mit Context](https://sharpskill.dev/de/technologies/react-next/interviewfragen/state-management-context.md): 18 Fragen, Junior - [Formulare & Controlled Components](https://sharpskill.dev/de/technologies/react-next/interviewfragen/forms-controlled-components.md): 20 Fragen, Mid-Level - [Datenabruf & API](https://sharpskill.dev/de/technologies/react-next/interviewfragen/fetching-data-api.md): 20 Fragen, Mid-Level - [React Query (TanStack Query)](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-query-tanstack.md): 20 Fragen, Mid-Level - [Styling & CSS-in-JS](https://sharpskill.dev/de/technologies/react-next/interviewfragen/styling-css-in-js.md): 18 Fragen, Mid-Level - [Next.js Grundlagen](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-fundamentals.md): 25 Fragen, Mid-Level - [TypeScript mit React](https://sharpskill.dev/de/technologies/react-next/interviewfragen/typescript-react.md): 20 Fragen, Mid-Level - [Next.js Data Fetching](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-data-fetching.md): 24 Fragen, Mid-Level - [Next.js Server Actions](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-server-actions.md): 20 Fragen, Mid-Level - [Routing & Navigation in Next.js](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-routing-navigation.md): 22 Fragen, Mid-Level - [Next.js API Routes](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-api-routes.md): 20 Fragen, Mid-Level - [Next.js Metadata & SEO](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-metadata-seo.md): 18 Fragen, Mid-Level - [Next.js Middleware & Auth](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-middleware-auth.md): 22 Fragen, Mid-Level - [React Testing](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-testing.md): 20 Fragen, Mid-Level - [Zustand State Management](https://sharpskill.dev/de/technologies/react-next/interviewfragen/zustand-state-management.md): 18 Fragen, Mid-Level - [React Performance-Optimierung](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-performance-optimization.md): 22 Fragen, Senior - [Error Boundaries & Error Handling](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-error-boundaries.md): 18 Fragen, Senior - [Advanced React Patterns](https://sharpskill.dev/de/technologies/react-next/interviewfragen/advanced-react-patterns.md): 20 Fragen, Senior - [Erweiterte Next.js-Funktionen](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-advanced-features.md): 24 Fragen, Senior - [Next.js Deployment & Produktion](https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-deployment-production.md): 20 Fragen, Senior - [Architecture & Design Patterns](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-architecture-patterns.md): 22 Fragen, Senior - [React Server Components](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-server-components.md): 26 Fragen, Senior - [React Sicherheit & Best Practices](https://sharpskill.dev/de/technologies/react-next/interviewfragen/react-security-best-practices.md): 22 Fragen, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/de/technologies/react-next/interviewfragen/nextjs-internationalization