fix error when language was not English, better method to check language

This method is far better than the old one and it works through proxies.

Please test it and push it to the gallery. Thanks.