-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Language Selection via URL Query Parameter #3490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @raclim
|
I agree that we shouldn't change the user's default preference. In fact, if they are logged in, would it not make sense to ignore the As I imagined the feature, the |
Thank you for the clarification, that makes a lot of sense! Would it be okay if I open a draft PR to share my idea and get feedback? |
Yes @deveshidwivedi, feel free to give this a go! I'll assign the issue to you :) |
@raclim @deveshidwivedi: Just a quick thought; if we’re not already doing this, using the browser’s See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Accept-Language |
That's a great thought! We have a few util files in |
Thanks @raclim! In that case, I think detecting the browser language would address the use case I had in mind more directly. Unless there’s a specific reason to prefer the URI parameter, I’d suggest going with that approach instead. This seems like a perfect low-hanging fruit for improving the accessibility of the editor to non-English speaking first time users. |
Increasing Access
Currently, users can set the language of the p5.js editor by using the language dropdown on the upper-left hand navigation menu (pictured below). While language preferences are saved to a user's account, they have to be set manually by the user.
Adding support for a URL query parameter to set the language would make it easier to share the p5.js editor in different languages. This was initially raised by @SableRaf!
Feature request details
What Would This Look Like?
The query parameter to determine the language would be set at the end of a url, such as
https://editor.p5js.org/path?lang=fr
. This would load the editor in French.What Are Some Considerations?
lang
value is invalid or unsupported?Please feel free to continue fleshing out what this might look like and further considerations that would need to be made here in the comments below!
The text was updated successfully, but these errors were encountered: