Skip to content

HFP-3943 Use user's profile language instead of site language#181

Open
otacke wants to merge 1 commit intoh5p:masterfrom
otacke:improve-get_language
Open

HFP-3943 Use user's profile language instead of site language#181
otacke wants to merge 1 commit intoh5p:masterfrom
otacke:improve-get_language

Conversation

@otacke
Copy link
Contributor

@otacke otacke commented May 11, 2024

When merged in, will use the users' profile language for the H5P editor instead of using the site's language which can differ.

Note: The use of WPLANG is deprcated.

@otacke otacke changed the title Use user's profile language instead of site language HFP-3943 Use user's profile language instead of site language May 11, 2024
@icc
Copy link
Member

icc commented Mar 3, 2026

What's the benefit here compared to using get_locale()?

@otacke
Copy link
Contributor Author

otacke commented Mar 3, 2026

@icc get_locale will give you the language that the site is set to, but it is not necessarily the one that the user has set for their backend. WordPress could e.g. use English for an international audience, but users can override this to be their native language for them. This is not something that I came up with, but it was a request from someone running into that specific problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants