Open VityaSchel opened 2 months ago
We have some design changes incoming for this one, mainly switching the select tag to the native multi select modal that we use in various places in the Session app (inviting members to communities) and strings changes
Tracking internally via SES-2059
First time contributor checklist:
Contributor checklist:
clearnet
branchyarn ready
run passes successfully (more about tests here)Description
Feature request: #1877
This PR adds option to change app's UI language in settings under Appearance tab. I've used native
<select>
tag and hardcoded all languages as<option>
tags. I've used dynamic CSS variables for theming andtransition: var(--default-duration)
for theme animation.I've used userConfig which stores data to config.json (
uiLanguage
property) to save and load language set by user. If language isn't set yet, it falls back to default language, evaluating this:process.env.LANGUAGE || app.getLocale() || 'en'
. After choosing language, app is restarted usingapp.relaunch(); app.exit();
I've added two events to ipc:
get-ui-language
,set-ui-language
.I've added two translation keys:
uiLanguage
,uiLanguageDescription
.