How We Determine a Browser Locale
Overview
In cPanel & WHM version 11.32, we introduced a localized login page that allows users to select a locale for their session. Several factors determine the locale that you see when you log in to cPanel, WHM, or Webmail.
cpsrvd service checks
When you log in to the cPanel, WHM, or Webmail interface, the cpsrvd service uses the following process to determine which locale to display:
-
The
cpsrvdservice checks whether a locale query string parameter exists in the URL. If it does, the browser sets thesession_localecookie to the same value.- For example, the
https://example.com:2083/login?locale=ruURL sets the Russian locale in the cPanel interface. - The
session_localecookie overrides the account’s configured locale and is valid for one year.
- For example, the
-
The
cpsrvdservice checks whether your browser already contains thesession_localecookie. If it does, the login interface and the rest of the user’s session uses the specified locale. -
If the URL does not specify a locale query string and the browser does not have a
session_localecookie, thecpsrvdservice checks whether your browser sent anAccept-Languageheader. If it did, thecpsrvdservice uses the first valid locale that corresponds to the value of theAccept-Languageheader.Note:Some browsers don’t allow the
Accept-Languageheader. -
If none of the above steps were able to set a language, the login system uses the Server Locale setting’s value in WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).
- cPanel & WHM stores this setting in the
/var/cpanel/cpanel.configfile as theservice_localevariable. - You can customize the language that the system uses to display a customer’s preferred locale in WHM’s Configure Application Locales interface (WHM >> Home >> Locales >> Configure Application Locales).
- cPanel & WHM stores this setting in the
-
If your system does not meet any of the above conditions, the login system uses the U.S. English locale (
en) by default.