AppleScript "translit" function

I'm trying to find a solution to write Russian, but with latin characters (see the idea

My idea is to write an AppleScript smth like: -> selected text -> translit it

Hpw dp I work with a string in ActionScript replacing character by character?


Transferring Latin with Cyrillic characters pops a first important question. Is it Unicode or is it also a transfer between Latin and Cyrillic character encodings?

You've asked for an example to replace character by character I can give you an example on how it can work. There are of course many other examples but here you can alter the sourcelist and targetlist to your likings.

set theString to "Hello World!"
set sourceList to "abcdefghijklmnopqrstuvwxyz"

set newString to {}
repeat with theChar in theString
    set o to offset of theChar in sourceList
    if o is 0 then
        set end of newString to contents of theChar
        set end of newString to character o of targetList
    end if
end repeat
return newString as string


 ? Python pyinstaller and translit module
 ? Does iconv with TRANSLIT work in Unix AIX?
 ? how to Check spelling of a regional language?
 ? how to Check spelling of a regional language?
 ? how to Check spelling of a regional language?
 ? .NET Spell Check control?
 ? Implement Word Spell check in Windows Form App
 ? Programmers Editors on Windows for Indic language editing
 ? How to check spelling in Hunspell with case insensitive
 ? WPF spell check languages