The "Language of the text" is not a problem for most books, so let's deal straightaway with the common case:

If the language of the book's text and the language spoken by the intended audience are the same
– the book's written in English for an English speaking audience (or French for French, or Spanish for Spanish) --
then the "Language of the Text" is just English (eng) – or just French (fre) or just Spanish (spa).

It's handled exactly the same in ONIX 2.1 or 3.0:

<Language>
    <LanguageRole>01</LanguageRole>  <!-- code for language of text -->
    <LanguageCode>eng</LanguageCode> <!-- ONIX Code List 74 from ISO 639-2/B -->
</Language>

That covers most books nicely – but before we move on you should realize how important that is to an on-line retailer. You're probably only submitting your data to "same language" retailers but they will still be mixing your data with other companies and may be doing a select on their data set for language:  

Get this wrong and it can mean on-line listings offering Spanish books to English speakers. No one will be happy.

90% of publishers can stop here – it is obvious what language your book is written in is. And for those cases where there are other considerations -- it's for language instruction, it's in dialect or written as a "country specific" version (example US vs UK English), or the audience just isn't that simple then, you should go read the P.10 Language section in

ONIX for Books Implementation and Best Practice Guide

It's short, clear and has examples – read it please – but here are some emphasis points:

Mostly you should think of the "Language of Text" as a proxy for the language used by the audience. 

Language instruction books should be sold to the language who will use the book.

Information about Translations

Trick question:  If the translator to English worked from a Spanish translation of an original German book how should you handle it?  Publishers work hard to create scenarios that defeat all metadata systems – but you could handle it in ONIX by using the two alternatives above. Would you still do it the same way if it there was a marketing reason that the reader should know the Spanish translation was chosen as the base? I really have no idea, but that's what Descriptions are for – that's where important marketing messages go.  Talk to your trading partners, ask questions, but mostly do the obvious in a straightforward way.

Supplementary assignment: Give examples of ways a publisher can defeat any metadata standard. Bonus points for commissioning a book that does it.

Metadata language vs Language of Text

ONIX 3.0 allows for multi-language metadata.  India is a goode use case as there are 3 major languages and an audience who are multi-lingual but might be most comfortable in one language over another.  In such an environment wouldn't it be great to provide the metadata in the language the reader is most comfortable in?   ONIX 3.0 provides it by allowing many composites to repeat if language attributes are provided.  So rather than awkwardly repeating the title three times in one entry, you provide the Distinct Title three times in separate composites set up for each language and identitifed by it's attribute. A retailer could work with such information and provide display options that could help sell books.

BookNet Canada is unaware of any North American retailer ready to use such a facility but there's no harm in having this information ready if you think it can help sell books.  Before retailers implement they test and experiment – and think kindly on publishers who can support their efforts.

Summary

Don't rely on this page for all you need to know.  You should go read the P.10 Language section in ONIX for Books Implementation and Best Practice Guide.  It's short, practical and comprehensive, providing language knowledge without the sophomoronic humour.