|
Discus makes it very easy to integrate transliteration with your board. If you are wondering what "transliteration" is, you probably don't have a need for it :). Transliteration means for same language, changing from one display script to another. Transliteration is generally used for languages which are difficult to enter through English keyboard in its native script.
Following is a real language example of integrating Indian language Marathi. It not only makes it easier to type, it also made our board "quad-lingual" simultaneously supporting four languages: English, Marathi, Hindi and Sanskrit. We kept all the language.conf entries in English but the users can post in any of the above four languages. (We were lucky because the languages themselves are entirely different but 3 of them share same script.)
What you need
--------------
Discus 4.0
Basic knowledge of Discus 4.0 webtags.conf, perl
A perl transliterator package available for each language.
------------------------------------------------
Make sure your options.txt has following entry.
special2_in_subjects=1 # saves your original message in comments.
Example webtags.conf entries-----------------------------
*5 dev &proc_dev(|1|,"Shivaji05","+1")#Shivaji05 is the font
*5 ts1 &proc_dev(|1|,"Shivaji01","+1")# +1 is the size of font
*5 ts5 &proc_dev(|1|,"Shivaji05","+1")
Example webtags2.pl subroutine------------------------------
# transliterate to devnagri
sub proc_dev
{
my ($text_in,$fontname,$fontsz) = @_;
my $text_out;
# call to your transliterator function outside discus.
$text_out=dev::devrender( $text_in, $fontname );
return "<font face=$fontname size=$fontsz >".$text_out. " ";
};
Before trying to integrate this with Discus, please make sure your transliterator is working fine by using a simple perl program. Obviously DiscusWare can't help if you have issues with your transliterator not working.
This works fine in messages, subtopic names and even in profile fields. You can use dynamic fonts (both pfr and eot) fine with Discus. We have a javascript for dynamic fonts which we put in the "dynamic top" part of the skin just before </head> tag.
DiscusWare expresses sincere thanks to Ajay for contributing this documentation
|