idk why I didn't look this up before implementing it but the standard is to use a hyphen and not an underscore, eg. en-US and not en_US
This would remove all the criss-cross conversion bs I had to implement so the browsers would correctly understand the locale codes.