Original: During World War Two , Slovenia was occupied and annexed by Germany , Italy and Hungary , only to emerge afterwards reunified with its western part ( Slovenian Littoral ) as a founding member of the Socialist Federal Republic of Yugoslavia , before declaring full sovereignty in 1991 .
Simplified: During World War II , Italy , Hungary and Germany took parts of the country but in 1945 it became part of Yugoslavia again .