South African tax residents (such as natural persons, companies and trusts ect.) are taxed on their worldwide income, irrespective of where it is earned. Accordingly, if you are a South African tax resident, you would need to declare any income earned abroad. Whether the income is repatriated to South Africa or not, is irrelevant for tax purposes.
There are however various mechanisms available to taxpayers to ensure that the income in question is not “double taxed”. In certain circumstances, the income can be exempt from being taxed in South Africa or South Africa would need to provide the foreign tax paid as a tax credit against the South African tax due. If South Africa has entered into a double tax treaty with the opposing country, this may also affect the extent of South Africa’s taxing rights to the income.