How to translate thank you message based on the language selection?