<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_language(self, language):
 """ Set the given language for all the text fragments. :param language: the language of the text fragments :type language: :class:`~aeneas.language.Language` """

        self.log([u"Setting language: '%s'", language])
        for fragment in self.fragments:
            fragment.language = language