[fix] Proper handling locale in api and cli