Shred cabbage coarsely. Heat oil in a large saucepan and fry the onion and chillies until soft. Add garlic and ginger and fry, stirring until slightly caramerlized (if using red cabbage, you will notice a caramelization, but it won't be as distinct. You'll want the cabbage still slightly firm).
Add turmeric and cabbage, fry and toss cabbage in the mixture, then cover and cook over low heat for 10-15 minutes or until cabbage is tender but not mushy.
Sprinkle with salt and mix well; then add coconut and stir to mix thoroughly. If there is any liquid in the bottom of pan, leave cover off and stir over medium heat until all the liquid is absorbed.