Women in Technology

Hear us Roar



Article:
  Internationalization and Localization with PHP
Subject:   Wrong perspective
Date:   2003-03-28 13:18:08
From:   shiflett
Response to: oh, are you mistaken...

It's quite short-sighted to try to launch a semantic argument like this against the merits of the article. Your logic seems to rely completely on whether this article is a tutorial or a real-world example. It is a tutorial, even though it may be based on a real-world example.


For example, take this:



$messages = array (
'en_US'=> array(
'My favorite foods are' =>
'My favorite foods are',
'french fries' => 'french fries',
'biscuit' => 'biscuit',
'candy' => 'candy',
'potato chips' => 'potato chips',
'cookie' => 'cookie',
'corn' => 'corn',
'eggplant' => 'eggplant'
),


'en_GB'=> array(
'My favorite foods are' =>
'My favourite foods are',
'french fries' => 'chips',
'biscuit' => 'scone',
'candy' => 'sweets',
'potato chips' => 'crisps',
'cookie' => 'biscuit',
'corn' => 'maize',
'eggplant' => 'aubergine'
)
);


This is just example code to create the array that he demonstrates how to use. This array doesn't have to be hard-coded, but this article's scope isn't about creating a friendly interface for translators, it's about internationalization for programmers. It is trivial to make a nice little Web application that provides a friendly data entry interface for translators that stores the information in a database. This database can be used to create the array.


There are plenty of tutorials that demonstrate how to interact with a database. This one is about internationalization and localization.