diff --git a/internal/api/server.go b/internal/api/server.go index a025b2a1..04b642d3 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -624,6 +624,13 @@ func (s *Server) serveManagementControlPanel(c *gin.Context) { html = strings.ReplaceAll(html, `alt:"CPAMC logo"`, `alt:"ProxyPilot logo"`) html = strings.ReplaceAll(html, `alt:"CLI Proxy API Management Center"`, `alt:"ProxyPilot Dashboard"`) + // The upstream management bundle currently defaults to zh-CN for some users/environments. + // Force a sane default (English) unless the user has already explicitly chosen a language. + const langBootstrap = `` + if strings.Contains(html, "") { + html = strings.Replace(html, "", "\n"+langBootstrap+"\n", 1) + } + c.Header("Content-Type", "text/html; charset=utf-8") c.String(http.StatusOK, html) }