It looks like you’re trying to use Conditional Replacement – but it’s not a flexible if-then-pattern-matching syntax. The only thing you can use with {{#
or {{^
is the name of a field. It is only looking for “is there data in that field?” And the only answer are “yes” and “no.”
If you want to see a practical use of it, you can also take a look at the templates for the “Basic (optional reversed card)” notetype.
That’s not necessary though, right? Your multiple notetypes are working just fine?
I admit, there are derfinite advantages to being able to make an improvement in just one place, rather than on multiple notetypes. But I don’t think there’s a simple way to do this. And if you implement a complicated way that someone else suggests, you’re not going to be able to maintain it yourself. It seems like you’re just injecting instability into your collection unnecessarily.
If you’re dead-set on creating the one-notetype-to-rule-them-all, why not implement a simple solution, using bedrock Anki functionality? To do anything in this direction, you’ll need to have something that tells the tool/script/code which language to apply to this card, right?
Following the model of basic-optional-reversed – you could add a field to indicate a Note belongs to a language. One field, where you name the language? Nope. A field for each language you are studying – isRussian, isSpanish, isTurkish, isZulu, etc… Put something (anything) in the appropriate field for each note (see how fast sticky fields becomes your new best friend!). Then you can make your ultimate audio card template like this:
{{#isRussian}}
{{tts ru-RU voices=Apple_Milena_(Enhanced):Front}}
{{/isRussian}}
{{#isSpanish}}
{{tts es-ES:Front}}
{{/isSpanish}}
{{#isTurkish}}
{{tts tr-TR:Front}}
{{/isTurkish}}
{{#isZulu}}
{{tts zu-ZA:Front}}
{{/isZulu}}
– as many languages as you want. Readable, easily maintainable, and all contained on one template.