a proper solution would be using Shopify Markets and Geolocation App. Here’s what you can do:
Enable shopify markets – Go to Settings > Markets and set Portugal as a separate market with Portuguese as the default language.
Use shopify’s geolocation app – This will suggest the right language based on the visitor’s location instead of forcing a redirect.
Change primary market settings – If Shopify doesn’t allow switching the primary language, try duplicating your English content and making it the default for all international markets.
Consider a third-party app – Apps like Langify provide automatic language redirection with a smoother experience