Speed up addLanguage api function.