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

(Meetup use case) Display WP Playground interface in browser language #1513

Open
IoanaAMuresan opened this issue Jun 13, 2024 · 3 comments
Open
Labels

Comments

@IoanaAMuresan
Copy link

Submitting this after briefly discussing this live with @adamziel at WCEU.

Title pretty much says it all - ensure that WP playground interface / commands are displayed in the default language of the user's browser, rather than in English.

Unsure what other deets you might need; please feel free to reach out if you need me to clarify this further.

@adamziel adamziel added the [Type] Enhancement New feature or request label Jun 21, 2024
@adamziel
Copy link
Collaborator

cc @bgrgicak – this would unlock using Playground with non-English audiences. It would be nice to have a parameter like "?localize=1" to detect the language headers and download the right language pack by default. We'll need to download through the plugins-proxy.php because of a pending CORS issue with that endpoint.

@IoanaAMuresan IoanaAMuresan changed the title Display WP Playground interface in browser language (Meetup use case) Display WP Playground interface in browser language Jun 22, 2024
@bgrgicak
Copy link
Collaborator

If I understand correctly, this isn't about the Playground website UI, it's about the WordPress UI.

Translating the Playground UI would require much more work because we would first need to make all strings translatable using @wordpress/i18n and then find a way to add it to translate.wordpress.org for generating translations.

It would be nice to have a parameter like "?localize=1" to detect the language headers and download the right language pack by default.

We could add a localized parameter to change the WordPress language to a chosen language, but I wouldn't do it automatically without user interaction.

Doing it automatically could also break demos that were made for a specific audience (e.g. a demo for a plugin that is used only in the German market).

I can start by adding a localize query string that changes the WordPress UI language while we discuss the remaining parts.

@bgrgicak
Copy link
Collaborator

Here is a PR that adds a language query string and a setSiteLanguage Blueprint step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Inbox
Development

No branches or pull requests

3 participants