feat(i18n): Integrate next-intl, localize core UI, add regional locales and zh-TW Discover sources
**Overview**
- Integrates next-intl (App Router, no i18n routing) with cookie-based locale and Accept-Language fallback.
- Adds message bundles and regional variants; sets en-US as the default.
**Key changes**
- i18n foundation
- Adds request-scoped config to load messages per locale and injects NextIntlClientProvider in [layout.tsx]
- Adds/updates messages for: en-US, en-GB, zh-TW, zh-HK, zh-CN, ja, ko, fr-FR, fr-CA, de.
Centralizes LOCALES, LOCALE_LABELS, and DEFAULT_LOCALE in [locales.ts]
- Adds LocaleSwitcher (cookie-based) and [LocaleBootstrap]
- Pages and components
- Localizes Sidebar, Home (including metadata/manifest), Settings, Discover, Library.
- Localizes common components: MessageInput, Attach, Focus, Optimization, MessageBox, MessageSources, SearchImages, SearchVideos, EmptyChat, NewsArticleWidget, WeatherWidget.
- APIs
- Weather API returns localized condition strings server-side.
- UX and quality
- Converts all remaining <img> to Next Image.
- Updates browserslist/caniuse DB to silence warnings.
- Security: Settings API Key inputs are now password fields and placeholders were removed.
2025-08-16 12:27:18 +08:00
|
|
|
import createNextIntlPlugin from 'next-intl/plugin';
|
|
|
|
|
|
2024-04-09 16:21:05 +05:30
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
|
const nextConfig = {
|
2025-03-20 09:46:50 +05:30
|
|
|
output: 'standalone',
|
2024-04-09 16:21:05 +05:30
|
|
|
images: {
|
|
|
|
|
remotePatterns: [
|
|
|
|
|
{
|
|
|
|
|
hostname: 's2.googleusercontent.com',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
2025-03-18 11:29:04 +05:30
|
|
|
serverExternalPackages: ['pdf-parse'],
|
2024-04-09 16:21:05 +05:30
|
|
|
};
|
|
|
|
|
|
feat(i18n): Integrate next-intl, localize core UI, add regional locales and zh-TW Discover sources
**Overview**
- Integrates next-intl (App Router, no i18n routing) with cookie-based locale and Accept-Language fallback.
- Adds message bundles and regional variants; sets en-US as the default.
**Key changes**
- i18n foundation
- Adds request-scoped config to load messages per locale and injects NextIntlClientProvider in [layout.tsx]
- Adds/updates messages for: en-US, en-GB, zh-TW, zh-HK, zh-CN, ja, ko, fr-FR, fr-CA, de.
Centralizes LOCALES, LOCALE_LABELS, and DEFAULT_LOCALE in [locales.ts]
- Adds LocaleSwitcher (cookie-based) and [LocaleBootstrap]
- Pages and components
- Localizes Sidebar, Home (including metadata/manifest), Settings, Discover, Library.
- Localizes common components: MessageInput, Attach, Focus, Optimization, MessageBox, MessageSources, SearchImages, SearchVideos, EmptyChat, NewsArticleWidget, WeatherWidget.
- APIs
- Weather API returns localized condition strings server-side.
- UX and quality
- Converts all remaining <img> to Next Image.
- Updates browserslist/caniuse DB to silence warnings.
- Security: Settings API Key inputs are now password fields and placeholders were removed.
2025-08-16 12:27:18 +08:00
|
|
|
const withNextIntl = createNextIntlPlugin();
|
|
|
|
|
export default withNextIntl(nextConfig);
|