其他命令参考n8n官方文档
docker run -it --rm --name n8ntest \
-p 15678:5678 \
-v 【替换为下载的编辑器UI目录】:/usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/dist \
-v ~/.n8n:/home/node/.n8n \
-e N8N_DEFAULT_LOCALE=zh-CN \
-e N8N_SECURE_COOKIE=false \
n8nio/n8n请切换到对应版本的tag后,在执行
# 拉取代码
git clone https://github.com/other-blowsnow/n8n-i18n-chinese
cd n8n-i18n-chinese
# 只支持 1.86.1+以上使用该方法
git checkout n8n@1.86.1
# 运行
docker-compose up其他本地方式启动的话参考这个即可
- 找到路径:C:\Users\xxxxxx\AppData\Local\npm-cache_npx\n8n\node_modules\n8n-editor-ui\dist
- 下载对应版本editor-ui.tar.gz文件
- 解压到 dist目录下替换
- 设置环境变量 N8N_DEFAULT_LOCALE=zh-CN,自行咨询AI设置方法
- 重启 n8n 服务
n8n-nodes-base.nodes.[节点名称].nodeView.[属性名称].[displayName/description/hint/placeholder]
n8n-nodes-base.nodes.[节点名称].nodeView.[属性名称].options.[选项名称].[displayName/description]
{
"n8n-nodes-base": {
"nodes": {
"code": {
"nodeView": {
"notice": {
"displayName": "输入<code> $ </code> <a target=\"_ blank\" href=\"https: //docs.n8n.io/code-examples/methods-variables-reference--reference/\">特殊vars/methods </a>。通过使用<code> console.log()</code>语句进行调试,并在浏览器控制台中查看其输出。"
}
}
}
}
}
}浏览器搜索关键词 inputLabelDisplayName,断点 nodeText
editor-ui是支持i18n的,但是未开放语言包
- 手动添加 zh-CN.json 到 editor-ui
/src/plugins/i18n/locales/里面,然后重新编译 - 环境里面设置语言即可正常使用中文
N8N_DEFAULT_LOCALE=zh-CN
https://github.com/n8n-io/n8n/blob/master/packages/frontend/%40n8n/i18n/docs/README.md
请PR 语言文件到 languages 目录下,github action会在下一个n8n版本自动打包
其他语言参考:https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
N8N_DEFAULT_LOCALE=zh-CN