input: Write a python function to detect the language of a given text using NLTK library.
  assert detect_language('This is a sentence in English') == 'English'
  assert detect_language('Ceci est une phrase en français') == 'français'
  assert detect_language('Dies ist ein Satz auf Deutsch') == 'Deutsch'
output: def detect_language(text):
      from nltk import word_tokenize
      from nltk.corpus import stopwords
      import nltk
  
      nltk.download('punkt')
      nltk.download('stopwords')
  
      languages_ratios = {}
  
      tokens = word_tokenize(text)
      words = [word.lower() for word in tokens]
  
      for language in stopwords.fileids():
          stopwords_set = set(stopwords.words(language))
          words_set = set(words)
          common_elements = words_set.intersection(stopwords_set)
  
          languages_ratios[language] = len(common_elements)
  
      most_rated_language = max(languages_ratios, key=languages_ratios.get)
  
      return most_rated_language