Arabic support in DocBook

Hi
The translation of the ZF Docs (Zend Framework documentation) to Arabic faced some problems at the first. the documentation team using DocBook as a documentation generator. me as a translator have to write the translated content in XML files in a known data structure. all this files will be compiled later be DocBook which generates XHTML files depending on XSL files defining how every thing in the XML files will be translated to XHTML.

the problem was the Arabic support. DocBook is supporting many translations and the Arabic language is one of them. but they forgot something, the Arabic Language is written from right to left and there is no configuration files provided to control this thing. so I had to modify the XSL files to get what I want.
If you have the same problem, you can check my solution. you can read it on the ZF Wiki .

c u later

Links: Phalanger and SPL

I found 2 good IRC presentations about Phalanger (PHP.NET compiler) [by zaemis] and SPL (Standard PHP Library) [by Davy Shafik]. check PHP.ThinkTank .

Phalanger: the presentation was about some very basics of how .NET works and how we can include a .NET assemblies in our normal PHP code and use it and how you can write PHP applications in the .NET way using Phalanger.
there were some Java guys said that they will say goodbye Java and move to .NET .. lol . they liked the idea of how you can write assemblies in C# for example and then consuming it in their PHP.NET code. I like this too.
zaemis gave a basic example on how you can create a simple form (it’s a Desktop one this time) and get some data from a MySQL database and display it in a data grid. if you are already a PHP developer, after seeing his code , you will feel  home :-). the code looks like a normal PHP code except the first lines where he is importing the required namespaces. notice the triple colons. till now there is no namespaces support in the normal PHP but what I remember is that it will be added in PHP6.

notice that in PHP.NET you are still writing your lovely dynamic code. you can see this too in IronPython. (hell on static typing)

SPL: Davey gave a nice presentation about the basics of SPL. he talked about the Iterator interface, IteratorAggregate, ArrayObject , ArrayAccess , RecursiveIteratorIterator and dynamic properties.
what I like here more is the ArrayAccess interface. by implementing this interface in your class , you can create an instance of this class and save it in a variable for example called $Obj . then use this object like a normal array as you will be allowed of doing things like
$Obj['foo'] = ‘bar’ ; //and
print $Obj['foo'] ; // this results of printing ‘bar’

this is the same like using indexers in C#. but remember that you still can’t iterate on this object using foreach f.e. else if you are implementing an iterator interface.

Boring freelancing work

 I was always thinking that freelancing is a very nice thing. you will wake up whenever you want and work in the night instead of starting your work at 8 a.m . you will get allot of money as you are your own company. but …. that’s not every thing as there is a dark side for every thing.

I can talk about the 2 most boring points:
1- you will have to search for work always on freelancing websites and interact with allot of annoying clients. I can say that 90% of my clients don’t pay on time and can change their minds 10 times/hour. after looking at my time records for my work for this year (2006), I can see that the average gab between the date of finishing projects(every thing finished and tested by the client) and receiving my money  = 27 days. isn’t it annoying to get your money after one month ?!!

2- working at home. I don’t go out at all and this is the most annoying thing. also I’m now studding from home, so there is no chance to go out. walking in the street  and watching all those people every day is a nice thing.  when I was younger I thought that staying at home and not going to school is a wonderful thing. but now I can see that I was wrong.

so now I’m searching for a good PHP/Web Development company any where in this world to work with. I was searching for real PHP/Web Development companies here is Alexandria but I didn’t find at all. maybe all the programming companies here are working with .NET .
so.. if I couldn’t find any good PHP company here , I will move to .NET . I’m already studding .NET and C# 2.0 now and I think that my experience of web development using PHP will be helpful with .NET too. what I know till now is that if you want to apply for a  job as a junior C# Developer you have to know

- C#2.0
- ADO.NET (maybe LINQ after that)
- ASP.NET
- MS SQL Server
- XML.

I don’t know if this new things like ATLAS (they changed the name as I remember) is required now or not.

one second, I forgot to till you about another annoying thing … Mazen (my young brother). he is standing beside me and started crying as he wants to play some games. I will give him the computer now and I hope that he will play FIFA 06 so I can play too.. hehe lol
c u.

Zend_Locale_Format with localized numbers

In a last post I was talking about some features in Zend_Locale. one of this features was the ability of getting numbers totally
localized. f.e. if we are using the locale ar_EG we can get the number 1235.452 to be formated like 1٬235٫452. the number will be formated depending on the locale settings that’s used by each country (all the locale setting are coming from LDML files).
Thomas Weidner did a great work to finish all that and he is hard working now on Zend_Date. so I coded the idea of normalizing and generating localized number notations. to get it clearer, in Arabic we are using special notation of numbers so in the last example we won’t get the result as 1٬235٫452 only but it will be ١٬٢٣٥٫٤٥٢. you won’t be forced to get the numbers notation localized , there will be an optional parameter that you can use to set your preferred behavior.
there is a lot of other nice things and I hope that I will be posting about it soon, just after getting every thing ready.

And about the Arabic translation of the docs, I have finished 60% of the files . expect it to be ready soon.

getting a nice jabber client

Today and like most of the days in the last month, I used to meeting some of the Zend Framework guys in a chat room on the framework’s chat server. they are using a open source chat server named Wildfire which supports the XMPP(Jabber) protocol. so connecting to this server will require some special chat client.
It was my first time to know about the Jabber protocol and as a first step, I had to search for a good client to work with it. my first try was with a client named Pandion . I was working with Pandion for a month till this morning when I decided getting a better client. Pandion wasn’t bad, but I wanted something can connect to many servers in the same time.
Also, Google Talk can be accessed using any Jabber/XMPP client. so it will be nice if I can be connected to GTalk  while connected to other servers too using one program (I hate managing all this chat clients). there is a list of good clients listed in GTalk’s FAQ.
Now my new client is Psi . it supports connecting to many servers, very light weight , user friendly Interface,  memory friendly and supports many platforms. I like it, maybe this is the best and the only one that supports connecting to many servers in the same time.

Okay enough, I’m hungry. I will go get something to eat.
c ya