入乡随俗 is a common saying in Mandarin that is best translated to English as meaning "when in Rome, do as the Romans do." For example, if you are in China and asked if you are accustomed to the habits, food and lifestyle of the country, you can say "入乡随俗“。{ru2 = to enter},{xiang1 = countryside}, {sui2 = follow} and {su2 = customs}. Let's look at a few example sentences of how to use this idiom.
我在中国住了几年,我已经入乡随俗了。 (wo zai Zhong guo zhu le ji nian, wo yi jing ru xiang sui su le). This sentence translates as the following: I have lived in China for several years, and I have adapted to the native customs.
当你来到我的国家的时候,你要入乡随俗。 (dang ni lai dao wo de guo jia de shi hou, ni yao ru xiang sui su). This translates as the following: When you come to my country, you should adapt to and follow the local customs.