Allow for multiple locale and stabilise set language call

This commit is contained in:
Germain Souquet 2021-04-26 13:55:14 +01:00
parent 8f1ea84eb6
commit a43ad8d881
2 changed files with 2 additions and 2 deletions

View file

@ -258,7 +258,7 @@ export default abstract class BasePlatform {
return null; return null;
} }
async setLanguage(language: string) { async setLanguage(preferredLangs: string[]) {
throw new Error("Unimplemented"); throw new Error("Unimplemented");
} }

View file

@ -194,8 +194,8 @@ export default class GeneralUserSettingsTab extends React.Component {
this.setState({language: newLanguage}); this.setState({language: newLanguage});
const platform = PlatformPeg.get(); const platform = PlatformPeg.get();
if (platform) { if (platform) {
platform.reload();
platform.setLanguage(newLanguage); platform.setLanguage(newLanguage);
platform.reload();
} }
}; };