Update code to use 'locale' instead of 'language'