Avatar

Correct answer by
Employee Advisor

Hi @Maple-Michelle1

Perhaps you've solved this already. Normally the out of the box Browser > Language audience rule options should work fine. However, if you find them not working as expected you could use a profile script to define an audience. The profile script could check for the four languages you care about and return which one is most preferred. Something like this:

var brL = user.header('accept-language') || "0";
if (brL.search(/^ja|^en|^fr|^de/) > -1) {
	return brL.substring(0,2);
}

Then in your English audience rule use: Visitor Profile > Name-of-your-profile-script equals: en

Hope that helps.

 

View solution in original post