Inscription - Shumen historical mosque (Bulgaria)
That is the seal of Ottoman Empires. It is neither completely Arabic, nor Persian, It is a combined language called "Osmanlica" in Turkiye, meaning something like Ottomanic.
This tughra must be Selim III's. The mosque in Shumen it is on was built in 1740-1744, and the only Ottoman sultan called Selim after that date was Selim III, who ruled from 1789-1807. The tughra's got more complicated as the years went on, the first, from the 14th century, were relatively simple. Apart from the sultan's name much of the calligraphy is symbolic and not words as such. For example, the two lines reaching out to the right are symbols for swords, and thus the military power of the sultan.
(I must give credit to Renal and Graham Spicer for the information about the tughra)