İranlılar is a tongue twister :/
why not: onlar iranlılar bir kitap yazıyor
You don't use "onlar" before a noun -- only when it is standing by itself to mean "they".
Before a noun, it's just "o ...." whether it is "that X" or "those Xs".
thank you sir
That would mean "They Iranians are writing a book".
"O" here is the demonstrative pronoun (that or those), not the singular personal pronoun (he, she, it).
I also got them confused :)