The lemma at wikipedia is very much restricted to languages as sets of (finite length) strings. I believe that formal language theory is nowadays considered more broadly. Its "languages" may consist of infinite length strings, trees, partial orders, two-dimensional grids and graphs.
One studies ways to define (grammatical, logical, algebraical) or recognize (with automata) such languages, and given one of those language families their (combinatorial) properties.
As in the remark by Steven, one may code one type of object into another. A string function consists of string-pairs, which can be coded into single strings. Another example is the coding of a tree into a string (sometimes using brackets).
A function translating objects is sometimes called a transducer. One has for instance finite state transducers, like finite state automata but with output. In complexity theory transducers play a role in problem reductions where the transducer might be a two-tape Turing machine translating one problem into another.