What does it do?
Translit Input ModeTransliterator intercepts your keyboard input and de-transliterates it. It is very useful when you do not have the keyboard configuration required to enter text in your desired alphabet. The mappings could be one-to-one (one keystroke for one letter) or many-to-many. For example, the Russian transliteration table contains the following pairs:
DetransliterateConvert text from transliteration to the desired alphabet. Useful if, for some reason, you forgot or were unable to use the input mode, or if someone posted on a forum using transliteration and you'd rather not break your eyes on the gobbledygook ;). The detransliteration follows the same mappings as the input mode. Keep in mind that since the rules for transliteration of different languages may be flexible, your mileage with detransliterating arbitrary text will vary. To use this feature, highlight a paragraph of text with the mouse and choose Edit -> Detransliterate from the menu or hit Ctrl+Shift+Q.
TransliterateConvert text to the transliteration of its original alphabet. Use this when you do not have the font required for viewing this alphabet, or you need to send this text using the means not compatible with unicode (e.g. console-based e-mail or SMS). Transliteration feature uses the same rules as the input mode and detransliteration, but follows them in inverse order. To use this, highlight some text and choose "Transliterate" from the Edit menu or hit Ctrl+Alt+Shift+Q.
Here is an online version of this transliterator for cyrillic alphabet: http://www.benya.com/cyrillic/.
ConfigurationAll transformations mentioned above are performed according to the selected transliteration layout. To change this layout, open the options dialog, accessible by choosing Tools -> Transliterator Options in the menu or by right-clicking on the extension listing in the addons manager. Choose the desired layout from the drop-down list and click View to preview it.
You can also change the menu labels and the corresponding shortcuts. To change the shortcut, hit the desired key combination while your cursor is in the appropriate edit box.
As of version 0.7, the following layouts are packaged with the extension (please note, the names of the layout are at the discretion of their contributors):
Creating new layoutsA transliteration table consists of pairs [source, target], where the source is a string in the local alphabet (matching your keyboard), ad the target is in the alphabet you expect to produce. For example, writing in Russian on a US-English keyboard using the phonetically similar letters and combination of letters requires mappings A -> А, B -> Б, etc.
The target alphabet may have more letter than the source alphabet, and some target letters may require more than one letter in the source alphabet. In fact, sometimes it may be necessary to map a group of source letters to a group of target letters. Therefore, transliteration table pairs can map a string of arbitrary length to another string of arbitrary length. For example, YO -> Ё, Y\O -> ЫО (Custimized Russian) or ann -> aⁿ, ann7 -> āⁿ (Taiwanese POJ)
When creating a multi-character mapping, it is important to keep in mind the unintended consequences such as this: given a mapping a->x, b->y, ab->z, it will be very hard to enter xy
There may be more than one way to transliterate a string. For example, cyrillic Х may be transliterated as H or KH, and cyrillic Я - as YA or JA. The transliteration tables for this extension accomodate this by allowing multiple source mappings for the same target string. This will allow a target string to be entered in more than one way, while the transliteration will use the first encountered mapping. In other words, using the example above, the mappings KH->Х and H->Х will allow two ways to enter Х, but Х will always be transliterated as KH. Similarly, it is possible for one source string to be mapped to multiple targets. In such case the multiple mappings will not apply in the input mode.
By default, a lowercase source letter maps to a lower-case target letter, and uppercase to uppercase. Therefore, it is not necessary to include both x->y, X->Y. This may not be practical in situations where the target alphabet does not have the concept of upper or lower case. To resolve this, the entire transliteration table may be designated as case-sensitive, and will allow mappings x->y, X->z
If the source string does not have an upper or lower case (e.g. ' or #), it is possible to have the transliterator attempt to guess the correct case for the target string. The logic for this guess is as follows: the result is always lower case unless followed by an uppercase letter, or, if at the end of a word, preceded by at least two uppercase letters. This algorithm always errs on the side of lower case, so may be a good idea to have some way to enter upper case as well. This exception was implemented with Cyrillic "Ь" in mind, but may be useful for other languages as well.
For example: [ ["a", "а"], ["b", "б"], ["v", "в"] ]
The exception for automatically guessing the case is entered using keyword "true" in the 3rd position of the element [ [source, target], [source, target, true] ...].
For example [ ... ["##", "Ъ"], ["#", "ъ", true] ...] - map double-pound sign to an uppercase letter, have single pound sign match the case of the target string to surrounding text.
To add a transliteration table to firefox (or other apps), you need to follow these steps:
1. Open firefox configuration editor (type about:config in the location field), then filter the preferences by "transliterator".
2. Come up with a unique identifier for your new layout, something composed of only letters and numbers (e.g. myconfig)
3. Right-click on the configuration editor, choose New -> String, enter preference name extensions.transliterator.layouts.myconfig, hit enter, paste your transliteration table
4. Right-click and add new string again, this time enter extensions.transliterator.layouts.myconfig.description and a name for your transliteration table, e.g. "My extra special configuration"
5. To enable case sensitivity, add a new boolean preference extensions.transliterator.layouts.myconfig.case_sensitive and set it to true.
Now, if you open the options dialog, you should be able to see your layout in the list. If it does not apper, open the Error Console, typically located in Tools menu, and see if it contains any useful information.
If you feel that your new layout will be useful to the rest of the world, please send it to me by e-mail.
Contact InfoPlease discuss the extension and make feature requests at the extension page on mozilla addons site. Please send bug reports by e-mail.