It should also be valid to use just the two letter version of the language as well. It looks like those are mostly what are in the basket db, but not all. You can see in the language drop down on https://www.mozilla.org/en-US/firefox/fx/ that they're all just the 2 letter versions, and with this code I think choosing "Português" would result in failure.