• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

290

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 Expert ,
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

Votes

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
Community Expert ,
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

Votes

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 ?

Votes

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.

Votes

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
Community Expert ,
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

Votes

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
Community Expert ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

LATEST

you can also use the OMV in the ESTK

omvLanguage.PNG

Votes

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