If i bought a tmobile iphone would in the US would it work to use and live with in El Salvador?

If i bought a tmobile iphone would in the US would it work to use and live with in El Salvador?

It would have to be unlocked.

First, you would need T-Mobile to unlock the phone. Otherwise, it won't accept any other carrier's SIM card. Next, you need to know what frequencies/bands the carrier you plan on using in El Salvador are and if the T-Mobile phone supports them.

I had an LG G3 Verizon that I used with MoviStar on my trip to Mexico almost a year ago and I never got 4G LTE there even if there was coverage.

Also, some features may not work if you're not using T-Mobile service. Some of these features may include: mobile hotspot/tethering, visual voice mail, over the air updates, and some other apps/features.

Try this page: https://willmyphonework.net/