theClimber

To content | To menu | To search

Tag - informatique

Entries feed - Comments feed

Thursday, October 1 2009

Open your OpenOffice files in MS Office 2003 and 2007 !!

I love OpenOffice.org, and have been using it for years. One of the benefits is the sheer amount of space that one can save when using OpenOffice Writer - the ODT files are much smaller. In an age where hard drives and other storage doesn't limit the size of files as much, it seems I am a dinosaur for even considering the amount of bytes I can save. Still, the more free space I have, the more I can store. Plus, when it comes to sending and receiving documents, the smaller they are the less impact it is on a network. In the grand scheme of things, I think bloated documents are as bad as low bandwidth in some areas.

This benefit of OpenOffice.org is lost when I have to send someone a Microsoft Office format for a text file. It bugs me, and I often forget to wipe the converted files to save space - maybe I am getting old. Thus, when I came across How to open ODT (openoffice.org text) files in Microsoft Word, I was surprised and happy.

Quoting from the original site:

Office 2007

  1. Install Service Pack 1 for Office 2007.
  2. Install Sun ODF Plugin for Microsoft Office.
  3. Open ODT document via File > Open, or by double-clicking the ODT file and when prompted for the application to open it with, choose Word.

If you have Office 2003, installing the Sun ODF Plugin should just work.

If you don’t have administrator privileges to install software, you can try an online converter such as Zamzar or Media Convert. You can also upload ODT documents to Google Docs or Zoho Writer.

Thank you. Now, when I accidentally send a smaller file and am short on time, I can simply point people to that and allow me to stop converting files because Microsoft itself had never supported ODT - an open standard with open source software that they could easily have allowed for to be intercompatible.

Monday, September 28 2009

Setup i18n gettext in your PHP application

What is gettext and why use it?

i18n.jpg

gettext is the GNU internationalization and localization (i18n) library. It is commonly used for writing multilingual programs. It has an implementation in a lot of different languages and it's also commonly used in PHP applications.

But what does you mean by internationalisation? Actually, when you write computer code you are also going to write into your code some sentences which will be prompted to the used who is running the application. Those sentences are always written in a language of your choice. But what if that person doesn't understand that language.

The first reaction to solve this problem would be to say : "Ok, but I'm gonna make another version of the code in an other language. I'll translate all those sentences so that my application could be used by other people". And we agree, this is indeed the first solution we get. But this is not optimal since you decide to modify your intial app, you'll have to modify all the translated app too and this is not an issue. It's totally broken to work like this because it imply an enormous quantity of duplicated code and a big amount of work !

That's the moment when gettext came and solved all your problems ! Indeed, the gettext solution proposes te replace all those strings with a call to a gettext function with your sentence as parameter. This function check the chosen language and if it knows a translation of the sentence in that language, it returns the translated sentence, otherwise it returns the initial sentence.

Continue reading...

Monday, June 22 2009

La bible traduit pour les geek

Dieu dit:

$ tar -xzvf light-0.1.tar.gz
$ cd light-0.1
$ ./configure
$ make
$ su
password:
# make install
# exit
exit
$ light

et la lumière fut.