Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ export const setSiteLanguage: StepHandler<SetSiteLanguageStep> = async (
) => {
progress?.tracker.setCaption(progress?.initialCaption || 'Translating');

await playground.defineConstant('WPLANG', language);

const docroot = await playground.documentRoot;

// Set the site language as an option (not a constant) so it can be changed from the admin UI
await playground.run({
code: `<?php
require_once('${docroot}/wp-load.php');
update_option('WPLANG', ${JSON.stringify(language)});
`
});

const wpVersion = (
await playground.run({
code: `<?php
Expand Down
Loading