The region answer is short
There is no point asking whether a Hulu code works in another country. The service is not sold there, so an account cannot exist for the code to land on.
If the recipient is outside the US, this is the wrong brand and we should be talking about something else in the streaming category.
How the credit works
Redeemed credit sits on the account and covers the monthly charge until it is used up. After that, billing returns to the payment method on file — the same pattern as the rest of this category, and the same warning applies: the subscription does not stop by itself.
Plan tiers change the maths
The service sells several tiers, and the gap between the cheapest ad-supported plan and the bundled or live-TV tiers is large. A card that covers several months on one plan covers a fraction of that on another.
If you are aiming at a specific number of months, we need to know which plan they are on. Otherwise treat the amount as a contribution rather than a period.
Bundles
Where the subscription is part of a package sold with other services, the package is billed together and a single-service code usually cannot apply. Same problem as elsewhere in this category — worth one question before buying.
App store billing
If they subscribed through a phone, the app store bills them and app store credit is the right product instead. Have them check the billing screen.
Asking for one
Confirm the account is a US account and tell us roughly what you want to cover. We will say what is possible before issuing anything.