You are here: Re: Is This A Good Structure For What I Am Trying To Achieve With The Languages? « PHP Programming Language « IT news, forums, messages
Re: Is This A Good Structure For What I Am Trying To Achieve With The Languages?

Posted by Toby A Inkster on 09/28/38 12:00

adam.timberlake wrote:

> http://www.talkphp.com/vbarticles.php?do=article&articleid=46

From the article:

| This article will inform you on how many people go about creating
| multilingual websites [...] a parent folder is created and then within
| the parent folder are language directories - UK for the UK, for
| instance, and DE for Germany

Firstly, I've never heard of languages called "UK" and "Germany". There
are countries with those names of course, but not languages. The people of
those languages tend to speak English and German.

If you want two-letter abbreviations for languages, use ISO 639-2 Alpha-2
codes -- no need to go reinventing the wheel. In Alpha-2 codes, English is
"en", German is "de", French "fr" and so forth. A full list can be found
here:

http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes

There are also Alpha-3 codes, which cover a superset of the languages of
Alpha-2. It is important to re-use existing standards rather than invent
your own if you want to allow your code to be integrated with other
technology in the future.

As for the rest of the article, it just seems to be writing an inferior
replacement for GNU gettext, which is already integrated into PHP and
works fine for most people. Why replace something that already works well?
I'm guessing because the authors of the article know it existed. Well it
does exist. The documentation is here: http://www.php.net/gettext

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 17 days, 23:08.]

Gnocchi all'Amatriciana al Forno
http://tobyinkster.co.uk/blog/2008/01/15/gnocchi-allamatriciana/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация