Code for implementing BCP 47 support in Firefox.