How to change language in dynamic pages

Wix normally does not allow language change in dynamic pages, how can I write a code that can find the text of the language I selected on the content manager when I change the language?