refactored the Languages class and added the translate_language function