Move language detection from platform