Notify electron of language changes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
2bd32050fc
commit
9bcea0aeca
2 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,7 @@ import request from 'browser-request';
|
|||
import counterpart from 'counterpart';
|
||||
import React from 'react';
|
||||
import SettingsStore, {SettingLevel} from "./settings/SettingsStore";
|
||||
import PlatformPeg from "./PlatformPeg";
|
||||
|
||||
// $webapp is a webpack resolve alias pointing to the output directory, see webpack config
|
||||
import webpackLangJsonUrl from "$webapp/i18n/languages.json";
|
||||
|
@ -285,6 +286,11 @@ export function setLanguage(preferredLangs) {
|
|||
preferredLangs = [preferredLangs];
|
||||
}
|
||||
|
||||
const plaf = PlatformPeg.get();
|
||||
if (plaf) {
|
||||
plaf.setLanguage(preferredLangs);
|
||||
}
|
||||
|
||||
let langToUse;
|
||||
let availLangs;
|
||||
return getLangsJson().then((result) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue