Handling language codes when dashes and underscores are discouraged