It works because the translator can write template code that is executed by the templating engine at runtime, so the translator can write something like this as the translation:
We provided the translators with some basic examples of if/then/switches and so on, they were free to do all sorts of crazy things (especially in polish).
Oh, ok, I understand now — that would work fine, then. It's actually a good solution, because it lets your translators customize strings right where they have the full context, e.g. in final templates.
(unless I'm misunderstanding something in your templating scheme)