refactor: remove LocaleSwitcher component and update locale handling
- Removed LocaleSwitcher from NavUser, SiteHeader, and WorkbenchHeader components. - Updated tests to reflect the removal of LocaleSwitcher. - Changed default locale from "en-US" to "zh-CN" in i18n configuration. - Refactored locale resolution logic to read configured locale without relying on browser language detection. - Updated AgentDesk SDK to support language configuration from public API. - Cleaned up unused auth options fetching in the auth API.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { expireSession, readSession } from "@/lib/auth"
|
||||
import { readStoredLocale } from "@/i18n/config"
|
||||
import { translateCurrentMessage } from "@/i18n/messages"
|
||||
|
||||
const API_BASE_URL =
|
||||
@@ -50,9 +49,6 @@ function buildRequestHeaders(headers: HeadersInit | undefined, skipAuth?: boolea
|
||||
) {
|
||||
authHeaders.set("Content-Type", "application/json")
|
||||
}
|
||||
const locale = readStoredLocale()
|
||||
authHeaders.set("Accept-Language", locale)
|
||||
authHeaders.set("X-Locale", locale)
|
||||
return authHeaders
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user