USA and Japan both have hard currencies, they can write-off both internal and external debts.
Emphasis being on "can". Other countries that don't have a hard currency simply cannot get rid of external debt unless they have a hard currency.
Hmm...theoretically speaking, any of these combinations is possible:
1. A country with a hard currency can write off both internal and external (payment must still be made) debt, as you rightly point out.
2. A country which does not have a hard currency most definitely cannot write off external debt, in the sense that it must find a source of repayment apart from printing notes.
3. A country without a hard currency, however, can write off internal debt, provided:
a) it is able to manage its sovereign rating (because writing off debt is an implied admission that the country is either unable to repay or is not interested in repaying, both leading to credibility issues)
b) inflation is kept within control (internal debt could be owed to various institutions, and not all of it can be simply written off. Some of it will need to be paid to creditors by issuing more money, leading to inflationary conditions.)
c) currency is not suddenly devalued (same reason as above)
There is another variable to be considered. A country with an improving balance of trade/payments, even if its currency does not qualify as "hard", can consider writing of both internal and external debt. For the first scenario, china is a case in point. The NPA situation with Chinese banks, and the debts piled up by the local governments are internal government debt. China has already made the first move towards a partial write-off. In the first half of this year, Chinese local governments were instructed to convert certain high-interest bearing debt into low interest bonds. These will most likely be written off. If China can manage to pull this off, it will then try to do so increasingly with the rest of its debt.
Whether a country exports a lot will decide whether or not it has any leverage to write-off external debt as well. Take Iran's example. During the entire period that Iran was sanctioned, it sold crude to foreign governments. Some governments, instead of paying Iran in hard currency, tried to negotiate part-payment in their respective currencies. That would, of course, only be possible if Iran had any use for that currency for paying for imports from that country. India also tried such a negotiation, although with limited success. Only a small part of the money owed was converted to rupees. The Chinese, it can be assumed, would have more success in doing so.