add function of translating text according to locale