There were three key ways that Romantic composers created nationalist music: overtly political music, patriotic music, and national music.
In Western music: Establishment of the Romantic idiom. Nationalism—the consciousness of the distinctive features of a nation and the intent to reveal, emphasize, and glorify those features—played a prominent part in Romantic music, partly as a result of social and political developments.
Hope this helps!~
-DizzyImDizzy