3. 国际化文本管理

3.1. 新增/更新 国际化文本

Type: PUT

Content-Type: application/json

Description: 新增/更新 国际化文本

Body-parameters:

Parameter Type Description Required Since

namespace

string

命名空间 与国际化内容的命名空间一致

false

-

messageKey

string

国际化内容

false

-

language

string

国际化语言标签

false

-

content

string

国际化文本

false

-

Request-example:

curl -X PUT -H "Content-Type: application/json" -i 'http://127.0.0.1/locale' --data '{
  "namespace": "",
  "messageKey": "",
  "language": "",
  "content": ""
}'

Response-fields:

Field Type Description Since

id

string

No comments found.

-

Response-example:

{
  "id": ""
}

3.2. 加载国际化资源

Type: GET

Content-Type: application/x-www-form-urlencoded

Description: 加载国际化资源

Path-parameters:

Parameter Type Description Required Since

language

string

国际化语言

true

-

namespace

string

命名空间

true

-

Request-example:

curl -X GET -i 'http://127.0.0.1/locale/{language}/{namespace}'

Response-fields:

Field Type Description Since

mapKey

string

A map key.

-

Response-example:

{
  "mapKey1": "",
  "mapKey2": ""
}