title: Problem using Yandex translater API in Python
body: <p>I've been asked to translate some words, and I'm using Python to do it. Yandex has an API that is supposed to be used withing Python, documentation here : </p>
  
  <p><a href="https://pypi.org/project/yandex-translater/1.0/" rel="nofollow noreferrer">https://pypi.org/project/yandex-translater/1.0/</a></p>
  
  <p>I followed the steps, but Always get the same error that seems to be withing the API, or maybe I'm not setting Something right in my code. </p>
  
  <p>The code goes as follow : </p>
  
  <pre><code>from yandex import Translater
  
  tr = Translater()
  tr.set_key('my API key not given here')
  tr.set_text("Hello World") 
  tr.set_from_lang('en')
  tr.set_to_lang('fr')
  
  result = tr.translate()
  
  print(result)
  </code></pre>
  
  <p>I then get this error : </p>
  
  <pre><code>File "C:\Users\BMQT\Desktop\Scraping\test.py", line 2, in &lt;module&gt;
  tr = Translater()
  File "C:\Program Files\Python37\lib\site-packages\yandex\Translater.py",     line 23, in __init__
  self.default_ui = locale.getlocale()[0].split('_')[0]
  AttributeError: 'NoneType' object has no attribute 'split'
  </code></pre>
  
  <p>A quick look if you need in the translater.py goes as follow for line 23 : </p>
  
  <pre><code>self.default_ui = locale.getlocale()[0].split('_')[0]
  </code></pre>
  
  <p>Is the API broken or am I wrong in my code? Thanks for the answers! </p>