Module:Lang-hbs/doc

MyWikiBiz, Author Your Legacy — Saturday November 30, 2024
Jump to navigationJump to search

This is the documentation page for Module:Lang-hbs

Template:Module rating This module produces equivalent Serbo-Croatian Latin text from Cyrillic input.

Usage

This module exports two functions providing different outputs. Both functions require Template:Para argument for proper operation.

cyr2lat and lat2cyr

These function should be invoked the following way:

{{#invoke:lang-hbs|cyr2lat|text to be converted}}
{{#invoke:lang-hbs|lat2cyr|text to be converted}}

It replaces all letters of Serbo-Croatian Cyrillic alphabet with corresponding Latin letters.

Note: per MOS:FOREIGN non-English words in Latin script should be italicized. cyr2lat fuction leaves it to users.

convert

This function should be invoked the following way:

{{#invoke:lang-hbs|concat|cyrillic=Cyrillic text|latin=Latin text}}

It replaces Serbo-Croatian Cyrillic with Latin and returns both Cyrillic and Latin text with latter being italicized. Either of Template:Para and Template:Para is sufficient.

Caveats

  • Serbo-Croatian Latin alphabet includes letters "lj", "nj" and "dž", which, in addition to upper case ("LJ", "NJ" and "DŽ" respectively), also have "title case" ("Lj", "Nj" and "Dž"), which is used when only individual letters of the word are capitalized (eg. name "Љиљана" is spelled as "Ljiljana", not "LJiljana"). For performance and algorythmic complexity reasons this template always uses title case instead of upper case.
  • Latin to Cyrillic transliteration works only with Unicode digraphs. Use Cyrillic to Latin transliteration if in doubt.