Given a URL as input, its language, and what language to translate it to, this query fetches the content from the URL and performs the translation using Google Translate:
There already were persisted queries "Translate post" and "Translate posts" (in bulk), which deal with translating all the properties inside the Gutenberg blocks in the post.
These have been duly renamed as "Translate post (Gutenberg)" and "Translate posts (Gutenberg)", and new persisted queries have been added to translate content for the Classic editor:
Translate post (Classic editor): Translate a single post
Translate posts (Classic editor): Translate multiple posts, in bulk
All these queries translate content by calling the Google Translate API, sending all the data within a single request.
Then, if using query "Translate posts (Classic editor)" to translate 5 posts, all data (title, content and excerpt) for all 5 posts is sent all together, providing a rich context that produces a greater accuracy in the translation.
For instance, after translating this post from English to Chinese:
Point to the WordPress RSS feed for a post, and create a new post with its data.
For instance, the query will parse the following RSS feed for a single post (normally accessible under https://mysite.com/post-slug/feed/rss/?withoutcomments=1):
Provide a CSV to creates posts with the corresponding data for each entry (the title, excerpt, content, and author).
For instance, the CSV below will create 3 posts:
Title,Excerpt,Content,Author
Multi-channelled optimal interface,Inventore iste velit et expedita ipsa dolor,"<!-- wp:paragraph -->
<p>Inventore iste velit et expedita ipsa dolor. Optio suscipit qui id harum corporis dignissimos.</p>
<!-- /wp:paragraph -->",admin
Ergonomic motivating parallelism,Consequuntur velit quasi assumenda,"<!-- wp:paragraph -->
<p>Consequuntur velit quasi assumenda. Eum non saepe est. Ut dolorem harum eveniet eaque nemo impedit. Voluptatem commodi modi sed sed animi voluptatem.</p>
<!-- /wp:paragraph -->
<!-- wp:image {""id"":5,""sizeSlug"":""large""} -->
<figure class=""wp-block-image size-large""><img src=""https://mysite.com/wp-content/uploads/2023/09/wordpress0.jpg"" alt="""" class=""wp-image-5""/></figure>
<!-- /wp:image -->
<!-- wp:image {""id"":7,""sizeSlug"":""large""} -->
<figure class=""wp-block-image size-large""><img src=""https://mysite.com/wp-content/uploads/2023/09/wordpress2.jpg"" alt="""" class=""wp-image-7""/></figure>
<!-- /wp:image -->",admin
Down-sized solution-oriented securedline,Ipsam minima qui asperiores dolorum unde voluptas quia voluptate,"<!-- wp:paragraph -->
<p>Ipsam minima qui asperiores dolorum unde voluptas quia voluptate. Incidunt omnis cumque beatae quo deleniti ex. Praesentium nihil et consectetur neque commodi tempora ipsa adipisci. Praesentium perferendis sint est.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Et aut fuga aliquam consequuntur dolore sunt ut ut. Quibusdam in voluptas vitae quia eaque. Eligendi dolorum dolorem vitae et vitae et ut.</p>
<!-- /wp:paragraph -->",admin
Find all links in all posts (by searching for all <a href="(...)">(...)</a> strings), and list them down in the response as a JSON object, with properties { href: (...), text: (...) }.
In predefined persisted queries "Translate post" and "Translate posts", added failIfNonExistingKeyOrPath: false when selecting a block's attributes.{something} property (as it may sometimes not be defined)
In predefined persisted query "Import post from WordPress site", added status any to select the post
Renamed persisted query "Translate post" to "Translate post (Gutenberg)", and "Translate posts" to "Translate posts (Gutenberg)"