Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 628 Bytes

File metadata and controls

10 lines (8 loc) · 628 Bytes

i18n 功能实现

  • 默认为英文,英文使用默认的路径,如 / 或者 /utc。对于英文,不需要加 /en 这样的格式。
  • 至少支持中文简体和繁体,有独立路径,比如 /zh-hans 和 /zh-hant, /zh-hans/utc 和 /zh-hant/utc。
  • 考虑 seo,需要为每个语言版本设置独立的 title 和 description,需要设置 canonical url。
  • 翻译要贴近生活,本土化。符合上下文。
  • 页面 header 添加语言切换功能。
  • 打开首页时不需要跳转,默认就是英文版本。
  • 我已经将应用运行在 3000 端口,你可以直接用 curl 的方式去测试。