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

Setting language independent style property

Guest
Feb 01, 2021 Feb 01, 2021

Copy link to clipboard

Copied

I do create a custom style, but it worked only on english version on Indesign. On polish it didnt work, so I wrote this code to handle two languages.

try{
myCharacterStyle.strikeThroughType = 'Jednolity';
}catch (MyError){
myCharacterStyle.strikeThroughType = 'Solid';
}

but I would like to know if there is other nicer and language independent way.

I searched jongware reference but couldnt find working solution. There is a StrokeStyle class but doesnt work.

TOPICS
Scripting

Views

206

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

correct answers 1 Correct answer

Community Expert , Feb 01, 2021 Feb 01, 2021

Try the following, this should work on every language version

 

myCharacterStyle.strikeThroughType = '$ID/Solid'

To find the language-independent string you can use the findKeyStrings method on the application object. For ex:-

app.findKeyStrings('Solid')

 

-Manan

Votes

Translate

Translate
Community Expert ,
Feb 01, 2021 Feb 01, 2021

Copy link to clipboard

Copied

Witamy! What are you trying to get this character style to do?

Mike Witherell

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
Guest
Feb 01, 2021 Feb 01, 2021

Copy link to clipboard

Copied

assign this style to object (found text)

 

 

obj.appliedCharacterStyle='my-style'

 

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 ,
Feb 01, 2021 Feb 01, 2021

Copy link to clipboard

Copied

Try the following, this should work on every language version

 

myCharacterStyle.strikeThroughType = '$ID/Solid'

To find the language-independent string you can use the findKeyStrings method on the application object. For ex:-

app.findKeyStrings('Solid')

 

-Manan

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
Guest
Feb 01, 2021 Feb 01, 2021

Copy link to clipboard

Copied

LATEST

That's right. It is in JS Guide in Localization section 

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