-
Notifications
You must be signed in to change notification settings - Fork 268
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
Language switcher #199
Comments
The meat is here: https://github.com/akirk/wp-glotpress-playground/blob/ab5942aceed309c3f87db2b8fe26d781d199aeb4/index.php#L76-L85 There are some things that you don't need for a "normal" install:
And some things that you still need:
|
Oki so languages are supported via Blueprints. Playground just needs a documentation page and maybe a handy language picker in the settings modal that would apply the Blueprint for the user. For example, a Blueprint to run WordPress with Japanese translations: {
"landingPage":"/wp-admin/?welcome=0",
"steps":[
{
"step":"login",
"username":"admin",
"password":"password"
},
{
"step":"mkdir",
"path":"/wordpress/wp-content/languages/plugins"
},
{
"step":"mkdir",
"path":"/wordpress/wp-content/languages/themes"
},
{
"step":"writeFile",
"path":"/wordpress/wp-content/languages/ja_JA.mo",
"data":{
"resource":"url",
"caption":"Downloading ja_JA.mo",
"url":"https://translate.wordpress.org/projects/wp/dev/ja/default/export-translations?format=mo"
}
},
{
"step":"writeFile",
"path":"/wordpress/wp-content/languages/admin-ja_JA.mo",
"data":{
"resource":"url",
"caption":"Downloading admin-ja_JA.mo",
"url":"https://translate.wordpress.org/projects/wp/dev/admin/ja/default/export-translations?format=mo"
}
},
{
"step":"setSiteOptions",
"options":{
"WPLANG":"ja_JA"
}
}
]
} To use it, put the above behind a hash |
yep, that's a need to be able to run the Playground in other languages than English. Solutions :
|
A UI config/switcher would be nice indeed! CCing @akirk on that |
cc @jarekmorawski – would this be easy to incorporate in the WebApp redesign? If yes, would you be up for adding a widget somewhere? If it turns out to be tricky for any reason, let's save it for the future. |
To be clear, do you need a language switcher for sites created and managed in Playground or the new Playground UI?Both, maybe? |
Just whenever you create a new site within Playground, right next to the PHP version picker. I've seen that in Figma so I think we're good here design-wise and only need to incorporate this in the new implementation. Thank you! |
I linked the issue to the project. |
Solved by #1731 |
Let's add a UI control to switch Playground to another language. Here's how @akirk does it in his GlotPress integration project:
https://github.com/akirk/wp-glotpress-playground/
The text was updated successfully, but these errors were encountered: