Fixed #20398 - Added language selection code to example in documentation

Thanks ggbaker for the suggestion and Simeon Visser for the patch.