In order to totally move away from page-per-language we'd need something like the below (pseudo code):
So this is some thing, we'll explain how to use it... Lorem ipsum, lorem ipsum, lorem ipsum,
lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum, lorem ipsum...
@@snip-text[example-snippet, Scala]
In scala the thing is provided via an implicit parameter, yay!
@@snip-text
@@snip-text[example-snippet, Java]
In java you gave to get the thing via Get.getTheThing, simple.
@@snip-text
Scala
: @@snip [example-snippet](/../../../build.sbt) { #setup_example }
Java
: @@snip [example-snippet](../../../pom.xml) { #setup_example }
If you see what I'm getting at. This way for either language the text would "feel right".
Just putting the text into the snippet does not feel right, we'd randomly have bits inside the tab and others not.