The localization library I use supports most of this. Not all, it's not a general purpose programming language of course, but it supports variables and conditionals, which is basically enough to do almost anything.
That's MessageFormat and I think its a pain and severely limited. Maybe it's OK for English, which has really simple grammatical rules, but just add some gender to your plurals and it starts to become very complicated very quick.