I am building a shopping cart application similar to OS Commerce.  I am
trying to build it for expansion and customization right from the start, so
I have decided to start from the beginning with localization support.

Basically, I have a file for each shopping cart 'section' that contains the
text labels as constants:
define('CART_TITLE',"Shopping Cart");
define('CART_PAGETEXT',"Click on 'Continue Shopping' to return to the
website and continue your shopping.  Click on 'Empty Cart' to clear out all
the products currently in your shopping cart.  Click on \"Checkout\" to fill
out your billing information and complete your order.");
define('CART_SKU',"Sku");
define('CART_NAME',"Name");
define('CART_QTY',"Qty");
define('CART_PRICE',"Price");
define('CART_EXT',"Ext.");
define('CART_DELETE',"del");
define('CART_EDIT',"edit");

The merchant has an administration where they can edit any label in the
shopping cart to be the language of their choice, or to just change a label
to be more customized to their needs.

In the past, I have always done this with databases, i.e. CART_TITLE is a
database field that gets loaded in the shoppingcart page, and the value is
the label.

The trouble that I am having conceptually right now is how to make a user
interface to modify the text files that define the labels without making the
merchant download, modify and then upload the file.  That would involve
'teaching' them how to do it properly - the whole purpose of this
application is that it is supposed to be easy for ANYONE to use, no HTML or
programming experience necessary.

My first inclination is in the adminitration, to load the label file as an
array, and split out the fields for editing, then after validation, re-write
the label file using streams.

I guess I am wondering if anyone has a more elegant solution than this?
User interface in the administration is the key here, and the method above
leaves some UI questions such as 'when viewing the administration page, how
can the user relate the label called CART_EDIT to the edit button in the
cart page?' 

If anyone has some experience in doing this, I would appreciate any
tips/insights, or even recommendations on whether this is a good way of
localizing the application!

TIA! 
--
Cheers

Mike Morton

****************************************************
*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*
****************************************************

"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to