So, I was struggling with creating and updating content in different languages from code. I was able to create language versions of every content for all the languages, but they all ended up with the same content – the content of the first language version, i.e. the master language!
Turned out I was calling
Get<T>(ContentReference contentLink, ILanguageSelector selector) in
IContentLoader with a
ContentReference that had a WorkID to get the current data for updating it. That did of course override the selector parameter I was passing with another language. The content I got back was in the language of the content with that specific WorkID (in this case the master language). So my code just kept updating the master language version and not the language version I was trying to update.
Bottom line; Call
Get() with a
ContentReference without a WorkID, unless you really want to get that specific version of the content. You can call the extension method
ToReferenceWithoutVersion() to construct a
ContentReference without a WorkID.