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.
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
Copy link to clipboard
Copied
Witamy! What are you trying to get this character style to do?
Copy link to clipboard
Copied
assign this style to object (found text)
obj.appliedCharacterStyle='my-style'
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
Copy link to clipboard
Copied
That's right. It is in JS Guide in Localization section