While both Swahili and Yoruba are spoken in Africa, they belong to different language families.
* Bantu languages are a large family of languages spoken primarily in central and southern Africa. Swahili is one of the most well-known Bantu languages.
* Kwa languages are a family of languages spoken primarily in West Africa. Yoruba is one of the most prominent Kwa languages.
So, while Swahili and Yoruba are both African languages, they are not related in the same way that English and German are related.