国际化
ShipAny 使用 next-intl 默认支持国际化。只需要简单的配置,即可开启。
项目国际化
项目国际化,包括 ShipAny 项目启动后看到的页面 title,SEO 信息,登陆框文案等。
在 i18n/messages
目录下,通过 [locale].json
文件配置页面内容,默认支持中文和英文,在 i18n/messages/
目录下,可以看到 en.json
和 zh.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/pages/landing
目录下,通过 [locale].json
文件进行配置。
默认支持 en.json
和 zh.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/
支持更多语言
除了默认的 en
和 zh
外,如果你还需要支持更多的语言,比如日语:ja
,韩语:ko
,法语:fr
等,你可以按照以下步骤进行多语言配置:
-
在
i18n/messages
目录和i18n/pages/landing
目录下,添加对应的语言文件,比如ja.json
和ko.json
,fr.json
等。 -
修改
i18n/locale.ts
文件,添加更多语言支持
- 修改
middleware.ts
文件,添加更多语言支持
- 预览网页,可以看到新的语言已经支持