Twelfth Night, or What You Will is a comedy by William Shakespeare, believed to have been written around 1601–02 as a Twelfth Night's entertainment for the close of the Christmas season. The play centres on the twins Viola and Sebastian, who are separated in a shipwreck. Viola (who is disguised as a boy) falls in love with Duke Orsino, who in turn is in love with the Countess Olivia. Upon meeting Viola, Countess Olivia falls in love with her thinking she is a man. The play expanded on the musical interludes and riotous disorder expected of the occasion, with plot elements drawn from the short story "Of Apollonius and Silla" by Barnabe Rich, based on a story by Matteo Bandello. The first recorded performance was on 2 February 1602, at Candlemas, the formal end of Christmastide in the year's calendar. The play was not published until its inclusion in the 1623 First Folio.
Illyria, the setting of Twelfth Night, is important to the play's romantic atmosphere. Illyria was an ancient region of the Western Balkans whose coast (the eastern coast of the Adriatic Sea which is the only part of ancient Illyria which is relevant to the play) covered (from north to south) the coasts of modern-day Slovenia, Croatia, Bosnia and Herzegovina, Montenegro and Albania. It included the city state of the Republic of Ragusa which has been proposed as the setting. Illyria may have been suggested by the Roman comedy Menaechmi, the plot of which also involves twins who are mistaken for each other. Illyria is also referred to as a site of pirates in Shakespeare's earlier play, Henry VI, Part 2. The names of most of the characters are Italian but some of the comic characters have English names. Oddly the "Illyrian" lady Olivia has an English uncle, Sir Toby Belch. It has been noted that the play's setting also has other English allusions such as Viola's use of "Westward ho!", a typical cry of 16th-century London boatmen, and also Antonio's recommendation to Sebastian of "The Elephant" as where it is best to lodge in Illyria; The Elephant was a pub not far from the Globe Theatre.