Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


How can get language name?

Enthusiast ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

TextFrame setting a Language

daitranthanhoa_0-1617614850469.png

 

How can get the name of Language?

I using this Script, but it only return index:

oTextFrame.Characters(1).CharacterAttributes.Language

 

 

TOPICS
Scripting

Views

153

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

[JS] or [VBS]

in [JS]

app.activeDocument.textFrames[0].characters[0].characterAttributes.language
// result eg: LanguageType.GERMAN2006REFORM

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

in vbs you could build your own cross reference

 

aiBokmalNorwegian = 8
aiBrazillianPortuguese = 11
aiBulgarian = 20
aiCanadianFrench = 3
aiCatalan = 17
aiChinese = 29
aiCzech = 22
aiDanish = 16
aiDutch = 15
aiDutch2005Reform = 43
aiEnglish = 0
aiFinnish = 1
aiGerman2006Reform = 42
aiGreek = 25
aiHungarian = 28
aiIcelandic = 27
aiItalian = 7
aiJapanese = 30
aiNynorskNorwegian = 9
aiOldGerman = 5
aiPolish = 23
aiRomanian = 24
aiRussian = 18
aiSpanish = 12
aiSerbian = 21
aiStandardFrench = 2
aiStandardGerman = 4
aiStandardPortuguese = 10
aiSwedish = 13
aiSwissGerman = 6
aiSwissGerman2006Reform = 44
aiTurkish = 26
aiUKEnglish = 14
aiUkranian = 19

 

or use javascript within vbs

Illustrator.DoJavaScript("app.activeDocument.textFrames[0].characters[0].characterAttributes.language")

it returns

LanguageType.ENGLISH

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

Yes, It will return language type, but can i get display name ?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

How can get all LanguageType?

Ex: Exist LanguageType=39, but in your list have not.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

I copied that list from the pdf documentation.

 

you can use the Object Browser in Excel vba to find all illustrator objects

 

39 = aiArabic

 

ObjectBrowserVBA.PNG

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

LATEST

you can also use the OMV in the ESTK

omvLanguage.PNG

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines