I would pursue a recursive strategy. Try making a method like this:
The prefix would be a
string that does not change, to be prepended to each alternate, while the input is what makeAlternates is responsible for making alternate versions of. Within makeAlternates, you just need to find the
first thing that has alternate versions (I.e. Ä, Ö, AE, OE, and whatever else has alternate forms. Then recursively call makeAlternates for the remaining things to be found.
So given
FOOÄBARÖBAZ
if you call
makeAlternates("", "FOOÄBARÖBAZ");
it should find that Ä is the first thing it needs to alternate on, so it should then call
makeAlternates("FOOÄ", "BARÖBAZ");
and then
makeAlternates("FOOAE, "BARÖBAZ");
Expanding on that, you would get the following sequence of calls: