Skip to content

Detecting default browser language preference of user #897

@idontknowjs

Description

@idontknowjs

Actual Behaviour
For more reliable and accurate i18n support for the website, we can detect the browser language preference using JavaScript's navigator.language function which returns the default language preference of browser.

Expected Behaviour
Depending upon the prefered language, website would open in that language.

Steps to reproduce it

Change the default language of browser to any native language. In this case, I changed to Spanish, like I did below
While visiting the website, it should open in https://p5js.org/es/
But it opens in https://p5js.org/

image

Would you like to work on the issue?
Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions