You need to surround your multiple lines of code in a block, like so:
when(version) {"anhorig" -> { Log.d("TAG", "Anhorig") subHeader.text = getString(R.string.sv_anhorig_ch1) }"personal" -> Log.d("TAG", "Personal") else -> Log.d("TAG", "Else")}
As for the type mismatch, the value of the when expression is equal to the last evaluated statement within the block. It seems like the expected value of this expression is Int, but your last statement is subHeader.text = getString(R.string.sv_anhorig_ch1)
which is string.
You can read more in the Kotlin documentation for when expressions.