Solved the language problem.

Sorry jw i had to change your code abit. but the test cases still passed.
most of the changes are setting the language object and changing switch
statements to IF ELSE.

Signed-off-by: Nicholas Lum <nicholaslum444@hotmail.com>