1

I'm using Adobe InDesign CS4 and CS5 on Mac OS.

I've never written any kind of plugin for Adobe InDesign on Mac OS and I need help to consider what's the best solution for this kind of problem.

The language is Armenian and it's not supported in Adobe. I'd be happy to have any kind of script, that would automatically hyphenate text in a textbox after a resize.

I've read about Javascript (or ExtendScript), Linguistic Library Plug-ins SDK and AppleScript, but I can't consider which one is the simplest(or the best) way to achieve this.

What should I use?

Any help is much appreciated.

UPDATE:

It can be any other language, that isn't supported in Adobe.

I just need to find out which API should I use or which scripting language and maybe some other guides for implementing hyphenation.

hgulyan
  • 8,099
  • 8
  • 50
  • 75

1 Answers1

2

After doing some quick reading, it sounds like Adobe wants you to use Lilo (Linguistic Library).

Linguistic Library makes it possible to add linguistic services like spell checkers and hyphenation services to Adobe products, through the Linguistic Library API.

Sounds great... but the language used to create these plugins is C++. In my opinion, C++ is an annoying language that should be avoided when possible, but if you like C++ then you're in luck!

ExtendScript, the language used to make general Adobe plugins (think Kuler) is like JavaScript. This may be a simpler language choice, but it could mean more work.

Here are my thoughts on the pros and cons of the choices.

Lilo

Pros

  1. Specifically made for hyphenation and language support
  2. Works in Illustrator, Photoshop, and InDesign

Cons

  1. Written in C++ (which means you will need to set up for environment to compile C++ via XCode) 2 Written in C++ (which really isn't a scripting language)

ExtendScript

Pros

  1. Javascript is a very flexible language that is very suitable for scripting
  2. There is a lot more help online for ExtendScript

Cons

  1. This is going against the grain. You will end up creating somewhat of a hack that reads textboxes and looks for things to hyphenate. This also means writing more complicated logic that Adobe already wrote and wrapped into Lilo

If I had to make a decision, I would choose Lilo. I don't like C++, but I don't want to write my own hyphenation code. It seems like with Lilo, all you have to do is create a dictionary of Armenian words and their hyphenation points.

I'm sure you found this already, but it seems important to link to the Lilo programming guide. http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/linguisticlibrary/pdfs/lilo-programming-guide.pdf

DingoEatingFuzz
  • 623
  • 3
  • 11
  • Thanks for detailed answer. I've read about linguistic language api and the hyphenation interface, but it seems complicated for me. I'm not sure if I can do that. – hgulyan Apr 22 '11 at 10:44
  • ExtendScript looks simpler, but I'm not sure, if it supports everything I need to implement hyphenation in Adobe InDesign, like textbox resize and some other events, manipulating and formatting text in a textbox. – hgulyan Apr 22 '11 at 10:46
  • I've asked another question hoping that someone would give some guides on how to work with extendscript, but I didn't get any answer http://stackoverflow.com/questions/5741063/manipulating-text-in-a-textbox-in-adobe-cs5 – hgulyan Apr 22 '11 at 10:47
  • I've expected some more info on this topic and links to Lilo programming, except the official guide, but you answered my question indeed. – hgulyan Apr 29 '11 at 08:30