code: def set_fallback_locales(self, locales):
          
          # needed as the fallback locales are linked to the already loaded
          # catalogues
          self.catalogues = {}
  
          for locale in locales:
              self._assert_valid_locale(locale)
  
          self.fallback_locales = locales
docs: Sets the fallback locales.
  
          @type locales: list[str]
          @param locales: The falback locales
  
          @raises: ValueError: If a locale contains invalid characters