I just noticed today that Google has added 4 more languages to its translation tools. Although current tagged as a BETA service, you can now translate in:
English to Arabic BETA
English to Japanese BETA
English to Korean BETA
English to Chinese (Simplified) BETA
So test it out, I have translated “Google adds four new languages to its web translation tool” into each of the new languages:
توضع اربع لغات جديده اضافه الي ادوات الترجمه علي (Arabic)
Google는 그것의 웹 번역 도구에 4개의 새로운 언어를 추가한다 (Korean)
谷歌增加4个新的网络语言翻译工具 (Simplified Chinese)
I have no idea how accurate the translations are, so if any native speakers could verify them that would be great!
If you are wondering how I managed to get the foreign characters from Google translate on to my blog, well I couldn’t just copy and paste from the source, so I made a tool that converts foreign characters into html special characters.
First up I had to download the package from the pecl repository via pear
pear install pdflib
But that gave me an error sh: phpize: command not found, so I had to install phpize. This appears to be part of the php-pecl-pdo-devel.i386 package. So installed this with yum
yum install php-pecl-pdo-devel
I then tried installing pdflib through pear again, but this time it had a different complaint aclocal: command not found. So apparently I need the automake package.
yum install automake
I try installing pdflib again, but this time it complains about no c compliler found! So then I try install gcc
yum install gcc
If you get a No Database Drivers available! error when trying to install SQL-ledger, it is most likely because you haven’t installed the perl/postgresql drivers. With FC3 you can install them through:
yum install perl-DBD-Pg
These weren’t the only difficulties I encountered with the sql-ledger installation process, so I have detailed the steps I took here:
yum install postgresql postgresql-server php-pgsql postgresql-pl perl-DBD-Pg
Then download and run the sql-ledger setup script
chmod +x setup.perl
Follow the on-screen prompts, and then once that has completed you will have to setup the database user etc..
createlang plpgsql template1
You will then probably need to change the security settings of postgresql to trust local users, I did this by editing pg_hba.conf and changing the authentication to
local all all trust
Finally you should visit the http://localhost/sql-ledger/admin.pl script in your webbrowser to complete the setup.
We’ve been having a big debate in our office recently on whether we should be using Classes and Objects as a method of best practice in our PHP coding standards, or whether instead we should stick to using functions and avoid objects like the plague. I have been searching the web for other peoples views on the issue, and I eventually found this great article over on zend.com. You should read it if only for the comical but accurate descriptions of the procedural fanatic and the object fanatic.
Zend Technologies – Articles – The Best Tool For The Job: OO versus Procedural Programming in PHP
The general conclusion is that there is a time and a place for both programming methods, with procedural techniques better suited for building low overhead, tight and fast code, whereas object orientated techniques are better for making code that is re-useable and more flexible.
Nathan Ho has published some handy PHP GPG Encryption functions and classes on his site. It’s nice that he has even taken the time to write his code as both as class and a function for those that prefer one or the other.