Yes, it is legal to trade forex in South Africa, as long as you are doing it through a FSCA regulated CFD broker.
a. Only authorized brokers with 'CATEGORY I' license for Forex investment & Derivative instruments products have the required license to offer forex trading.
Most of the brokers apply for Intermediary Other, meaning they cannot offer active advise to clients/traders.
You can verify the legal brokers from: https://www.fsca.co.za/Fais/Search_FSP.htm by entering their FSP name or number.
Some brokers claim they are FSCA regulated, but they may not be approved to offer forex trading. So, always check it, see attached screenshot of what you should see.
b. Regulated forex brokers that want to offer CFDs in South Africa as a counter party (market maker brokers), have to also be authorized as ODPs, you can check approved ODPs from: https://www.fsca.co.za/MagicScripts/mgrqispi.dll?APPNAME=Web&PRGNAME=Search_ODP
But remember that forex trading is a leveraged derivative instrument, so don't risk your money without proper financial education & understanding of the risks.