Indonesian is supposed to be an easy language to spell and to pronounce. When you begin studying Indonesian history, the truth is a little more complicated.
The Indonesian language of today is a standardized form of Malay, which has been used as a common language through the area for many centuries. Most of the other languages of Indonesia, such as Javanese, Sundanese, Acehnese etc. are in the same language family as Malay. All these languages use mostly the same set of sounds, but they have all borrowed words from outside languages as well. When you dig back into history, you find that Indonesian has taken words from Sanskrit during the early eras, from Arabic when Islam arrived, and from European languages in more recent years.
The languages of Indonesia have used many writing systems over the years as well. Alphabets from the south of India, very similar to the alphabets used in Thailand or Cambodia today, were used for many centuries to write the native languages of Indonesia. The huruf jawa are still used in Central Java for traditional and ceremonial purposes. When Islam arrived in Indonesia, much scholarship was done in the Arabic language, and speakers of Malay and other languages began to write their native words using Arabic script. The alphabet had to be expanded to include sounds such as "p" which do not occur in classical Arabic, but since such letters had already been invented in Iran and India, this was not a problem. Use of the Arabic alphabet for Malay and Indonesian languages continued well into the colonial period. Arabic script used to write Malay or Indonesian is sometimes called "Jawi" script.
During the period of Dutch colonialism, Indonesian languages began to be written in the Roman alphabet. However, Indonesian names would be written using Dutch spelling, which can look unusual to anyone who does not speak Dutch.
The Indonesian language as we know it today was standardized in the 1930s, as part of the movement for independence. It was (and is) a source of national unity and pride. Today's spelling is simplified and easy to learn. But after so many centuries of different alphabets, borrowed words, and spelling rules, you still run into some strangenesses. What follows here is a letter-by-letter summary of how you should deal with each member of the alphabet when you are studying history in Indonesian. (This is primarily for speakers of English, by the way.)
A is pronounced like the a in father (or the a in Spanish, Italian, German, and most languages).
However, in Javanese, an a at the end of a word, or even in the middle, is pronounced as an o. In the old huruf jawa alphabet, this was spelled with the character for a. Today it is usually--but not always!--spelled with an o as it is pronounced. You usually see Diponegoro, but you might also see Dipanegara, which matches the old Javanese spelling. When you say it, use o, not a.
Sometimes you will see two a's together: aa, as in kebangsaan. There is a quick glottal stop between the two a's, as in when we say uh-oh in English.
The combination ai sounds like English "eye", and the combination au sounds like the ow in English "cow".
B is pronounced as a regular b. You will see bh in words like bhakti that are borrowed from Sanskrit--you can pronounce this as a regular b as well.
C is pronounced as English ch in chop. In older Dutch spelling, this was spelled tj, for example Tjokroaminoto. In words that are still "foreign", you should pronounce this as a k, of course ("Coca-Cola" is the same as anywhere).
Ch is the Dutch spelling for the sound in Dutch and German "acht" or Scots English "loch". This sound is found in Arabic loan words. In the modern spelling, this sound is spelled kh.
D is usually pronounced as a regular English d.
Dh might show up in borrowed words from either Sanskrit or Arabic. If the word is from Sanskrit, such as dharma, you can just pronounce it as a regular d. If the word is from Arabic, such as Ramadhan, you can generally use a regular d here as well, although if you know how to make the sound of Arabic "dad" you will sound very scholarly. The Arabic sound is called a pharyngeal d, and it is made with the throat tightened. It might change a following a to an o. But note also:
Dz is used to represent the Arabic letter "dhal", comparable to the sound of English th in "the".
(If you know both Sanskrit and Arabic, you will have no trouble at all!)
Dj is the older, Dutch-style spelling for j. Pronounce it as a regular English j.
E is pronounced like either e in "cafe latte"; in other words, like the e of French or Italian. Like both French and Italian, there is a "close" e and an "open" e--and like Italian, this difference does not show up in writing. Don't worry too much about it, although in some books you might see an é once in a while.
You may see an eu in some areas: this is a Dutch-style spelling for the sound of German ö.
F is pronounced as a regular f. The f sound is not native to Indonesian, but occurs in borrowed words from Arabic or European languages.
G is pronounced as a regular g. The combination ng is always pronounced like English ng in singer, even at the beginning of a word.
Gh is found in Arabic loan words. You can try pronouncing it like a g that doesn't stop, or as a voiced kh, but if you pronounce it as a regular g, nobody will complain.
H by itself is a regular h as in English, although it can occur at the end of a word as well.
In Arabic loan-words where the original sound is a pharyngeal h, you might see a following a turn to an o from being pulled farther back in the mouth.
Likewise, other pharyngeal sounds from Arabic are shown with an h: see also dh, sh and th.
An h between two vowels can almost disappear, as in Majapahit. But if the two vowels are the same, the h should be pronounced, as in mohon.
I is pronounced like the i in pizza--or like i in Spanish and Italian.
Ie is an older, Dutch-style spelling, pronounced the same way.
J is pronounced like a regular English j. However, in the old Dutch spelling, j was pronounced like an English y. See also dj, sj and tj.
K is pronounced like a regular English k. At the end of a word, the sound disappears, and is replaced by a glottal stop, just as if the last vowel was cut short suddenly, as in bapak or masuk.
Often k is used in Arabic loan words that have the Arabic letter "qaf" in the original, such as kiblat. This sound is further back in the throat than a regular k, and may change a following a to an o. Likewise, you will even see a k pressed into service to represent an Arabic "ayn", as in the word dakwah.
Kh is the modern spelling for the sound in Dutch and German "acht" or Scots English "loch". This sound is found in Arabic loan words. In the old Dutch spelling, this was spelled ch.
L is pronounced like a regular English l.
(In Aceh you see the spelling lh. I think this is pronounced like Welsh "ll", an unvoiced l.)
M is pronounced like a regular English m.
N is pronounced like a regular English n.
Ng is pronounced like in the English word singer--one sound, not two. It is pronounced this way even at the beginning of a word.
Ny is pronounced like Spanish ñ in año--one sound, not two. It is pronounced this way even at the beginning of a word.
O is pronounced like English o in "no", or even better, like Spanish o in "no".
Oe is the older Dutch-style spelling for the sound now written with the a u, the sound of oo in English "soon".
See also a above.
P is pronounced like a regular English p, although not as breathy.
Q shows up in borrowed words from Arabic, or from European languages. Pronounce it as a k if you like. The correct Arabic sound ("qaf") is further back in the throat, and may pull an a back to an o.
R is a Spanish-style trilled r (but not too trilled).
S is pronounced like a regular English s (and never like z).
Sh is found in borrowed words from Arabic. This is a pharyngeal s, pronounced with the muscles tightened in the back of the throat. It may change a following a to an o.
Sy is how Indonesian spells the sound of English sh. In the older Dutch-style spelling this was sj. This sound only happens in borrowed words.
T by itself is like English t, but less breathy.
Th is found in borrowed words. In Arabic words, this is a pharyngeal t, pronounced with the muscles of the throat tightened. This sound may change a following a to an o. In words from India or Europe, however, th might be the same as English th in "thin". In any case, you may hear th pronounced as a simple t.
Tj is the older Dutch-style spelling of the sound of English ch. This is now spelled with a c.
Ts is occasionally used to represent the Arabic letter "tha", pronounced like English th in "thin".
U is the same as Spanish u, or English oo in "soon".
V is pronounced like a regular English v. It does not occur in native Indonesian, nor in words borrowed from Arabic. Almost all words with v are borrowed from Europe, some from India.
W is pronounced like English w.
X is pronounced like English x, or at the beginning of a word like English s. It only occurs in borrowed words, usually from Europe.
Y is pronounced like English y. See also the combinations ny and sy.
The notable exception! The famous city of Yogyakarta is pronounced differently. Each y in Yogya is pronounced like English j in "John".
Z is pronounced like English z. It is found in borrowed words, mostly from Arabic, but also from Europe.
Zh is used to represent the Arabic letter "za", a pharyngeal z pronounced with the muscles of the throat tightened. It may change a following a to an o.
Now, let's compare some old spellings with some new ones: