The film you're describing is likely The Fruit of Paradise (original Czech: Ovoce stromu rajských jíme), a 1921 German silent comedy directed by Ernst Lubitsch.
Released in Germany as Die Bergkatze (The Mountain Cat), it's also known by the alternative title The Girl in the Dress. The plot follows a fruit merchant who mistakes a woman for a princess, sparking romantic confusion.
Important distinction: This is not the 1970 Czech surrealist film of the same Czech title by Věra Chytilová. Lubitsch's version is a lighthearted period comedy; Chytilová's is an avant-garde feminist landmark. Same translated title, radically different films.