Skip to content

Commit

Permalink
locale.php: Fall back to en_US if all else fails
Browse files Browse the repository at this point in the history
  • Loading branch information
reedy authored Oct 19, 2023
1 parent 5e3957f commit b9b58a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions php/locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
// We know we can do en_US, so don't do a DB lookup
if ($acceptLang === "en_US" || locale_exists($dbh, $acceptLang)) {
$locale = $acceptLang;
} else {
// Fallback incase we don't have a locale at this point
$locale = "en_US";
}
}

Expand Down

0 comments on commit b9b58a7

Please sign in to comment.