"Europeans did not have contact with Singapore until the 19th century, so that plot line in Pirates 3, while inspired by history, is an anachronism."
I just saw this posted on a recent AmA by a PhD historian.
Modern Singapore was founded by the british in 1819, but the area was well know by the Portuguese since 1511, and later by the Dutch.
So what's the basis to say Europeans did not have contact with Singapore before the 19th century?
I mean, you've kind of answered your own question there: Singapore didn't exist until 1819, so regardless of whether or not Europeans were in the area, it's anachronistic to say Jack would have been able to casually refer to it as such.
By way of analogy, the capital of Kazakhstan is the city of Nur-Sultan, formerly Astana; the city was founded in 1830 as Akmoly. Whilst the Golden Horde did rule over what's modern-day Kazakhstan in the middle ages, one can't really say one of the local Khans would casually refer to someone being from Astana because it didn't exist yet.
I wrote more about Jack Sparrow and his likely back-story in this earlier post