We generate translation files with placeholders that are populated later, but have a problem regarding words in languages that modify the preceding word.
For instance, we've written a translation template which looks like this:
because of %name%, you.....
This is problematic because in French, the translation 'of' differs if the %name% begins with a vowel or not.
For instance, if the person was Andy, it should be:
d' Andy
Whereas for Steve it would be:
de Steve
What's the best way of handling this case?
I can see similar problems have been solved regarding the English indefinite article (a vs an) here, but I'm wondering if there is a smarter way of doing it rather than a custom filter for each situation we come up against (we're in many languages and I suspect other similar problems will come up as we expand our languages).
(I'm also working on getting an entirely different translation which would be ideal!)