{"id":294,"date":"2021-07-23T12:27:23","date_gmt":"2021-07-23T12:27:23","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-we-determine-a-browser-locale\/"},"modified":"2021-07-23T12:27:23","modified_gmt":"2021-07-23T12:27:23","slug":"how-we-determine-a-browser-locale","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-we-determine-a-browser-locale\/","title":{"rendered":"How We Determine a Browser Locale"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>In cPanel &#038; 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.<\/p>\n<h2 id=\"cpsrvd-service-checks\">cpsrvd service checks<\/h2>\n<p>When you log in to the cPanel, WHM, or Webmail interface, the <code>cpsrvd<\/code> service uses the following process to determine which locale to display:<\/p>\n<ol>\n<li>\n<p>The <code>cpsrvd<\/code> service checks whether a locale query string parameter exists in the URL. If it does, the browser sets the <code>session_locale<\/code> cookie to the same value.<\/p>\n<ul>\n<li>For example, the <code>https:\/\/example.com:2083\/login?locale=ru<\/code> URL sets the Russian locale in the cPanel interface.<\/li>\n<li>The <code>session_locale<\/code> cookie overrides the account\u2019s configured locale and is valid for one year.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>The <code>cpsrvd<\/code> service checks whether your browser already contains the <code>session_locale<\/code> cookie. If it does, the login interface and the rest of the user\u2019s session uses the specified locale.<\/p>\n<\/li>\n<li>\n<p>If the URL does not specify a locale query string and the browser does not have a <code>session_locale<\/code> cookie, the <code>cpsrvd<\/code> service checks whether your browser sent an <code>Accept-Language<\/code> header. If it did, the <code>cpsrvd<\/code> service uses the first valid locale that corresponds to the value of the <code>Accept-Language<\/code> header.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>Some browsers don\u2019t allow the <code>Accept-Language<\/code> header.<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>\n<p>If none of the above steps were able to set a language, the login system uses the <em>Server Locale<\/em> setting\u2019s value in WHM\u2019s <em>Tweak Settings<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Server Configuration &gt;&gt; Tweak Settings<\/em>).<\/p>\n<ul>\n<li>cPanel &#038; WHM stores this setting in the <code>\/var\/cpanel\/cpanel.config<\/code> file as the <code>service_locale<\/code> variable.<\/li>\n<li>You can customize the language that the system uses to display a customer\u2019s preferred locale in WHM\u2019s <em>Configure Application Locales<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Locales &gt;&gt; Configure Application Locales<\/em>).<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>If your system does not meet <strong>any<\/strong> of the above conditions, the login system uses the U.S. English locale (<code>en<\/code>) by default.<\/p>\n<\/li>\n<\/ol><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview In cPanel &#038; 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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":295,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/294"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/295"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}