@saskatchewan I think that trimming the language in the list entries is at this point a kind of "nice to have"...
If I can express myself frankly, look at the beginning of the list entries only for "translation purposes"...
Otherwise my eyes jump directly to the language ID in squarebrackets.
Nevertheless I've some experience with regular expressions... maybe I can take a look on that trimm process I you mind.
Just let me know.