In the three swans how does the hunter free his wife from their curse?

The hunter frees his wife from the curse by staying faithful to her for three years, not speaking a single word to anyone, and weaving three shirts made of nettles for each of their three swan children. Once the shirts are complete, he places them on his children, and they transform back into their human forms. This breaks the curse on his wife, and she is restored to her human form as well.