Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Feat: Add default_lang enviroment variable
Leonardo Humberteeae168df1b6
diff --git a/lib/constants.ts b/lib/constants.tsindex 209a97b62..72209ddb4 100644--- a/lib/constants.ts+++ b/lib/constants.ts@@ -13,7 +13,7 @@ export const REPO_URL = 'https://github.com/umami-software/umami';export const UPDATES_URL = 'https://api.umami.is/v1/updates';export const TELEMETRY_PIXEL = 'https://i.umami.is/a.png';-export const DEFAULT_LOCALE = 'en-US';+export const DEFAULT_LOCALE = process.env.defaultLang ?? 'en-US';export const DEFAULT_THEME = 'light';export const DEFAULT_ANIMATION_DURATION = 300;export const DEFAULT_DATE_RANGE = '24hour';diff --git a/next.config.js b/next.config.jsindex 0778f979e..18eb54c40 100644--- a/next.config.js+++ b/next.config.js@@ -74,6 +74,7 @@ if (process.env.CLOUD_MODE && process.env.CLOUD_URL && process.env.DISABLE_LOGINconst config = {env: {currentVersion: pkg.version,+ defaultLang: process.env.DEFAULT_LANG,isProduction: process.env.NODE_ENV === 'production',},basePath: process.env.BASE_PATH,