add locale support to code