noodles Posted June 22, 2021 Share Posted June 22, 2021 Hey there, I need to populate and save the custom fields (e.g. "title") via API, which works perfectly fine for the default language. However, I can't manage to populate other languages. So far I tried: $img->title427468 = 'Hello Wereld'; $img->save(); Nothing is saved. Other notations Another approach: $languages->setLanguage('dutch'); $img->title = 'Hello Wereld'; $img->save(); This indeed saves "Hello Wereld" to the dutch custom title field, BUT however DELETES the content in the default title field. The "setLanguageValue"-function is non-existent for the images/files, so it doesn't help. Can anyone help? ?Thank you very much. ❤️ Link to comment Share on other sites More sharing options...
noodles Posted July 2, 2021 Author Share Posted July 2, 2021 Anyone any clue? I still have no idea how to achieve this. ? Link to comment Share on other sites More sharing options...
bernhard Posted July 2, 2021 Share Posted July 2, 2021 This should be quite straightforward: https://processwire.com/docs/multi-language-support/multi-language-fields/#getting-and-setting Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now