cancel
Showing results for 
Search instead for 
Did you mean: 

Rule to set a document's language depending on the file name

ostein
Champ in-the-making
Champ in-the-making
Hi,

has anyone written a script to do this? Basically, if a file has "_en" in its name, I want to set it to english for our english users to be able to find it…

Regards,
Oliver
1 REPLY 1

ostein
Champ in-the-making
Champ in-the-making
I understand that adding the "cm:mlDocument" aspect would do the trick, but executing a script that calls:

document.addAspect("cm:mlDocument", "EN");
document.save();

actually destroys the document… am I thinking the wrong way?