From http://en.memory-alpha.org/wiki/Universal_translator (Which got it from TOS 2x02: Metamorphosis)
Responding to Zefram Cochrane's question about the theory of operation, Kirk explained that there are certain universal ideas and concepts common to all intelligent life, and that the translator compared the frequencies of brainwave patterns, selected those ideas it recognized, and provided the necessary grammar. Kirk further explained that the device spoke with a voice, or the approximation of one, that corresponded to the identity concepts it recognized.
Since it's already scanning brainwaves, presumable it can also detect intent (whether you want to be understood or not), and decide whether or not to translate as appropriate.