This is due to the fact that in order to ensure that the film is in fact a film is not as simple as checking that it has the director property, it must also take the instaceOf property (which all the entites in wikidata have) and ensuring that it's value is film.
However, when generating in Spanish, the actual retrieved value is película.
There are two possible solutions for this problem:
Ensuring that the value is always retrieved in English
Changing the value to check depending of the language we are generating on.
Alternativelly, we could also remove the film aspect, and simply generate directors, but this will need to be followed by some other changes to be able to tell the users what they are trying to solve (the director of a movie, the director of a film.
This is due to the fact that in order to ensure that the film is in fact a film is not as simple as checking that it has the director property, it must also take the instaceOf property (which all the entites in wikidata have) and ensuring that it's value is film. However, when generating in Spanish, the actual retrieved value is película.
There are two possible solutions for this problem:
Alternativelly, we could also remove the film aspect, and simply generate directors, but this will need to be followed by some other changes to be able to tell the users what they are trying to solve (the director of a movie, the director of a film.