islam's success was primarily due to a process that historian term "localization" by which islamic teaching were often adapted in ways that avoided avoid major conflicts with existing attitudes and customs. local heroes often became islamic saints, and their graves were venerated places at which to worship. some aspects of mystical islam resembled pre-islamic beliefs, notably on Java. cultural practices like cockfighting and gambling continued, and spirit propitiation remained central in the live of the most Muslims, despite lslam's condemnation of polytheism. Women never adopted the full face veil, and the custom of taking more than one wife was limited to wealthy elites. law codes based on lalam usually made adjustments to fit local customs.