Skip to content
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

Use the Accept-Language header when assigning a default language to a new user session #7512

Open
jonasraoni opened this issue Dec 1, 2021 · 10 comments · May be fixed by pkp/ojs#3447 or #10611
Open
Assignees
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.

Comments

@jonasraoni
Copy link
Contributor

jonasraoni commented Dec 1, 2021

Describe the problem you would like to solve
When a user accesses an OJS (OMP, OPS) website, OJS creates a session and assigns the primary locale to it. This becomes the default language the user will work with while interacting with the website, until he changes it. However, this may not correspond to the user's preferred language.

Describe the solution you'd like
Instead of using the primary locale, we should use the Accept-Language header to detect the user's current locale and automatically select that (if available).

Who is asking for this feature?
No user requests yet.

PRs

Additional information
Reference: #7336 (comment)

@NateWr
Copy link
Contributor

NateWr commented Dec 2, 2021

@jonasraoni the link isn't taking me directly to the comment. This happens sometimes as GitHub hides some comments. Can you copy/paste the discussion or reasoning into this issue?

@asmecher
Copy link
Member

asmecher commented Dec 3, 2021

You can access it by clicking "Show Resolved" links until you find the right one (:man_facepalming:) but to save you the trouble it's this conversation:
image

@NateWr NateWr changed the title Attempt to display the interface in a suitable language Automatically detect default install language from the user agent Dec 6, 2021
@NateWr NateWr added the Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. label Dec 6, 2021
@NateWr
Copy link
Contributor

NateWr commented Dec 6, 2021

Ah, so this is during installation. I've updated the issue title/description, thanks!

@asmecher
Copy link
Member

@NateWr, no, this isn't for during installation -- it's for when a user without a session first hits the OJS website.

@NateWr
Copy link
Contributor

NateWr commented Dec 13, 2021

Ok, then I'm not understanding the issue description. Can one of you (@jonasraoni, @asmecher) update this with a clearer description of the problem and solution?

@asmecher
Copy link
Member

@jonasraoni and @NateWr, I've updated the description. @jonasraoni, did I capture what you were proposing?

@NateWr NateWr changed the title Automatically detect default install language from the user agent Use the Accept-Language header when assigning a default language to a new user session Dec 13, 2021
@NateWr
Copy link
Contributor

NateWr commented Dec 13, 2021

Got it, thanks!

jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Jul 2, 2022
@jonasraoni jonasraoni self-assigned this Jul 2, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Jul 2, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 31, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 31, 2022
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Jul 31, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Jul 31, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Aug 1, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Aug 1, 2022
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Aug 1, 2022
@jonasraoni
Copy link
Contributor Author

@asmecher Some older PRs which I've rebased recently, so they are still ok to be merged.

@asmecher
Copy link
Member

@jonasraoni I don't think anyone has identified this as a priority so I haven't reviewed it; strategically, I would much rather we considered e.g. adopting Laravel's session management toolset rather than refining our own.

jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 14, 2024
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 14, 2024
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 14, 2024
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 14, 2024
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Nov 14, 2024
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 15, 2024
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 15, 2024
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 15, 2024
jonasraoni added a commit to jonasraoni/pkp-lib that referenced this issue Nov 15, 2024
jonasraoni added a commit to jonasraoni/ojs that referenced this issue Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.
Projects
None yet
3 participants