Imagine your phrase/function is called:
"Found %n1 matching files in %n2 directories"
You could pattern match for one particular language like this:
%n1 == 0, %n2 == 0
%n1 == 1, %n2 == 1
%n1 > 1, %n2 == 1
... and so on ...
With the matching being any (simple?) boolean function of the operator, applied in order. At the point where this becomes too cumbersome, you could fall back to proper code. I bet that this would be much easier to use for translators, with an optional fallback to a programmer if it gets too complex to spell out all combinations.