I've got a multiple language site. With html, javascript, might be ajax if the image doesn't appear in the spanish language folder, it will load image in the british folder.

path example british site : images/home.digital the spanish language site : es/images/home.digital

Today i've message.qualities ... stuff for doing text conversion message.qualities message_es.qualities

You should use onerror for that image

<img src="es/images/home.digital" onerror="this.src='images/home.jpg'">

but, IMHO, it is best for the job on server side

I'd accept Rafael it's easier to handle that kind of factor around the server side, but when you need to do it via AJAX and handle it with javascript, I'd just determine in case your AJAX call came back having a 404 code after asking for the look, if that's the case, go to load the British version.