link item space return string in language
Hi all,
I'm trying to write a function who return true if the link image in indesign is in bitmap (black and white) color space.
My function works but only if the indesign language is in english.
I explain, the image.space property return "black and white" in english and "noir et blanc" in french.
How I can do to use this function with other indesign versions?
#target indesign
var doc = app.activeDocument;
var array_all_links = doc.links;
for(var i = 0; i<array_all_links.length; i++){
is_image_bitmap (array_all_links );
}
function is_image_bitmap(link_item){
var image = link_item.parent;
if (image.constructor.name == "Image") {
if(image.space == "Black and White"){ // this line doesn't work in french because the return value is noir et blanc…
alert("ok");
}
}
}