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 摘要。