added auto locale support