Updating localize function to work with Heroku