Does YouTube detect the country of its users (video viewers and people who have liked a video) by their IP address or by details they have given (country information they have given when signing up to Gmail or a YouTube channel)?
Country is determined by the location of the network connection used to connect to YouTube, most likely by IP.
My Google account is registered and set to the UK, but I'm often in the Netherlands. When I'm in Holland I get a little "NL" next to the YouTube logo, and when I VPN into my office in London it changes to a "GB".
YouTube, as well as other sites (Google, facebook,...), use the network, to which you are connected to, to determine your physical location in order to deliver local news, advertisement, appropriate suggestions, and even the page in the local language.
In order to avoid this when I travel I use a DNS IP address which is near my home. You can also VPN into the desired location, if any. Or you can modify the website address to reflect the correct country (i.e. www.google.ro).