How to set language on site object?


I’m currently looking for a solution to the following scenario:

  1. A payment is done via Payment Provider.
  2. In the background the payment provider requests a callback url on my page. So my page does not know which language to use to start further processes and falls back to english.

My question is: Can I set the language on my callback url to the desired language so I can use variables according to the requested language to generate an invoice for example? The desired language is also sent by the post from the payment provider.

Kind regards


As a starting point … I think you can use custom routes to define your callback url and check for the post variables with get().