- const supportedLangs = ["en","es","fr"];
- this.state.lang = localStorage["lang"] ||
- (supportedLangs.includes(navigator.language)
- ? navigator.language
- : "en");
- this.setTranslations();
- // Initialize connection (even if the current page doesn't need it)
- this.state.conn = new WebSocket(params.socketUrl + "/?sid=" + mysid +
- "&page=" + encodeURIComponent(page));