Why are mBART50 language codes in an unusual format?
It encodes the language and its regional variant, the same way as locales are encoded. hi_IN then means Hindi as spoken in India, en_US would mean American English, en_GB British English. My guess is that en_XX means English in general.
Anyway, the first part of the locale code is the ISO 639-1 language code which is the same as langid uses.
Btw. langid works fine for documents, but not that well for isolated sentences. For isolated sentences, pre-trained FastText classifier delivers much better results.