added needed code for resolving locale