Archive for the ‘English’ Category

Urdu WebPad Update

Sunday, April 1st, 2007

Urdu WebPad’s update is finally there after a long wait. I had finished work on this update a few weeks ago and I was about to release it but I experienced some problems during its testing. Therefore I fixed these problems and now it is time to release it. The highlights of this release are easier integration with web applications and some opera compatibility. Read here for more details.

Download Urdu WebPad
View Urdu WebPad’s demo
Urdu WebPad’s documentation
Urdu WebPad’s user’s guide

Announcing the new Urdu library project site

Tuesday, February 20th, 2007

I feel great pleasure in announcing the launch of a new website (www.urdulibrary.org) for the Urdu digital library project. Until now, this project was hosted on the Mehfil forum. Now it has reached the point where a discussion forum is no more sufficient to meet its needs. Therefore a complete new site is now setup for this project. This site uses the MediaWiki wikipedia software which is suitable for this kind of collaborative work. It is also expected to scale well with the increasing volume of data as this project progresses.

The new site is ready for publishing Urdu content. Its style sheet is adjusted to properly display Urdu text. I need to adjust the point size, however. Furhter, Urdu WebPad is integrated in Its edit areas which makes editing Urdu content event easier. There is a lot of work still to be done on the technical side. I have to take care of the translation of MediaWiki’s interface into Urdu. We have still no integrated user management on UrduWeb. That means, the users need to create yet another account on this site. We hope to overcome these technical hurdles sooner or later.

I would like to take this opportunity to repeat the mission statement of the Urdu digital library project.

The aim of the Urdu digital library project is to save the historical and cultural assets of Urdu and making its access easier for the public. We want to prevent precious and hard to find Urdu works from extinction. On the other hand we also want to inspire the others to create copyright free works in Urdu to serve the cause of spreading knowledge and promoting Urdu. The Urdu digital library project is inspired by WikiSource, WikiBooks and project Gutenberg.

Once again I congratulate everybody for making this project a success and hope that with the introduction of this new site, this project will gather further momentum and prove to be a hallmark of our efforts of promoting Urdu on the net.

OpenOffice, Nastaleeq Font and Spell Checking

Saturday, January 27th, 2007

Dear friends, AssalamOAlaikum

Yesterday I came across two important news regrarding Urdu in OpenOffice which I would like to share here.

Nastaleeq Font in OpenOffice

According to a post in Yahoo’s Urdu Computing Group, Nafees Nastaleeq as well as Fajer Nastaleeq are properly rendering in a development snapshot of the beta release of OpenOffice 2.2. Further, Fajer Nastaleeq also displays correctly in FireFox with the Pango engine. Here are the Details.

Urdu Spell Checking in OpenOffice

Another important news regarding Urdu in OpenOffice is that it is now possible to perform spell checking of the Urdu text in OpenOffice. I am pleased to announce that this has been made possible through UrduWeb’s cooperation. The credit for this goes to Mohammed Shakir Aziz. We had compiled a list of Urdu words some time ago with the idea of creating an Urdu dictionary. Asif Iqbal accomplished this task with the cooperation of some friends on the Mehfil forum. Though there has not been much progress towards this Urdu dictionary, still this Urdu words list cna be put to good use in other applications. Shakir consulted with the relevant persons to get this words list incorporated into OpenOffice and after a few days this words list is now an officially recognized Urdu dicionary for OpenOffice. Read here for details.

Urdu version of this post

Urdu WebPad Reloaded, Urdu OpenPad

Monday, October 17th, 2005

I wrote Urdu WebPad earlier this year, which is effectively an open source version of the Urdu Pad from urdulife.com. This is a web-based editor that allows the editing of Urdu text without the need of installing Urdu keyboard and language support on the computer. It works with Internet Explorer and FireFox. Urdu WebPad is fairly easy to integrate in web applications . The first Unicode Urdu forum Urdu Mehfil is a well-known example of the use of Urdu WebPad. The keyboard mapping provided by Urdu WebPad is that of the Phonetic Urdu keyboard. An on screen keyboard assists in entering Urdu text.

I have been thinking about incorporating multiple keyboard layouts in Urdu WebPad. Such a feature would benefit those accustomed to other keyboard layouts as well as other local languages such as Pashto and Sindhi. I got the inspiration for this idea from Unipad. This feature has to be accompanied by an on-screen keyboard which would reflect the currently selected keyboard layout. The result of the this work is Urdu OpenPad. The word OpenPad hints at the openness of the editor. It is now possible to incorporate custom keyboard layouts for web-based editing.

Unipad Keyboard Definitions

Unipad supports multiple keyboard layouts and it allows the definition of custom keyboard layouts. Figure 1 shows the virtual keyboard layout used by Unipad. The details of how to define a new keyboard layout in Unipad can be found here. As can be seen there, Unipad used a four state keyboard i.e. normal, shift, Alt Gr and shift+Alt Gr states. Alt Gr key is found on some non-English keyboards and it is equivalent to the Ctrl+Alt key combination.


Figure 1 – Virtual key map used by Unipad

OpenPad Keyboard Definitions

I have decided to implement a three-state keyboard mapping i.e. normal, shift and Alt Gr states. This should be sufficient in most of the cases. I had to implement Alt Gr differently for Internet Explorer and FireFox because of the different ways handling of shift keys in these browsers. Alt Gr is equivalent to Ctrl+Alt in Internet Explorer and to Crtl+Shift in FireFox for Urdu OpenPad users.

Defining and adding a new keyboard mapping is very easy in Urdu OpenPad. All you have to do is to create an array of Key type objects. An object of type Key contains a single key mapping. It should contain at least the information about the normal key state and it can contain up to three key states. Following is the syntax of defining a key mapping.

Mapping[KeyCharacter]=new Key(x, [y], [z]);

Where;
x:= Normal key state
y:= Shift key state
z:= Alt Gr key state

The following shows a section of the Urdu Phonetic key-mapping included in Urdu OpenPad:

var UrduPhonetic= new Array(); UrduPhonetic['a']=new Key(0x0627, 0x0622); UrduPhonetic['b']=new Key(0x0628, 0x0628); UrduPhonetic['c']=new Key(0x0686, 0x062B); . .

Having completed the keyboard-mapping, it then has to be added to the list of available keyboard layouts inside the InitUrduEditor function as shown in the flowing:

KeyMaps["UrduPhonetic"]=UrduPhonetic;

All that remains is to set the current keyboard layout used in the editor with the following function call:

setKeymap("UrduPhonetic");

I am including three keyboard mappings, one each for Urdu Phoentic, Sindhi and Pashto. I used the Unipad keyboard mappings of Sindhi and Pashto.

On-Screen Keyboard

I have tried to model Window’s on-screen keyboard as closely as possible. Its display changes to reflect the shift keys pressed. The user can also click directly on the Shift or the AlrGr key. In that event, the on-screen keyboard remains in that state until the user clicks another button or presses some key. A small bar above the on-screen keyboard shows the help. I have used the Tahoma font for displaying characters in on-screen keyboard because it contains support for most of the languages based on the Arabic script. There may be mistakes in the on-screen display as well as in the implementation of the key mappings of Sindhi or Pashto. Unfortunately I cannot check this since I am not conversant with either of these languages. I hope, however, that soon Sindhi and Pashto speaking brothers and sisters will pounce onto these mistakes and inform me about these. Following figures show the keyboard layouts that come with Urdu OpenPad.


Figure 2 – Normal Urdu Phonetic Keyboard


Figure 3 – Shift State of Urdu Phonetic Keyboard


Figure 4 – Normal Sindhi Keyboard


Figure 5- Shift State of Sindhi Keyboard


Figure 6- Normal Pashto Keyboard


Figure 7- Shift State of Pashto Keyboard


Figure 8- Alt Gr State of Pashto Keyboard

Enhancements over Urdu WebPad

Following is the list of changes in Urdu OpenPad compared with Urdu WebPad:

  • English digits are used also in Urdu mode for Urdu Phoentic.
  • Now each OpedPad edit-control (single- or multi-line) handles its language mode separately instead of having a global language setting for all edit controls.
  • Some bugs are fixed for working with FireFox.
  • Urdu Phonetic keyboard contains both single and double, left and right quotes
  • It is possible to set different fonts and point sizes of the OpenPad control. This can be seen in the included demos.
  • Each OpenPad control gets a pale yellow background to distinguish it from the other controls on the web page.

Fonts

I have used many fonts in one of the demos included in the download to demonstrate the capability of setting fonts of the editor control. I have included on Sindhi (MB Sindhi Web) and one Pashto font (Pashto Kror Asisatype). The Tahoma font also contains supports for Sindhi and Pashto. You can find many other Unicode fonts for Sindhi and Pashto here. Figure 9 shows the use of Nafees Nastaleeq font in OpenPad editor control.


Figure 9- UsingNastaleeq Font in Urdu OpenPad

FireFox Issues

For some inexplicable reason, FireFox would not display diacritics (aerab) in their isolated forms inside the on-screen keyboard. That is why I had to add the character alif to the diacritic to make it appear properly. The result is shown in Figure 10.


Figure 10- Diacritics in FireFox

Future Work

I have heard many people complaining about the Phonetic Urdu keyboard because they are used to using some other keyboard layouts. I would appreciate if somebody sends me other Urdu key-mappings e.g. Aftab, Muqtadra etc. Though I think the on-screen keyboard in Urdu OpenPad to be a significant achievement, it still lacks in its visual appeal. Adding a the English character in the background in each key would enhance its utility. I find it very cumbersome to use the mouse every time I want to toggle the language mode. It would be better to implement a short-cut key for that.

Some of you already use Urdu Editor Lite which in fact just embeds an html page (Editor.htm) to provide Urdu editing capabilities and the Urdu text can saved in UTF-8 format. The Editor.htm file included in the download can be used in place of the one already in use by Urdu Editor Lite. Make sure to copy all the necessary files along i.e. OpenPad.js, OpenPad.css and the other graphics. This will at allow the use of new capabilities that come with OpenPad. This way Sindhi and Pashto text can also be processed and saved in UTF-8 format. I have not updated the sources of Urdu Editor Lite accordingly. This means that the Save As html function still saves an html file with a fixed font (Urdu Naskh Asiatype) and point size. I will try to update the sources of Urdu Editor Lite as soon as possible.

Another future prospect is that of using the same logic of key mapping in web-based WYSIWYG controls e.g. RTE, TinyMCE etc. I have already done some work in this direction and I hope to come up with some workable solution soon.

I will be looking forward to your feedback and comments. Those who are already using Urdu WebPad in their forums and websites are encouraged to give Urdu OpenPad a try. You may post a comment on this blog or you can discuss it on the Urdu Mehfil forum.

Download Urdu OpenPad
View Demo 1
View Demo 2

Textile and HTML

Sunday, July 31st, 2005

Since all the previous posts and comments we imported from Movable Type had used the Textile plugin there, we had to enable the Textile 2.5 plugin for Wordpress. Ideally I would like to move away from Textile since Wordpress uses dynamic pages which means that The Textile plugin is applied to each post as it is rendered rather than once when it is saved as in Movable Type. But that would require editing all the previous posts and comments since Wordpress does not allow one to change the text filter per post.

One side-effect of the Textile plugin in Wordpress is that it is not allowing any regular HTML in the comments. Somehow, I can still include regular HTML in posts. Strange!

For now, I have added the instructions about how to comment in Urdu so that the correct styling is applied to the Urdu text. For other things, like hyperlinks, bold, etc., please take a look at the Textile usage instructions starting at line 67 at the linked page.

I’ll see if I can modify the plugin so that you can use either regular HTML or Textile tags, just like you could on the old Movable Type blog.

For the medium to long term, I would like to add quicktags to the comment textbox so that commenters can just click on the buttons provided to bold some text or create a hyperlink or mark word(s) or paragraphs as being in Urdu or English, etc.

UPDATE: Now you can use HTML in comments. However, for Urdu styling, use the instructions above the comment box.

Setting Up Urduweb

Tuesday, June 28th, 2005

I was remiss in my last post in not thanking Nabeel and Asif for their help, both monetary and otherwise.

Now that we have setup hosting, let’s start the process of moving and creating content. My ideas are given below. Feel free to disagree or suggest anything else.

  • Urdu Planet has already been moved here. I have set up redirects in the .htaccess file in the old location so that it forwards to the new one.
  • Urdu Wiki is currently here. Asif, can you copy it over to the following URL: http://www.urduweb.org/wiki/? .htaccess redirect should be easy but I am not sure if it is possible in the current hosting setup of Urdu Wiki. I would be willing to help Asif make the move.
  • This blog has to be converted to Wordpress 1.5 and moved to Urduweb with the following URL: http://www.urduweb.org/blog/. Danial and Asif, both of you have experience with WP1.5 and have customized it for bilingual blogging. So I need your help here.
  • Software includes the utilities and tools developed by Nabeel as well as Asif’s fonts package and Qadeer’s localization of phpBB for Urdu. Can you guys come up with a decent folder organization under http://www.urduweb.org/software/?
  • Urdu Forum needs to be created at http://www.urduweb.org/forum/. Qadeer and Nabeel should be able to take care of that. I can help if needed.
  • Main page is to be another Wordpress 1.5 driven site with links to all the sections as well as some periodic content like a blog. The Pages feature of Wordpress should also come in handy here. Since WP1.5 is involved, Asif and Danial would be needed. Nabeel has expressed interest before in the sort of content we should put here. So this one is a group thing.
  • Urdu Blogs Directory needs to be reorganized and set up properly in one location. Right now, we have a list on the main page of this blog, a webring, a list on the Urdu Wiki as well as one on Urdu Planet. All of these need to be combined and a system needs to be set up for them to be easily updated and new blogs added. I take responsibility for this. This blog directory will be located at http://www.urduweb.org/directory/.
  • Site Design is also very important. All of the subsites and pages of Urduweb should have a distinctive but similar design in terms of colors and other presentational/CSS features. This requires someone with knowledge of CSS as well as someone with a good artistic sense for the web. I am definitely not that person. Any volunteers?

If anyone is interested in contributing and helping out, please let me know so that I can give you the needed access to the urduweb account. In addition to the work required setting up the site, we’ll definitely need continuous work in keeping it current and interesting. So any help is welcome and appreciated.

Urduweb

Saturday, June 25th, 2005

We have finally got the domain urduweb.org (the home page doesn’t exist yet) for all the stuff we have scattered around as discussed before.

Now comes the task of moving everything, including this weblog, to the new site. I have already moved Urdu Planet over to the new domain.

I’ll write about all the other tasks in a later post. For those who want to help in setting up the site, please comment here or email me.

Urdu Editor Lite

Thursday, May 26th, 2005

I released UrduEditor some time ago. Unfortunately it does not work on Windows 98. I did not realize at that time that right-to-left support needs to be installed in order for UrduEditor to work properly and this support is not available for Windows 98. Luckily I got a solution in my mind, which in fact is more of a hack, but it is still effective. Remember Urdu Webpad. It also works under Windows 98. Well, you need to have at least Internet Explorer 6 installed for it to work.

I then remembered that MFC also contains a CHTMLView class which is just a wrapper on Internet Explorer’s object model. It is capable of showing a html-page containing Urdu Webpad. This html-page loaded inside the application provides almost the same editing features as UrduEditor. Saving and loading Urdu text then requires accessing the contents of the Urdu Webpad control through the object model of Internet Explorer.

I call this application UrduEditor Lite since it provides a subset of the features available in UrduEditor. It is compiled using the Microsoft Layer for Unicode on Windows 98 systems (MSLU). This way the same application runs equally well both on Windows 98 as well as on Windows XP systems. The file unicows.dll needs to be in the application path in order for it to function properly in Windows 98. This program is useful for those who want to stick to their Windows 98 systems. Those Windows XP users who are too lazy to install support for Urdu language on their systems may also find it interesting.

Following are the UrduEditor features missing in UrduEditor Lite:

  1. Customized Find and Replace dialog boxes
  2. Urdu email client

Following is needed for the proper functioning of UrduEditor Lite:

  1. Internet Explorer 6
  2. Urdu Naskh Asiatype font
  3. On Windows 98 the unicows.dll file in application’s path. This is included in the download.

UrduEditor Lite can still save Urdu text as html. The missing features are not really impossible to program. I had some problems in compiling the CPJNSMTPConnection-class with UrduEditor Lite on Windows 98 and therefore I left out the email client functionality. This class implements the SMTP-protocol. It may work after some minor modifications. I may think about incorporating it into UrduEditor Lite if there is enough demand.

Creating a wrapper around Urdu Webpad adds an interesting perspective to the further development of the UrduEditor Lite application. Now only the JavaScript or html-modules can be updated to augment the functionality of UrduEditor Lite. The html-page that gets loaded inside UrduEditor Lite is Editor.htm. You can freely customize it to your taste e.g. by adding a background image. I have also made use of the Urdu keyboard available with Urdu Webpad in Editor.htm. This on-screen keyboard keyboard can be expanded or collapsed by clicking on the button as shown in the following figure. You can make as many modifications to the Editor.htm file as long as you do not change the file name. Another requirement is that thid html-page should contain a textarea-element whose identifier attribute is “Editor”.

Image Hosted by ImageShack.us

The Urdu Webpad included with UrduEditor Lite contains some updates from Asif. There are some minor bug fixes and now the buttons on-screen keyboard show tool tips. You only need to unpack the zip-file containing UrduEditor Lite application in a folder and it is ready for use. No extra steps need to be performed for its installation. I have tested UrduEditor Lite on Windows XP as well as on Windows 98. I do not have a separate installation of Windows 98. I ran Windows 98 inside a virtual machine. I used VMWare for this purpose.

I am releasing UrduEditor Lite again under GPL. Have fun!

Updated location:
Download UrduEditor Lite with source code

Urdu Planet Updates

Monday, May 23rd, 2005

Since there is some confusion on how Urdu Planet works, here is an attempt at clarification.

Urdu Planet is based on the Planet software. Basically, a script is run every 6 hours (at 12am, 6am, 12pm, 6pm US Eastern Time) which looks at the current Atom or RSS feeds of the blogs included in Urdu Planet. The Urdu Planet page then aggregates all the posts that have a date less than 7 days old at that time. In case there are more than 60 such posts, only the latest 60 posts are included on the Urdu Planet webpage. This means that if you post something at 6:05am US Eastern time, it won’t appear on Urdu Planet until noon.

Also, Urdu Planet does not store your blog posts other than what appears on the Urdu Planet page. Therefore, any changes to your blog posts are reflected at Urdu Planet on the next 6-hourly update.

Discussion on Urdu Content Management

Tuesday, May 10th, 2005

There is an ongoing discussion about the choice of a back-end system for the proposed Urdu portal. I have been asserting the need of a content-management system (CMS) for the creation, integration and management of Urdu content. I have practically no prior practical experience of using a CMS. I have just done some web browsing to gather some information. Following is the minimum set of features that a CMS should support in order to be useful for the Urdu portal:

  1. Support of layout templates
  2. Interactive support for adding/removing sections
  3. Online WYSIWYG editor for editing content
  4. Customisable for displaying Urdu content
  5. User registration
  6. Integration of content such as Urdu Wiki, Urdu forum, member blogs etc.

The content-management systems Drupal, Mambo and Typo3 all have excellent support for these features. Further these CMSes also contain built in applications such as chat, eCommerce etc. One big problem with the above mentioned CMSes is the learning curve associated. Installing these CMSes is not very difficult. I installed Drupal and Typo3 without much problem but I did not go much beyond their default generated web sites.

I did not think about evaluating WordPress earlier because I always thought of it as a blogging platform, which probably is not completely true. People have actually been using WordPress in their content-management solutions. The overwhelming argument in favour of WordPress is the available know-how. There are already a number bloggers i.e Asif, Danial, Ejaz, KO etc. who have been using WordPress and are familiar with its intricacies. A lot depends on these fellows to give Urdu portal a head start with their knowledge of web technologies. The main page of a WP-based web site consists of posts, which is not exactly what we want in a portal. Again I would expect on my WP-expert friends to come up with a decent customisation of WP. Following articles advocate the use of WP as a CMS:

I would also leave the issue of a more powerful CMS for the future. The content-management needs of the Urdu portal are surely going to get more demanding with time. A migration to some other CMS may be necessary by then. On the other hand WP is also under continuous development. It can also be hoped that it stays capable of managing the content of the Urdu portal.

Comparing the features of two or CMSes is not an easy task. There are dozens of factors/parameters that have to be considered in such a comparison. CMS Matrix is a web site that makes this comparison a lot easier. You just have to select the CMSes to be compared from the given list and it provides a side-by-side comparison of their features. I selected WordPress, Typo3, Mambo and Drupal for such a comparison. It could clearly be seen from the comparison that WP lags behind the other full-fledged systems in terms of content-management capabilities.

Another web site opensourceCMS provides information about the open source content-management systems. It also provides a CMS-rating which based upon the user’s votes.

Layout

A horizontal and a vertical menu bar should support the web site navigation. The content should be presented in the form of sections distributed in a two column layout. Following web sites/portals present such a layout:

I have deliberately chosen only the sites that use Unicode Urdu. Impelementing the proposed layout in WP would probably require a fair deal of CSS/HTML/PHP wizardry and I hope that our experienced friends will help us.

Font

I think we should, at this point, also debate the issue of which Urdu to use in the Urdu portal. Most of the Unicode Urdu-based web sites are using either Urdu Naskh Asiatype or Nafees Web Naskh font. I would vote for Urdu Naskh Asiatype. This font also works on Windows 98. Some people may think of tahoma. Personally, I do not like tahoma but that is only my opinion.

Content (or wish list)

The content of the Urdu portal will keep evolving just like its layout. I can think of the following content presented by the Urdu portal to begin with:

  • Urdu Wiki containing technical resources about installing Urdu support and Urdu blogging etc.
  • Urdu forum. This is going to be completely based on Unicode Urdu. I will gladly help Qadeer in setting up this forum
  • Blog feed aggregator (Urdu planet). This should be left to Zack.
  • News feed aggregator (for news from BBCUrdu.com etc.).
  • Links to newspapers columns and editorials with their summaries
  • Literary section
    • Book reviews
    • Interviews
    • Classics
    • Poetry
  • Urdu chat

You are encouraged to supplement the above list. I have added a section to Urdu Wiki for the purpose of collecting ideas about the types of Urdu content to be incorporated.

And finally there are some very useful suggestions about creating an Urdu web site by Mr Amjad Sheikh.