Closed IoanaAMuresan closed 2 months ago
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.
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.
Here is a PR that adds a language
query string and a setSiteLanguage
Blueprint step.
@IoanaAMuresan we added support for setting the site language using blueprints and query strings (?language=jp
). Would this work for your usecase?
I will mark this issue as done, but please let us know if you need anything else.
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.