Skip to content

Commit

Permalink
default to en-US in LanguageFunctionPatcher if no language exists (da…
Browse files Browse the repository at this point in the history
  • Loading branch information
dangeredwolf committed Jun 3, 2022
1 parent ae6244d commit aace020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LanguageFunctionPatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getPref } from "./StoragePreferences";
export const LanguageFunctionPatcher = (): void => {
if (typeof TD !== "undefined" && typeof TD.languages !== "undefined") {
TD.languages.getSystemLanguageCode = (e): string => {
var t = getPref("mtd_lang").replace("_","-").substr(0,2);
var t = getPref("mtd_lang", "en_US").replace("_","-").substr(0,2);
return e && (t = t.replace(/-[a-z]+$/i, "")),
t
}
Expand Down

0 comments on commit aace020

Please sign in to comment.