How to dynamically change the locale?

How to dynamically change the locale?

tech