diff options
author | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2022-05-10 00:33:34 +0200 |
---|---|---|
committer | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2022-05-10 00:33:34 +0200 |
commit | a03da2303c1d92fc5130c2a02a23a294f38cd178 (patch) | |
tree | 6ae391c71d8a35522441e138878fef7411e051ce | |
parent | 8439ca7930e73e17746a1d6f0610417e8a42865f (diff) |
Treat C-locale in the weather widget as English
-rw-r--r-- | weather-widget/weather.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua index 4e8e659..3ec1c3f 100644 --- a/weather-widget/weather.lua +++ b/weather-widget/weather.lua @@ -18,6 +18,10 @@ local WIDGET_DIR = HOME_DIR .. '/.config/awesome/awesome-wm-widgets/weather-widg local GET_FORECAST_CMD = [[bash -c "curl -s --show-error -X GET '%s'"]] local SYS_LANG = os.getenv("LANG"):sub(1, 2) +if SYS_LANG == "C" or SYS_LANG == "C." then + -- C-locale is a common fallback for simple English + SYS_LANG = "en" +end -- default language is ENglish local LANG = gears.filesystem.file_readable(WIDGET_DIR .. "/" .. "locale/" .. SYS_LANG .. ".lua") and SYS_LANG or "en" |