In Chinese culture and history, pigs and goats are used metaphorically to represent different types of foreigners or foreign powers.
In Chinese tradition, the pig is often associated with gluttony and laziness. Therefore, when referring to foreigners, the term "pig foreigners" (猪外国人) can be used to describe individuals or groups seen as greedy, self-indulgent, or lacking discipline.
On the other hand, goats have a more positive connotation in Chinese culture. They are often associated with agility, resourcefulness, and independence. Historically, the term "goat foreigners" (羊外国人) was used to describe foreigners who were perceived as intelligent, adaptable, or politically astute.
These animal metaphors were primarily used during the late Qing Dynasty and in the early 20th century when China faced numerous challenges from foreign powers during the period of unequal treaties and colonialism. These terms reflect the Chinese people's views and stereotypes towards different groups of foreigners during that time.