功能特性国际化

国际化

ShipAny 使用 next-intl 默认支持国际化。只需要简单的配置,即可开启。

项目国际化

项目国际化,包括 ShipAny 项目启动后看到的页面 title,SEO 信息,登陆框文案等。

i18n/messages 目录下,通过 [locale].json 文件配置页面内容,默认支持中文和英文,在 i18n/messages/ 目录下,可以看到 en.jsonzh.json 两个文件,在项目发布之前,修改成跟你项目相符合的文案即可。

可以让 AI 辅助生成内容:

Prompt
update content of this file, for my new project "Flux AI", which is an AI Image Generator, with keywords "flux ai, ai image generator"

i18n-message

落地页国际化

落地页的内容,在 i18n/pages/landing 目录下,通过 [locale].json 文件进行配置。

默认支持 en.jsonzh.json 两个文件,在项目发布之前,修改成跟你项目相符合的文案即可。

参考 Prompt:

Prompt
I want to build a landing page for my product named "Flux AI Image Generator", please update the landing page json file, content reference @Web @https://www.flux.ai/

update-landing

支持更多语言

除了默认的 enzh 外,如果你还需要支持更多的语言,比如日语:ja,韩语:ko,法语:fr等,你可以按照以下步骤进行多语言配置:

  1. i18n/messages 目录和 i18n/pages/landing 目录下,添加对应的语言文件,比如 ja.jsonko.jsonfr.json 等。

  2. 修改 i18n/locale.ts 文件,添加更多语言支持

i18n-locales

  1. 修改 middleware.ts 文件,添加更多语言支持

i18n-mid

  1. 预览网页,可以看到新的语言已经支持

i18n-preview

参考

next-intl