Skip to content

gershnik/Translit

Repository files navigation

Translit

macOS License Tests

This macOS keyboard input source allows a user familiar only with Latin alphabet keyboard to type in other languages by using common Latin transliteration of the target language letters. Currently supported target languages are Russian, Hebrew, Ukrainian and Belarusian. To give an example, typing privet in Russian mode will produce привет and typing hi in Hebrew mode will produce הי.

Features

  • Type normally in any window without copy/pasting from a separate app/browser

  • Supports multiple languages: currently Russian, Hebrew, Ukrainian and Belarusian with an easy way to add more, if desired.

  • Supports modern macOS versions

  • Distributed as signed and notarized installer - you don't need to build it yourself (but you can, if you want to).

  • Reliable installation and uninstallation on recent versions of macOS.
    Starting roughly with macOS Ventura, Apple has introduced various bugs into its keyboard input sources architecture that make adding and removing them unreliable, error prone and require log off. The installer and uninstaller for this application makes the whole process reliable and simple for the user.

  • Not having to use punctuation like ' or # for transliteration.
    When typing normally on macOS (as opposed to some designated transliteration app) switching between input modes is more complicated - you cannot just press ESC like translit.ru does. This makes typing text with lots of punctuation annoying. Additionally hijacking ' interferes with macOS "smart quotes" if you use this feature. Avoiding punctuation, such as using q for ь and qq for ъ makes typing much smoother.

  • Support for multiple transliteration schemes. Since some people would prefer to use familiar transliteration schemes from elsewhere, this application allows you to choose which scheme to use. Currently, in addition to the default, translit.ru/translit.net schemes are supported for Russian, Ukrainian and Belarusian. More can be added, if desired.

    There are existing macOS transliteration projects on Github such as cyrillic-transliterator and its forks but none of them supports all the features above.

Installation

Basics

  • Navigate to Releases page and download Translit-x.y.pkg package installer.
  • Run it and install the app
  • You will be prompted to log off at the end of the installation. This is, unfortunately, necessary. Apple provides no way to avoid this.
  • After you log back in launch System Preferences ⇒ Keyboard
  • In the Text Input section press Edit... button for Input Sources


  • Press the + button to add an input source


  • Navigate to the desired target language (e.g. Russian, Hebrew etc.) and select <Langage> Translit (for example Hebrew Translit). If you wish to add multiple languages press the + again after that.

You are all set. If you have enabled Show Input menu in menu bar setting

you should see something like this in it

Select the newly added input method and you can start typing in it anywhere.

Keyboard shortcuts

By default macOS sets ⌃Space and ⌃⌥Space to switch between different input sources. This can be far more convenient than using the menu bar when typing mixed language text.

If these aren't working navigate to System Preferences ⇒ Keyboard ⇒ Keyboard Shortcuts ⇒ Input Sources and enable or change them.

It is also possible to make Caps Lock key switch between default and Translit input source. See the following toggle in the Input Sources screen.

Viewing/Configuring transliteration mappings

When a transliteration input mode is selected the pop-up system menu will show addition entries like these

Select Mappings to display which Latin characters and combination map to which letters of the target language. If multiple transliteration schemes are supported for the target language you can also change the scheme.

Uninstallation

To completely uninstall Translit issue the following commands in Terminal

  • If you installed Translit only for yourself
~/Library/Input\ Methods/Translit.app/Contents/MacOS/Translit --uninstall
  • If you installed Translit for all users
/Library/Input\ Methods/Translit.app/Contents/MacOS/Translit --uninstall

You can also see the exact command for your installation in About menu with a translit mode selected.

Just like with installation, you will be prompted for a logoff at the end. This, unfortunately, is also necessary due to Apple's bugs.

Mappings

Currently supported character mappings can be found in the following documents

Building

Xcode 16.3 or above and Python 3.11 or above are the only requirements to build Translit.

  • Download/clone the repo
  • Run fetch script from the top-level directory (current directory doesn't matter). This will fetch external dependencies
  • Open Translit.workspace and build the Translit or Installer scheme