How do I check if a particular language is available?

I need to check if the device has a certain language of speech (TTS).
How can this be done?