Skip to content

Commit ff37dee

Browse files
authored
Merge pull request oxen-io#2551 from ianmacd/pr44
Set the Windows spell-checking language from $LANGUAGE.
2 parents 0951a9c + ca3da7a commit ff37dee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ts/node/spell_check.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { sync as osLocaleSync } from 'os-locale';
55

66
export const setup = (browserWindow: BrowserWindow, messages: any) => {
77
const { session } = browserWindow.webContents;
8-
const userLocale = osLocaleSync().replace(/_/g, '-');
8+
const userLocale = process.env.LANGUAGE
9+
? process.env.LANGUAGE
10+
: osLocaleSync().replace(/_/g, '-');
911
const userLocales = [userLocale, userLocale.split('-')[0]];
1012

1113
const available = session.availableSpellCheckerLanguages;

0 commit comments

Comments
 (0)