Smarter locale code