How to Identify Language in a Text with JavaScript?

How to Identify Language in a Text with JavaScript?