Module:fa-cls-translit/documentation

Background
This template transliterates Persian based how it would be read in Classical Persian. So keep in mind that this template should be used with classical-style vocalization, a guide explaining Classical vocalization can be seen here.

This template may also be used for most eastern dialects of Persian, which do not have any standard vocalizations, but commonly use the classical vocalization. However it will show vowel length for all dialects, even for dialects that no longer possess vowel length such as Hazaragi.

This template should not be used for Modern Iranian Persian, for which Module:fa-ira-translit should be used instead. However, classical Iranian texts should use this module (all Iranian texts before the 13 or 16th century).

Usage notes

 * 1) In this module, when two semi-vowel characters are near each other the first one becomes the consonant and the second character becomes the vowel. To prevent this, pairing any vowel diacritic to the secondary semivowel will turn it into a consonant.
 * 2) * Example: خْویش vs خویْش
 * 3) Alif must be proceeded by a zabar, to prevent false positives.
 * 4) The Sukoon/Jazm diacritic is required for consonant clusters or else the module will return nil.
 * 5) This module can transliterate izāfa diacritics by finding when the diacritic zēr is followed by a space instead of a he.
 * 6) supports assimilations for Arabic al-
 * 7) ma'rūf vowels (āīū) should be denoted with their corresponding short vowel as they would in Arabic; majhūl vowels (ēō) should not have any proceeding vowel diacritics.
 * 8) "xwV" can be distinguished from "xV" (silent waaw) with a sukoon, without a sukoon the waaw will be silent.
 * 9) * Example: خْویش vs خویش

Example
Test:

گُرُسْنَه چِه کَارِی کُنَد چِهِل نَر، کِه دَهْ لَک بَرْآیَد بَر او بی‌خَبَر، کِه پَیْمَان‌شِکَسْت بی‌دَرَنْگ آمَدَنْد، مِیَانِ تیغ و تِیر و تُفَنْگ آمَدَنْد

Result:

Expected:

gurusna či kārī kunad čihil nar, ki dah lak bar-āyad bar ō bē-xabar, ki paymān-šikast bē-darang āmadand, miyān-i tēğ u tīr u tufang āmadand