aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Context.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Context.php')
-rw-r--r--app/Models/Context.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Models/Context.php b/app/Models/Context.php
index 1dccff6f6..d6942fbcd 100644
--- a/app/Models/Context.php
+++ b/app/Models/Context.php
@@ -160,6 +160,12 @@ final class FreshRSS_Context {
FreshRSS_Context::$user_conf->shortcuts = $shortcuts;
FreshRSS_Context::$user_conf->save();
}
+
+ FreshRSS_Context::$user_conf->language = preg_replace_callback(
+ '/-(\\w{2})$/',
+ static fn (array $matches): string => strtoupper($matches[0]),
+ FreshRSS_Context::$user_conf->language ?? Minz_Translate::DEFAULT_LANGUAGE
+ ) ?? Minz_Translate::DEFAULT_LANGUAGE;
}
/**