diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-04-03 18:56:00 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-05-16 00:54:59 +0200 |
commit | 7a926c4b223c8be46a1defab4a86104d617eaaf9 (patch) | |
tree | 5e50a787397ff72268c22c6dffc67432dc76e184 /packages/main/src/infrastructure | |
parent | fix(main): Inconsistent RendererBridge snapshot (diff) | |
download | sophie-7a926c4b223c8be46a1defab4a86104d617eaaf9.tar.gz sophie-7a926c4b223c8be46a1defab4a86104d617eaaf9.tar.zst sophie-7a926c4b223c8be46a1defab4a86104d617eaaf9.zip |
refactor: Use i18next for language resolution
Due to https://github.com/i18next/i18next/issues/1564 we still have to
implement our own language resolution, but we can rely on
resolvedLanguage to determine which language to pass through to the
renderer.
We will use the language detected by chromium as the system locale, so
there is no need to use os-locale for detection any more.
We use i18next in the main process do resolve the language, then set the
resolve (not requested!) language in the renderer process to avoid doing
resolution twice. This avoids the need in the renderer process to know
the list of supported languages.
We set the language and the writing direction in HTML in the renderer.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src/infrastructure')
0 files changed, 0 insertions, 0 deletions