Site logo

Dictionary

Set dictionaries

Main();

function Main() {
	var doc = app.activeDocument;
	
	var languageWithVendors = app.languagesWithVendors.itemByName("English: USA");
	languageWithVendors.hyphenationVendor = "Hunspell";
	languageWithVendors.spellingVendor  = "Hunspell";
	
	doc.textDefaults.appliedLanguage = languageWithVendors;
}

Before

After

Get list of languages

var languagesWithVendors = app.languagesWithVendors;

for (var i = 0; i < languagesWithVendors.length; i++) {
	$.writeln(i + " - " + languagesWithVendors[i].name);
}

> app.languagesWithVendors.length
Result: 54

0 - [No Language]
1 - Bengali (India)
2 - Gujarati (India)
3 - Hindi (India)
4 - Kannada (India)
5 - Malayalam (India)
6 - Marathi (India)
7 - Oriya (India)
8 - Punjabi (India)
9 - Tamil (India)
10 - Telugu (India)
11 - Bulgarian
12 - Catalan
13 - Czech
14 - Danish
15 - German: Swiss
16 - German: Swiss 2006 Reform
17 - German: 1996 Reform
18 - German: 2006 Reform
19 - Greek
20 - English: Canadian
21 - English: UK
22 - English: USA
23 - English: USA Medical
24 - Spanish
25 - Estonian
26 - Finnish
27 - French: Canadian
28 - French
29 - Croatian
30 - Hungarian
31 - Italian
32 - Lithuanian
33 - Latvian
34 - Norwegian: Bokmål
35 - Dutch: Old Rules
36 - Dutch: 2005 Reform
37 - Norwegian: Nynorsk
38 - Polish
39 - Portuguese: Brazilian
40 - Portuguese: Orthographic Agreement
41 - Portuguese
42 - Romanian
43 - Russian
44 - Slovak
45 - Slovenian
46 - Swedish
47 - Turkish
48 - Ukrainian
49 - English: USA Legal
50 - German: Old Rules
51 - Hebrew
52 - Arabic
53 - German: Austria 2006 Reform