Joystream / pioneer

Governance app for Joystream DAO
https://pioneerapp.xyz/
GNU General Public License v3.0
44 stars 70 forks source link

Auto-detection of language #1983

Open dmtrjsg opened 2 years ago

dmtrjsg commented 2 years ago

Context

Internationalistaion. Detect language from browser settings automatically.

Scope

Design

Dev Note

For this purpose, we're using i18next with the plugin i18next-browser-languageDetector (https://github.com/i18next/i18next-browser-languageDetector).

The plugin looks for the language key in the localStorage, and if didn't find any, it will get the browser language from the browser's Navigator.language and persist it in the localStorage.

Figma

👉 Figma Link

image
Qcza commented 2 years ago

For this purpose, we're using i18next with the plugin i18next-browser-languageDetector (https://github.com/i18next/i18next-browser-languageDetector).

The plugin looks for the language key in the localStorage, and if didn't find any, it will get the browser language from the browser's Navigator.language and persist it in the localStorage.

MattAugustynowicz commented 2 years ago

I think we can solve this quickly by using our notification box with proper icon. I don't know if it's needed, but I also added second box with the content about the language change. Additionally in the notification please add a link to "Settings/Language" subpage, so someone can quickly check if they want to change to one of the available languages

👉 Figma Link

image