Singapore was founded as a British trading colony in 1819 .