Translations of the questions are usually independent from randomization. In your case, you would select questions in the random generator, and the interviews cecides the language that these questions will use.
> but only the PHP code is put into the questionnaire at the Compose Questionnaire page
Yes, you would remove the 40 questions (or the two pages) from the questionnaire, and just use PHP code to show (some of) them.
> I followed the questions up to the point where the PHP code is added, but upon testing the survey, I receive an error message stating that “There is no question ID in question().”
That's the point where I would like to ask you to post the debug information shown on that page:
https://www.soscisurvey.de/help/doku.php/en:create:debugging
> but from what I understand they had to be as they are combined questions using a PHP instruction (combine=)
Are you using combined questions (
https://www.soscisurvey.de/help/doku.php/en:create:combine) so far? If not, you won't need them for randomization.
> what should I do, if I would like to have the program to choose 20 PHP codes
I understand that you have been using combines questions before? Okay, that makes the code a little bit more complicated, but not that bad.
Let's start with selecting and presenting the normal questions (use the first of each combined questions for now), and when that PHP code runs, let's take care of the two combined questions.
> I am sorry for this long post
Well, you'll have to read my long answer ;)
> I am quite new to programming
It's the perfect time to learn a bit programming. That's very useful in many situations, including data analysis.