I’ve created a bookmarklet to temporarily solve a very specific problem at hand: I’m translating a TED video into Turkish, but I don’t currently have a Turkish keyboard hooked up to my computer (it’s in a box somewhere in the basement).
TED uses dotSUB for video translation. Peeking at the HTML source of dotSUB’s translation interface, I saw that they were using script.aculo.us (therefore Prototype), Ext JS and YUI, all at the same time.
Having Ext JS at my disposal was a bonus, as the Ext.select function allowed me to easily attach event handlers to specific elements, in a very jQuery-esque fashion.
The way the bookmarklet works is:
- Go to the dotSUB translation page.
- Invoke the bookmarklet (just once!)
- Whenever you need a Turkish letter, you use an escape sequence: the Latin alphabet counterpart, followed by a caret (”^”). For example, for “ç”, the escape sequence is “c^”.
- As soon as you hit enter or click on another field and cause the translation field to blur, the escape sequences are replaced with the desired Turkish letters and dotSUB handles the rest.
The full set of escape sequences are:
|Turkish Letter||Escape Sequence|
If by any chance you’re suffering from the same specific problem of not having a Turkish keyboard while doing a Turkish translation on dotSUB, here’s the bookmarklet:
To “install” this bookmarklet, drag the above link to the bookmark toolbar of your browser or simply add it as a new bookmark, making sure none of the characters are trimmed/dropped.