You're likely referencing the two-hour episode "The Offspring" (Star Trek: The Next Generation, Season 3, Episode 16). In a Ten Forward scene, Data converses in French with a poker-playing gentleman.
However, no actual French dialogue is scripted or subtitled. Data merely states he understands and speaks French; the gentleman compliments his fluency. The scene demonstrates Data's linguistic capacity, not a specific conversation.