Internationalization
RuleGo-Server supports multi-language internationalization, including backend language pack management API and frontend editor internationalization.
# Backend Language Pack API
# List Language Packs
GET /api/v1/locales
Authorization: Bearer {token}
1
2
2
Returns a list of all registered language packs.
# Get a Specific Language Pack
GET /api/v1/locales?lang=zh-CN
Authorization: Bearer {token}
1
2
2
# Save/Update Language Pack
POST /api/v1/locales
Authorization: Bearer {token}
Content-Type: application/json
{
"lang": "zh-CN",
"data": {
"key": "值",
"node.filter": "过滤器"
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Language pack data is stored in the data/locales/ directory.
# Permissions
| Operation | Required Permission |
|---|---|
| View language packs | locale:read |
| Modify language packs | locale:write |
# Frontend Editor Internationalization
The RuleGo-Editor frontend also supports internationalization. You can customize component names, form labels, category names, tooltip text, and other text content.
For detailed documentation, please refer to: RuleGo-Editor Internationalization (opens new window)
# Quick Start
Pass custom language packs via options.locales:
<RuleGoEditor :data="data" :options="options"/>
<script setup>
const options = ref({
locales: {
category: {
filter: { label: '过滤器', background: '#f1e861', nodeType: 'simple-node' }
},
component: {
nodes: {
jsFilter: { label: 'JS过滤', desc: '使用js脚本过滤消息' }
}
},
relationTypes: { 'Success': '成功', 'Failure': '失败' }
}
});
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Language Pack Structure
| Field | Description |
|---|---|
category | Component category configuration (name, background color, node type) |
component.endpoints | Input endpoint component definitions (label, icon, form fields) |
component.nodes | Rule chain node component definitions |
relationTypes | Connection relation type translations (Success, Failure, etc.) |
| Other strings | General text translations (e.g., 'Input': '输入') |
For more details, see editor.rulego.cc (opens new window).
Edit this page on GitHub (opens new window)
Last Updated: 2026/05/29, 05:34:30