locale observer code refactored