Chuyển tới nội dung chính

Change UI locale

PUT/api/me/ui-locale
Thành viên đã đăng nhập

Đọc thêm: Ngôn ngữ giao diệnMã nguồn: UiLocaleApiController#change(mở trong thẻ mới)

Request body​

application/json

TrườngKiểuBắt buộcGhi chú
uiLocalestringTùy chọnmax 16

Response​

Thành công: 200

TrườngKiểuBắt buộcGhi chú
uiLocalestringTùy chọn
supportedarray of OptionTùy chọn
supported[].tagstringTùy chọn
supported[].displayNamestringTùy chọn

Lỗi​

Trạng tháiMãÁp dụng cho
400validation_failedthiếu trường hoặc giá trị nằm ngoài khoảng cho phépMọi endpoint
400malformed_requestkhông đọc được bodyMọi endpoint
400invalid_parametermột tham số trên đường dẫn hoặc query bị thiếu hoặc không chuyển đổi được, chẳng hạn một ID không phải UUIDMọi endpoint
401authentication_requiredchưa có phiên đăng nhậpMọi endpoint
403access_deniedendpoint dành cho quản trị viên, hoặc CSRF token thiếu hay đã cũMọi endpoint
404not_foundkhông có địa chỉ đóMọi endpoint
405method_not_allowedđịa chỉ không nhận phương thức đóMọi endpoint
415unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đóMọi endpoint
500internal_errormột lỗi ReleaseFlow không lường trước; body không bao giờ chứa exception gây ra nóMọi endpoint
400output_language_invalidKhu vực Account
400ui_locale_invalidKhu vực Account
400invitation_invalidKhu vực Account
400organization_slug_invalidKhu vực Account
404invitation_not_foundKhu vực Account
404member_not_foundKhu vực Account
409email_already_registeredKhu vực Account
409invitation_already_pendingKhu vực Account
409invitation_email_unavailableKhu vực Account
409organization_slug_takenKhu vực Account
409member_last_administratorKhu vực Account

Request

bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X PUT "http://localhost:8080/api/me/ui-locale" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"uiLocale": "<string>"
}'

Request body là ví dụ dựng từ schema; thay mọi giá trị giữ chỗ trước khi gửi.

Response

200

Ví dụ

{
  "uiLocale": "<string>",
  "supported": [
    {
      "tag": "<string>",
      "displayName": "<string>"
    }
  ]
}