sample code of client side localization