After reading up on notifiers/observers, I tried to find a notifier to attach in include/application_top.php. However, there does not appear to be one.
On the other hand, it seems I could use includes/extra_configures for exactly this purpose?
So I made a new file as follows, using the (slightly corrected spelling) logic from the Japanese localization for now. I don't know what to put in the header for the package, constants does not seem right, so I made up "langauges" until I learn what would be best:
Code:
<?php
/**
* define for use with Japanese: furigana support based on language chosen
*
* @package languages
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: media_manager.php 2842 2006-01-13 06:21:11Z drbyte $
*/
/**
* is Furigana necessary?
**/
if (defined('FURIGANA_NECESSARY_COUNTRIES') &&
!is_bool(strpos(strtolower(FURIGANA_NECESSARY_COUNTRIES), strtolower($_SESSION['language']))))
define('FURIGANA_NECESSARY', true);
else
define('FURIGANA_NECESSARY', false);
If this is correct, then this extra file would be added to the Japanese language pack now in preparation, and application_top.php has no changes.
For the code where FURIGANA_NECESSARY is used, I don't know how to handle that yet, but if it can be done by notifiers that would of course be great.
As an aside, the Japanese localization mades some changes to the database fields too for kana support obviously, but also for privacy of customer's telephone number:
Code:
# add telephone number to address, but remove from private information
ALTER TABLE address_book ADD COLUMN entry_telephone varchar(32) NOT NULL;
ALTER TABLE address_book ADD COLUMN entry_fax varchar(32);
ALTER TABLE orders ADD COLUMN delivery_telephone varchar(32);
ALTER TABLE orders ADD COLUMN delivery_fax varchar(32);
ALTER TABLE orders ADD COLUMN billing_telephone varchar(32);
ALTER TABLE orders ADD COLUMN billing_fax varchar(32);
ALTER TABLE orders ADD COLUMN customers_fax varchar(32);
ALTER TABLE customers CHANGE customers_telephone customers_telephone VARCHAR(32);
ALTER TABLE orders CHANGE customers_telephone customers_telephone VARCHAR(32);
# Furigana support added
ALTER TABLE address_book ADD entry_firstname_kana varchar(32) NOT NULL default '';
ALTER TABLE address_book ADD entry_lastname_kana varchar(32) NOT NULL default '';
ALTER TABLE customers ADD customers_firstname_kana varchar(32) NOT NULL default '';
ALTER TABLE customers ADD customers_lastname_kana varchar(32) NOT NULL default '';
ALTER TABLE orders ADD customers_name_kana varchar(64) NOT NULL default '';
ALTER TABLE orders ADD delivery_name_kana varchar(64) NOT NULL default '';
ALTER TABLE orders ADD billing_name_kana varchar(64) NOT NULL default '';
Is this revertable at all, if one decides to use Japanese language with kana support (and Japan-centric privacy setting of telephone number)? Once data is entered, I presume this is not removable again if one uninstalls the language pack. It would be up to the user to decide how to dispose of the data first?
Bookmarks