Update or create multiple languages at once using eZ Platform PHP API
source link: https://www.symfony.fi/ez-platform-tip/update-or-create-multiple-languages-at-once-using-ez-platform-php-api
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Update or create multiple languages at once using eZ Platform PHP API
It is possible to create or update content in multiple languages at once. There is one restriction: only one language can be set a version's language. This language is the one that will get a flag in the back office. However, you can set values in other languages for your attributes, using the setField method's third argument.
update multiple languages // set one language for new version $contentUpdateStruct->initialLanguageCode = 'fre-FR'; $contentUpdateStruct->setField( 'title', $newgermantitle, 'ger-DE' ); $contentUpdateStruct->setField( 'body', $newgermanbody, 'ger-DE' ); $contentUpdateStruct->setField( 'title', $newfrenchtitle ); $contentUpdateStruct->setField( 'body', $newfrenchbody );
This also works when creating new content with the contentUpdateStruct created with newContentCreateStruct.
Source: https://doc.ez.no/display/EZP/3.+Managing+Content
Written by Jani Tarvainen on Thursday May 24, 2018
Permalink -
« Migrating eZ Platform Landing Pages and Form Builder Forms - Convert RichText to HTML in PHP API »
Recommend
-
149
Now that Google has added multi-user support, the ability to set reminders, and other key functionality to the Google Home, there's not much to complain ab... by Corbin Davenport in Google, Google Home, Google Home Max, Google Home Mini, News
-
32
Get more information for a single or multiple repositories with a single command. Inspiration Simultaneously working with...
-
18
Edit Multiple Files at once in Neovim2020-10-28Nvim247 words 2 mins read 140 times readWhen I was in a folder and tried to edit multiple files using gl...
-
7
Today, we’ll cover a cool Terraspace feature. It allows you to deploy all of your infrastructure in a single command. terraspace all up Terraspace...
-
10
How to Find the Sum of a Geometric Series Using Multiple Languages By Yuvraj Chandra Published 1 day ago When looking to build...
-
14
download multiple files at once advertisements i'm building a website with very simple cms. I built a form already with an input type="file" a...
-
5
How to Save Multiple Photos From Safari at Once in iOS 15 By Hiba Fiaz Published 13 hours ago With this method, you don't have to sa...
-
4
Reducing chattiness by querying for multiple interfaces at once, part 2 Raymond March 16th, 2022 ...
-
5
SSH magic: Authorize only once for multiple ssh/scp invocations September 10, 2010 OpenSSH has a nice feature that makes it p...
-
2
Blog Create Multiple Resources at Once With Terraform for_each ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK