Text this: A Theory of Formal Choreographic Languages