Translatable and untranslatable segments using styes and rules - Word

Is it possible to make a character style translatable inside an untranslatable paragraph style?
In my particular case, all these segments are preceded by "//" or "///".

The idea is to translate only the comments inside a programming code.

emoji