If you marry a foreign citizen in that country and register the marriage as per the law of that country then it may not be mandatory for you to get your marriage registered as per Indian laws.
However if you would like to get your marriage registered as per Indian laws then you may have to get it registered under special marriage act by following the procedures prescribed in the law accordinlgy.