I am creating an item as well as its version in specific language (let's say Arabic) and then creating a clone of the newly created item in that particular language (Arabic). The issue is that the item as well as it's clone both are getting created in "en" as well as in "ar" language. However, I don't want the "en" version. Not sure why the English version is being added.
I also have tried to remove the unwanted version but this is not feasible for us because of performance issue as we are going to have lot many items.
Below is code snippet for example.
Sitecore.Globalization.Language language = LanguageManager.GetLanguage("ar"); //arabic language
using (new LanguageSwitcher(language))
{
var videoItem = ItemManager.AddFromTemplate("SampleName", "<<template ID>>", "<<parent item>>", "<<GUID>>");
videoItem = videoItem.Database.GetItem(videoItem.ID, language);
if (videoItem.Versions.Count < 1)
{
videoItem = videoItem.Versions.AddVersion();
}
videoItem.CloneTo("<<sitecore item where the item to be cloned>>");
}