Add locale code

This all goes into ``libcextra``.