See Text Search Languages (page 556) for a list of supported languages. 

For example, a collection quotes contains multi-language documents that include the language field in the docu- ment and/or the embedded document as needed: 

{ _id: 1, language: "portuguese", original: "A sorte protege os audazes.", translation: [ { language: "english", quote: "Fortune favors the bold." }, { language: "spanish", quote: "La suerte protege a los audaces." } ] } { _id: 2, language: "spanish", original: "Nada hay más surrealista que la realidad.", translation: [ { language: "english", quote: "There is nothing more surreal than reality." }, { language: "french", quote: "Il n'y a rien de plus surréaliste que la réalité." } ] } { _id: 3, original: "is this a dagger which I see before me.", translation: { language: "spanish", quote: "Es este un puñal que veo delante de mí." } } 

If you create a text index on the quote field with the default language of English. 

db.quotes.createIndex( { original: "text", "translation.quote": "text" } ) 

Then, for the documents and embedded documents that contain the language field, the text index uses that lan- guage to parse word stems and other linguistic characteristics. 

For embedded documents that do not contain the language field, 

• If the enclosing document contains the language field, then the index uses the document’s language for the embedded document. 

• Otherwise, the index uses the default language for the embedded documents. 

