I have a variant (v1) in a language A and another variant (v2) in another language B. Both of those variants are created in master language C and published in master and respective languages.
When I retrieve all variant as given below in language A or B, everything including contentlink is fine.
_contentRepository.GetChildren<Variant>(contentLink);
If I am at language B and retrieve all variant from A as well (or vice versa) as given below, I get proper content link v2 but for v1 I get content link of master language.
foreach(var culture in cultures)
_contentRepository.GetChildren<Variant>(contentLink, new CultureInfo(culture));
Even if I try to resolve as below, it does not work. GetUrl gives proper string url but could not get contentreference.
ContentReference.Parse(_urlResolver.GetUrl(v1.ContentLink, culture))