As far as I know it wasn't possible for scripts to access language ID's and their names using documented API's. Ref !147769