SonarQube Rule to detect specific comment language

Hi SonarQube community,
I find a way to detect specific language (French) used in my code, specifically in comments and logs.
The goal is to reduce French usage and allow English only.
It is possible to do it? If yes, how?

Hi,

Welcome to the community!

To truly work, I imagine you’d have to hook a rule to a French dictionary and grammar engine (verb conjugations &etc). As a relatively simple first pass though you could set up a rule to look for a simple list of strings in comments and names. You’d have to code it yourself though. If you pursue that, feel free to create new threads for specific coding questions in the ‘Writing rules’ category.

 
HTH,
Ann