Express middleware to determine locale.