custom masterpage – Give Different Error pages for Variations site in Sharepoint 2016


I have a Web Applcation which contains a Publishing Site with Variations feature enabled. The following is an example URL for the site http://test-server.com/en

I have enabled a custom error page for English Site. But I want to enable a new Custom Error page for Arabic site with the following URL http://test-server.com/ar.

So overall there should be two Error pages one for Arabic and one for English. How do I go about it?