angular / angular/angular-cli

Support for Multi-Domain Locale Detection in Angular SSR

未關閉
#29,111 5 則留言 6 個 reaction 已指派 0 人 在 GitHub 檢視
area: @angular/ssr feature
主要語言
TypeScript
星號
27k
分支
11.8k
平均合併
14 小時 23 分鐘
30 天內合併 PR
162

描述

### Description

Currently, Angular SSR does not provide built-in functionality to detect the domain in a multi-domain setup and serve the appropriate localized version of the application. This feature would allow Angular SSR to dynamically render pages with the correct locale based on the domain.

**Use Case**:
- Applications serving different localized versions (e.g., `example.com`, `fr.example.com`, `example.de`) need SSR to serve the appropriate locale.
- Example:
- `example.com` → English content
- `fr.example.com` → French content
- `example.de` → German content

### Describe the solution you'd like

Allow SSR to use the detected domain to select the corresponding locale configuration. Which simplifies multi-language deployment without relying on path-based locales (e.g., `/en`, `/fr`).

### Describe alternatives you've considered

_No response_

貢獻指南

開啟貢獻指南

研究方向

首先定位 Angular SSR 的 locale 設定以及 request/domain 處理入口;issue 未指定任何檔案或測試。完成標準是 SSR 能夠為 example.com、fr.example.com 和 example.de 選擇適當的 locale,而不依賴基於路徑的 locale 片段,並涵蓋支援的對應關係。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, typescript
領域
internationalization, web-dev
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。