diff --git a/toolkit/components/telemetry/TelemetryPing.js b/toolkit/components/telemetry/TelemetryPing.js index aa458429f701..c0f0a4db3ada 100644 --- a/toolkit/components/telemetry/TelemetryPing.js +++ b/toolkit/components/telemetry/TelemetryPing.js @@ -63,6 +63,12 @@ const MEM_HISTOGRAMS = { "page-faults-hard": "PAGE_FAULTS_HARD" }; +function getLocale() { + return Cc["@mozilla.org/chrome/chrome-registry;1"]. + getService(Ci.nsIXULChromeRegistry). + getSelectedLocale('global'); +} + XPCOMUtils.defineLazyGetter(this, "Telemetry", function () { return Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); }); @@ -143,6 +149,7 @@ function getMetadata(reason) { appName: ai.name, appBuildID: ai.appBuildID, platformBuildID: ai.platformBuildID, + locale: getLocale(), }; // sysinfo fields is not always available, get what we can.