[keyboard] use better language code detection.