Monday, November 27, 2017

Panlatin Browser Extension Setup

Basic Setup

Panlatin extension simplifies reading of foreign texts for us, westerns. To read a page in a Latin script, it usually needs some setup. Let’s me guide you with an example of reading Chinese weather forecast.

The instructions were tested in Panlatin version 2.2. So, check first if you have this version installed. Open the extension list in the browser, verify the version and click the Options to enable conversion for the wanted language, Chinese.

The numbers in the screenshot show the sequence of actions.
  1. Click the abbreviation “zh” for the Chinese. This changes the language description under the line.
  2. Verify the language abbreviation.
  3. Click the word “disabled” to become “enabled” as pictured.
  4. Click the transliteration system name. For Chinese, only one system is currently defined, pinyin. Other languages can have several systems. Soon after clicking, the "Transliterated text" window shows the transliteration.
  5. Point the mouse to different positions and you can read the descriptions. For now, leave the prosition to be "default".

Then open your wished page in browser. I chose the official weather forecast.

The page opens, but transliteration is not yet enabled. The Panlatin extension uses by default a simple language detecting that relies on the page authors to mark the correct language. So, the weather forecast is not marked with lang=”zh” attribute in html. Let’s mark it within the extension. Click the popup. There is no abbreviation “zh” after the "Page language" label. Click button Change (1).

The popup changes.
  1. To enable the language transliteration, leave the default “Enabled modifying”
  2. Verify the language abbreviation. By default, it’s the same as selected at the Options screen. For Chinese, it’s “zh”.
  3. Verify or change the range of pages that will be marked as Chinese. The default is to show all pages within the same site, what is “”. “www” is skipped. If you want to mark * or *.cn as chinese, use the buttons Shorten and Extend to change the range (address) to “” or “cn”. You can also define it for specific pages within site.
  4. Finally, click “Add” button.
Once a rule is added, it can be deleted, its language can be corrected, or another detailed rule can be specified.

Refresh the web page. It shows now the native and transliterated words.

There is another view possible that also shows the possible dictionary translations. Go back to the Panlatin Options page and at step 5) select the position “above”. Then refresh the web page. When pointing to particular words, possible translations are shown.

Ups, some suggestions from the dictionary are not good enough. In the title, the characters are incorrectly grouped as “sān 天全tiānquán guó” while they should be 三天sāntiān 全国quánguó”. The dictionaries are not perfect.

You can add up to 1000 entries into custom dictionary. Let’s enter this particular missing entry. Click the popup, then select “Dictionaries” button.

Enter the character into the 4 cells as shown in the screenshot. You can copy the text from the web page, the formatting will be skipped. You can also skip either traditional or simplified entry. Then click button “Add”. The entry is stored.

The additional buttons allow deleting all the entries, deleting one entry or entering many entries. If you have plenty of dictionary entries, you can click “Show as file” and the following screen is shown.

For Chinese dictionary, each line needs to have exactly 4 fields (as said above, some can be empty) that are separated by tabulators. Such text can be produced in Microsoft Word or in Libre Office Writer in a table of 4 columns that is then converted into text and cells separated by tabulators.

To finish our simple example, show again the weather page and refresh it. The title looks better.

Did you notice that the popup is different after the page language is defined? You can enable or disable conversion for the language - if language is disabled, no pages are changed.

Few more Options

The options page is divided into three sections with the horizontal lines. The active (clickable) texts are shown with gray background.
The upper section has three buttons for enabling, the list of abbreviations for the languages that can be romanized or detailed, and additional display button. The languages with the enabled romanization or details show the abbreviations in bold. The available languages are:
  • The button "Enable All non-Latin" enables romanization from all the languages that don't use the Latin script. It enables romanization of languages: Arabic (ar), Bulgarian (bg), Greek (el), Hindi (hi), Korean (ko), Macedonian (mk), Russian (ru), Serbian (sr), Ukrainian (uk), Chinese (zh).
  • The button "Enable All Latin" enables detailing for the languages that use the Latin script. It enables experimental detailed display of pronunciation of languages: German (de), English (en), Spanish (es), French (fr), Italian (it), Polish (pl), Slovenian (sl).
  • The button "Disable All" disables any changes to the texts.
  • Click to the language abbreviation shows the details of a language in the second section.
  • It's also possible to switch on “Showing romanization examples while selecting language”. This is used for an overview of changing. If this option is enabled, the following click to the language abbreviation shows example, if conversion is enabled and position is default.

The middle section shows the options for one language. It shows the following:
  • Conversion: either "enabled" or "disabled". Click to one of these two values changes the status.
  • System: the list of romanization or detailing systems. Some languages only have one system, "default". The other languages have several systems. If the conversion for this language is enabled and position is default, click to the system name also shows example romanization. The system name in bold shows the current system.
  • Position of original and converted text. The default position is for most of the languages such that only the romanized text is displayed. For Chinese language, the romanized word follows the native word. The position "above" shows the converted words above the native words in pale-yellow background. In Chinese, the tool tip above each word shows the dictionary translation. The bold position name shows the current position.
  • The Native and Converted texts are shown for each language and conversion system. For most of the languages, it's possible to convert text back or forth by typing new text to the Converted box or to the Native box and the other box shows the corresponding text. There are few limitations, there is no conversion from Converted text written in English, Korean and Chinese. The button Clear removes all the text from both the example boxes. The button Unicode shows the Unicode character numbers for the native text.
  • Some romanizations are not reversible. While all native texts can be romanized, it's not possible to produce all native texts from the romanized form using just character replacement rules. For example, Greek standard domestic (ELOT) romanization converts Κλειδωνιά to Kleidonia. When the latter word is converted back to Greek spelling, it becomes Κλειδονια. Stress marks are lost and distinctions between omega and omicron are lost, too. You can try another romanization that better preserves the original form.

Context menu and popup

The Panlatin form is such that the original form can be produced from it. So, it may be different from some other romanization. The original form, to be sent to other program, is available from the menu.
When the text was romanized with the default position, a part of it can be selected and the context menu has item "Copy original text from Panlatin form". Clicking it copies the native text to the clipboard. The native text is generated from the romanized Panlatin text, so it can differ from the original text if the romanization system is not reversible.
To have the original text in such a case, either select a reversible romanization system or select a the position above.

The web extension is available for Chrome and Firefox browers.

There is a dedicated support page for questions, please ask questions there.

Last verified on 27-dec-2017 for Panlatin version 2.2
by Jože Fabčič