I'm developing a multilanguaged comics website and all the inserted comics must be in english and portuguese.
I've got success on managing multiple titles doing so:
ComicViewModel.cs:
public class ComicViewModel
{
[Key]
public int Id { get; set; }
[Required(ErrorMessage="A data não pode ficar em branco.")]
[DisplayName("Data")]
public DateTime Date { get; set; }
public IList<LocalizedTextViewModel> Titles { get; set; }
}
LocalizedTextViewModel.cs:
public class LocalizedTextViewModel
{
public CultureViewModel Culture { get; set; }
[Required(ErrorMessage = "Este campo não pode ficar em branco.")]
public string Text { get; set; }
}
CultureViewModel.cs:
public class CultureViewModel
{
public int Id { get; set; }
public string Abbreviation { get; set; }
public string Name { get; set; }
public CultureViewModel() { }
public CultureViewModel(Database.Culture culture)
{
Id = culture.Id;
Abbreviation = culture.Abbreviation;
Name = culture.Name;
}
}
The problem is I can't figure out how to manage the comic images upload. I need upload more than one image, each one referenced to it's language.
Anyone has any ideas?