Hi!
This is my code:
var variant = _contentRepository.GetDefault<Variant>(productRef);
variant.Name = "Name";
variant.DisplayName = "Name sv";
var vaRef = _contentRepository.Save(variant, SaveAction.Publish, AccessLevel.NoAccess);
var noVariant = _contentRepository.CreateLanguageBranch<Variant>(vaRef, CultureInfo.GetCultureInfo("no"));
noVariant.Name = "Name";
noVariant.DisplayName = "Name no";
_contentRepository.Save(noVariant, SaveAction.Publish, AccessLevel.NoAccess);
What happens is that I get two variants, but the variant for the no language is not published and is missing DisplayName?
I can publish the variant from the GUI without problem.
Any idea why this is happening?
Thanks!
/Kristoffer