Reputation: 309
I am trying to set the browser locale to Japanese. I am using the following piece of code :
FirefoxProfile profile = new FirefoxProfile();
//setting the locale japanese : ‘ja’
profile.setPreference(“intl.accept_languages”,”ja”);
driver = new FirefoxDriver(profile);
"intl" is not recognized on the eclipse editor. It says "intl" cannot be resolved to a local variable. Eclipse does not suggest any imports either. It asks me to create a local variable "intl".
I dont know any other way to go about this. Any suggestions ?
Upvotes: 1
Views: 177
Reputation: 474071
I think your quotes should be fixed. Replace:
profile.setPreference(“intl.accept_languages”,”ja”);
with:
profile.setPreference("intl.accept_languages", "ja");
Upvotes: 1