detectLanguage

Detects the language of a mnemonic phrase.

Iterates through all supported languages and returns the first one where all words in the mnemonic exist in the word list.

Note: Some words may exist in multiple languages. This function returns the first match found, which may not be the intended language in edge cases.

Return

Detected language, or null if no language matches all words

Parameters

mnemonic

Space-separated mnemonic phrase