You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/09/23 01:22:51 UTC

svn commit: r449122 [15/40] - in /tapestry/tapestry4/trunk/tapestry-framework/src: java/org/apache/tapestry/ java/org/apache/tapestry/dojo/ java/org/apache/tapestry/dojo/form/ java/org/apache/tapestry/dojo/html/ java/org/apache/tapestry/form/ java/org/...

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,289 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.i18n.currency");
+
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.i18n.currency");
+
+dojo.require("dojo.regexp");
+dojo.require("dojo.i18n.common");
+dojo.require("dojo.i18n.number");
+dojo.require("dojo.lang.common");
+
+/**
+* Method to Format and validate a given number a monetary value
+*
+* @param Number value
+*	The number to be formatted and validated.
+* @param String iso the ISO 4217 currency code
+* @param Object flags
+*   flags.places The number of decimal places to be included in the formatted number
+* @param String locale the locale to determine formatting used.  By default, the locale defined by the
+*   host environment: dojo.locale
+* @return String
+* 	the formatted currency of type String if successful; Nan if an
+* 	invalid currency is provided or null if an unsupported locale value was provided.
+**/
+dojo.i18n.currency.format = function(value, iso, flags /*optional*/, locale /*optional*/){
+	flags = (typeof flags == "object") ? flags : {};
+
+	var formatData = dojo.i18n.currency._mapToLocalizedFormatData(dojo.i18n.currency.FORMAT_TABLE, iso, locale);
+	if (typeof flags.places == "undefined") {flags.places = formatData.places;}
+	if (typeof flags.places == "undefined") {flags.places = 2;}
+	flags.signed = false;
+
+	var result = dojo.i18n.number.format(value, flags, locale);
+
+	var sym = formatData.symbol;
+	if (formatData.adjSpace == "symbol"){ 
+		if (formatData.placement == "after"){
+			sym = " " + sym;// TODO: nbsp?
+		}else{
+			sym = sym + " ";// TODO: nbsp?
+		}
+	}
+
+	if (value < 0){
+		if (formatData.signPlacement == "before"){
+			sym = "-" + sym;
+		}else if (formatData.signPlacement == "after"){
+			sym = sym + "-";
+		}
+	}
+
+	var spc = (formatData.adjSpace == "number") ? " " : ""; // TODO: nbsp?
+	if (formatData.placement == "after"){
+		result = result + spc + sym;
+	}else{
+		result = sym + spc + result;
+	}
+
+	if (value < 0){
+		if (formatData.signPlacement == "around"){
+			result = "(" + result + ")";
+		}else if (formatData.signPlacement == "end"){
+			result = result + "-";
+		}else if (!formatData.signPlacement || formatData.signPlacement == "begin"){
+			result = "-" + result;
+		}
+	}
+
+	return result;
+};
+
+/**
+* Method to convert a properly formatted monetary value to a primative numeric value.
+*
+* @param String value
+*	The int string to be convertted
+  @param String iso the ISO 4217 currency code
+* @param String locale the locale to determine formatting used.  By default, the locale defined by the
+*   host environment: dojo.locale
+* @param Object flags
+*   flags.validate true to check the string for strict adherence to the locale settings for separator, sign, etc.
+*     Default is true
+* @return Number
+* 	Returns a primative numeric value, Number.NaN if unable to convert to a number, or null if an unsupported locale is provided.
+**/
+dojo.i18n.currency.parse = function(value, iso, locale /*optional*/){
+	if (typeof flags.validate == "undefined") {flags.validate = true;}
+
+	if (flags.validate && !dojo.i18n.number.isCurrency(value, iso, locale, flags)) {
+		return Number.NaN;
+	}
+
+	var sign = (value.indexOf('-') != -1);
+	var abs = abs.replace(/\-/, "");
+
+	var formatData = dojo.i18n.currency._mapToLocalizedFormatData(dojo.i18n.currency.FORMAT_TABLE, iso, locale);
+	abs = abs.replace(new RegExp("\\" + formatData.symbol), "");
+	//TODO: trim?
+
+	var number = dojo.i18n.number.parse(abs, locale, flags);
+	if (sign){number = number * -1;}
+	return number;
+};
+
+/**
+  Validates whether a string denotes a monetary value. 
+
+  @param value  A string
+  @param iso the ISO 4217 currency code
+  @param locale the locale to determine formatting used.  By default, the locale defined by the
+    host environment: dojo.locale
+  @param flags  An object
+    flags.symbol  A currency symbol such as Yen "�", Pound "�", or the Euro sign "�".  
+        The default is specified by the iso code.  For more than one symbol use an array, e.g. ["$", ""], makes $ optional.
+        The empty array [] makes the default currency symbol optional.
+    flags.placement  The symbol can come "before" or "after".  The default is specified by the iso code.
+    flags.signed  The leading plus-or-minus sign.  Can be true, false, or [true, false].
+      Default is [true, false], (i.e. sign is optional).
+    flags.signPlacement  The sign can come "before" or "after" the symbol or "around" the whole expression
+    	with parenthesis, such as CAD: (123$).  The default is specified by the iso code.
+    flags.separator  The character used as the thousands separator. The default is specified by the locale.
+        The empty array [] makes the default separator optional.
+    flags.fractional  The appropriate number of decimal places for fractional currency (e.g. cents)
+      Can be true, false, or [true, false].  Default is [true, false], (i.e. cents are optional).
+    flags.places  The integer number of decimal places.
+      If not given, an amount appropriate to the iso code is used.
+    flags.fractional  The appropriate number of decimal places for fractional currency (e.g. cents)
+      Can be true, false, or [true, false].  Default is [true, false], (i.e. cents are optional).
+    flags.decimal  The character used for the decimal point.  The default is specified by the locale.
+  @return  true or false.
+*/
+dojo.i18n.currency.isCurrency = function(value, iso, locale /*optional*/, flags){
+	flags = (typeof flags == "object") ? flags : {};
+
+	var numberFormatData = dojo.i18n.number._mapToLocalizedFormatData(dojo.i18n.number.FORMAT_TABLE, locale);
+	if (typeof flags.separator == "undefined") {flags.separator = numberFormatData[0];}
+	else if (dojo.lang.isArray(flags.separator) && flags.separator.length == 0){flags.separator = [numberFormatData[0],""];}
+	if (typeof flags.decimal == "undefined") {flags.decimal = numberFormatData[2];}
+	if (typeof flags.groupSize == "undefined") {flags.groupSize = numberFormatData[3];}
+	if (typeof flags.groupSize2 == "undefined") {flags.groupSize2 = numberFormatData[4];}
+
+	var formatData = dojo.i18n.currency._mapToLocalizedFormatData(dojo.i18n.currency.FORMAT_TABLE, iso, locale);
+	if (typeof flags.places == "undefined") {flags.places = formatData.places;}
+	if (typeof flags.places == "undefined") {flags.places = 2;}
+	if (typeof flags.symbol == "undefined") {flags.symbol = formatData.symbol;}
+	else if (dojo.lang.isArray(flags.symbol) && flags.symbol.length == 0){flags.symbol = [formatData.symbol,""];}
+	if (typeof flags.placement == "undefined") {flags.placement = formatData.placement;}
+	//TODO more... or mixin?
+
+	var re = new RegExp("^" + dojo.regexp.currency(flags) + "$");
+//dojo.debug(value+":"+dojo.regexp.currency(flags)+"="+re.test(value));
+	return re.test(value);
+};
+
+dojo.i18n.currency._mapToLocalizedFormatData = function(table, iso, locale /*optional*/){
+	var formatData = dojo.i18n.currency.FORMAT_TABLE[iso];
+	if (!dojo.lang.isArray(formatData)){
+		return formatData;
+	}
+
+	return dojo.i18n.number._mapToLocalizedFormatData(formatData[0], locale);
+};
+
+(function() {
+	var arabic = {symbol: "\u062C", placement: "after", htmlSymbol: "?"};
+	var euro = {symbol: "\u20AC", placement: "before", adjSpace: "symbol", htmlSymbol: "&euro;"};
+	var euroAfter = {symbol: "\u20AC", placement: "after", htmlSymbol: "&euro;"};
+
+//Q: Do European countries still use their old ISO symbols instead of just EUR?
+//Q: are signPlacement and currency symbol placement ISO-dependent or are they really locale-dependent?
+//TODO: htmlSymbol is for html entities, need images? (IBM: why? why can't we just use unicode everywhere?)
+//TODO: hide visibility of this table?
+//for html entities, need a image for arabic symbol "BHD" as "DZD", "EGP", "JOD", "KWD" "LBP", "MAD", "OMR", "QAR", "SAR", "SYP", "TND", "AED", "YER"
+//Note: html entities not used at the moment
+//placement: placement of currency symbol, before or after number
+//signPlacement: placement of negative sign, before or after symbol, or begin or end of expression, or around with parentheses
+// This table assumes defaults of
+//	places: 2, placement: "before", signPlacement: "begin", adjSpace: undefined, htmlSymbol: undefined]
+dojo.i18n.currency.FORMAT_TABLE = {
+	AED: {symbol: "\u062c", placement: "after"},
+	ARS: {symbol: "$", signPlacement: "after"},
+	//Old ATS: {symbol: "S", adjSpace: "symbol"},
+	ATS: {symbol: "\u20AC", adjSpace: "number", signPlacement: "after", htmlSymbol: "&euro;"}, 	//Austria using "EUR" // neg should read euro + sign + space + number
+	AUD: {symbol: "$"},
+	BOB: {symbol: "$b"},
+	BRL: {symbol: "R$", adjSpace: "symbol"},
+	//Old BEF: {symbol: "BF", placement: "after", adjSpace: "symbol"},
+	BEF: euroAfter,	//Belgium using "EUR"
+	//Old BHD: {symbol: "\u062C", signPlacement: "end", places: 3, htmlSymbol: "?"},
+	BHD: arabic,
+	//TODO: I'm suspicious that all the other entries have locale-specific data in them, too?
+	//Q: which attributes are iso-specific and which are locale specific?
+	CAD: [{
+			'*' : {symbol: "$"},
+			'fr-ca' : {symbol: "$", placement: "after", signPlacement: "around"}
+		}],
+	CHF: {symbol: "CHF", adjSpace: "symbol", signPlacement: "after"},
+	CLP: {symbol: "$"},
+	COP: {symbol: "$", signPlacement: "around"},
+	CNY: {symbol: "\u00A5", htmlSymbol: "&yen;"},
+	//// Costa Rica  - Spanish slashed C. need to find out the html entity image
+	CRC: {symbol: "\u20A1", signPlacement: "after", htmlSymbol: "?"},
+	// Czech Republic  - Czech //need image for html entities
+	CZK: {symbol: "Kc", adjSpace: "symbol", signPlacement: "after"},
+	DEM: euroAfter,
+	DKK: {symbol: "kr.", adjSpace: "symbol", signPlacement: "after"},
+	DOP: {symbol: "$"},
+	//for html entities, need a image, bidi, using "rtl", so from the link, symbol is suffix
+	//Old DZD: {symbol: "\u062C", signPlacement: "end", places: 3, htmlSymbol: "?"},
+	DZD: arabic,
+	//Ecuador using "USD"
+	ECS: {symbol: "$", signPlacement: "after"},
+	EGP: arabic,
+	//Old ESP: {symbol: "Pts", placement: "after", adjSpace: "symbol", places: 0},
+	ESP: euroAfter,	//spain using "EUR"
+	EUR: euro,
+	//Old FIM: {symbol: "mk", placement: "after", adjSpace: "symbol"},
+	FIM: euroAfter,	//Finland using "EUR"
+	//Old FRF: {symbol: "F", placement: "after", adjSpace: "symbol"},
+	FRF: euroAfter,	//France using "EUR"
+	GBP: {symbol: "\u00A3", htmlSymbol: "&pound;"},
+	GRD: {symbol: "\u20AC", signPlacement: "end", htmlSymbol: "&euro;"},
+	GTQ: {symbol: "Q", signPlacement: "after"},
+	//Hong Kong need "HK$" and "$". Now only support "HK$"
+	HKD: {symbol: "HK$"},
+	HNL: {symbol: "L.", signPlacement: "end"},
+	HUF: {symbol: "Ft", placement: "after", adjSpace: "symbol"},
+	//IEP: {symbol: "\u00A3", htmlSymbol: "&pound;"},
+	IEP: {symbol: "\u20AC", htmlSymbol: "&euro;"},	//ireland using "EUR" at the front.
+	//couldn't know what Israel - Hebrew symbol, some sites use "NIS", bidi, using "rtl", so from the link, symbol is suffix (IBM: huh?)
+	//ILS: {symbol: "\u05E9\u0022\u05D7", signPlacement: "end", htmlSymbol: "?"},
+	ILS: {symbol: "\u05E9\u0022\u05D7", placement: "after", htmlSymbol: "?"},
+	INR: {symbol: "Rs."},
+	//ITL: {symbol: "L", adjSpace: "symbol", signPlacement: "after", places: 0},
+	ITL: {symbol: "\u20AC", signPlacement: "after", htmlSymbol: "&euro;"},	//Italy using "EUR"
+	JOD: arabic,
+	JPY: {symbol: "\u00a5", places: 0, htmlSymbol: "&yen;"},
+	KRW: {symbol: "\u20A9", places: 0, htmlSymbol: "?"},
+	KWD: arabic,
+	LBP: arabic,
+	//Old LUF: {symbol: "LUF", placement: "after", adjSpace: "symbol"},
+	//for Luxembourg,using "EUR"
+	LUF: euroAfter,
+	MAD: arabic,
+	MXN: {symbol: "$", signPlacement: "around"},
+	NIO: {symbol: "C$", adjSpace: "symbol", signPlacement: "after"},
+	//Old NLG: {symbol: "f", adjSpace: "symbol", signPlacement: "end"},
+	//Netherlands, using "EUR"
+	NLG: {symbol: "\u20AC", signPlacement: "end", htmlSymbol: "&euro;"},
+	NOK: {symbol: "kr", adjSpace: "symbol", signPlacement: "after"},
+	NZD: {symbol: "$"},
+	OMR: arabic,
+	PAB: {symbol: "B/", adjSpace: "symbol", signPlacement: "after"},
+	PEN: {symbol: "S/", signPlacement: "after"},
+	//couldn't know what the symbol is from ibm link. (IBM: what does this mean?  Is the symbol 'z' wrong?)
+	PLN: {symbol: "z", placement: "after"},
+	//Old PTE: {symbol: "Esc.", placement: "after", adjSpace: "symbol", places: 0},
+	PTE: euroAfter,
+	PYG: {symbol: "Gs.", signPlacement: "after"},
+	QAR: arabic,
+	RUR: {symbol: "rub.", placement: "after"},
+	SAR: arabic,
+	SEK: {symbol: "kr", placement: "after", adjSpace: "symbol"},
+	SGD: {symbol: "$"},
+	//// El Salvador - Spanish slashed C. need to find out. (IBM: need to find out what?)
+	SVC: {symbol: "\u20A1", signPlacement: "after", adjSpace: "symbol"},
+	//for html entities, need a image
+	SYP: arabic,
+	TND: arabic,
+	TRL: {symbol: "TL", placement: "after"},
+	TWD: {symbol: "NT$"},
+	USD: {symbol: "$"},
+	UYU: {symbol: "$U", signplacement: "after", adjSpace: "symbol"},
+	VEB: {symbol: "Bs", signplacement: "after", adjSpace: "symbol"},
+	YER: arabic,
+	ZAR: {symbol: "R", signPlacement: "around"}
+};
+
+})();

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/common.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/common.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,289 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.i18n.currency.common");
+
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.i18n.currency");
+
+dojo.require("dojo.regexp");
+dojo.require("dojo.i18n.common");
+dojo.require("dojo.i18n.number");
+dojo.require("dojo.lang.common");
+
+/**
+* Method to Format and validate a given number a monetary value
+*
+* @param Number value
+*	The number to be formatted and validated.
+* @param String iso the ISO 4217 currency code
+* @param Object flags
+*   flags.places The number of decimal places to be included in the formatted number
+* @param String locale the locale to determine formatting used.  By default, the locale defined by the
+*   host environment: dojo.locale
+* @return String
+* 	the formatted currency of type String if successful; Nan if an
+* 	invalid currency is provided or null if an unsupported locale value was provided.
+**/
+dojo.i18n.currency.format = function(value, iso, flags /*optional*/, locale /*optional*/){
+	flags = (typeof flags == "object") ? flags : {};
+
+	var formatData = dojo.i18n.currency._mapToLocalizedFormatData(dojo.i18n.currency.FORMAT_TABLE, iso, locale);
+	if (typeof flags.places == "undefined") {flags.places = formatData.places;}
+	if (typeof flags.places == "undefined") {flags.places = 2;}
+	flags.signed = false;
+
+	var result = dojo.i18n.number.format(value, flags, locale);
+
+	var sym = formatData.symbol;
+	if (formatData.adjSpace == "symbol"){ 
+		if (formatData.placement == "after"){
+			sym = " " + sym;// TODO: nbsp?
+		}else{
+			sym = sym + " ";// TODO: nbsp?
+		}
+	}
+
+	if (value < 0){
+		if (formatData.signPlacement == "before"){
+			sym = "-" + sym;
+		}else if (formatData.signPlacement == "after"){
+			sym = sym + "-";
+		}
+	}
+
+	var spc = (formatData.adjSpace == "number") ? " " : ""; // TODO: nbsp?
+	if (formatData.placement == "after"){
+		result = result + spc + sym;
+	}else{
+		result = sym + spc + result;
+	}
+
+	if (value < 0){
+		if (formatData.signPlacement == "around"){
+			result = "(" + result + ")";
+		}else if (formatData.signPlacement == "end"){
+			result = result + "-";
+		}else if (!formatData.signPlacement || formatData.signPlacement == "begin"){
+			result = "-" + result;
+		}
+	}
+
+	return result;
+};
+
+/**
+* Method to convert a properly formatted monetary value to a primative numeric value.
+*
+* @param String value
+*	The int string to be convertted
+  @param String iso the ISO 4217 currency code
+* @param String locale the locale to determine formatting used.  By default, the locale defined by the
+*   host environment: dojo.locale
+* @param Object flags
+*   flags.validate true to check the string for strict adherence to the locale settings for separator, sign, etc.
+*     Default is true
+* @return Number
+* 	Returns a primative numeric value, Number.NaN if unable to convert to a number, or null if an unsupported locale is provided.
+**/
+dojo.i18n.currency.parse = function(value, iso, locale /*optional*/){
+	if (typeof flags.validate == "undefined") {flags.validate = true;}
+
+	if (flags.validate && !dojo.i18n.number.isCurrency(value, iso, locale, flags)) {
+		return Number.NaN;
+	}
+
+	var sign = (value.indexOf('-') != -1);
+	var abs = abs.replace(/\-/, "");
+
+	var formatData = dojo.i18n.currency._mapToLocalizedFormatData(dojo.i18n.currency.FORMAT_TABLE, iso, locale);
+	abs = abs.replace(new RegExp("\\" + formatData.symbol), "");
+	//TODO: trim?
+
+	var number = dojo.i18n.number.parse(abs, locale, flags);
+	if (sign){number = number * -1;}
+	return number;
+};
+
+/**
+  Validates whether a string denotes a monetary value. 
+
+  @param value  A string
+  @param iso the ISO 4217 currency code
+  @param locale the locale to determine formatting used.  By default, the locale defined by the
+    host environment: dojo.locale
+  @param flags  An object
+    flags.symbol  A currency symbol such as Yen "�", Pound "�", or the Euro sign "�".  
+        The default is specified by the iso code.  For more than one symbol use an array, e.g. ["$", ""], makes $ optional.
+        The empty array [] makes the default currency symbol optional.
+    flags.placement  The symbol can come "before" or "after".  The default is specified by the iso code.
+    flags.signed  The leading plus-or-minus sign.  Can be true, false, or [true, false].
+      Default is [true, false], (i.e. sign is optional).
+    flags.signPlacement  The sign can come "before" or "after" the symbol or "around" the whole expression
+    	with parenthesis, such as CAD: (123$).  The default is specified by the iso code.
+    flags.separator  The character used as the thousands separator. The default is specified by the locale.
+        The empty array [] makes the default separator optional.
+    flags.fractional  The appropriate number of decimal places for fractional currency (e.g. cents)
+      Can be true, false, or [true, false].  Default is [true, false], (i.e. cents are optional).
+    flags.places  The integer number of decimal places.
+      If not given, an amount appropriate to the iso code is used.
+    flags.fractional  The appropriate number of decimal places for fractional currency (e.g. cents)
+      Can be true, false, or [true, false].  Default is [true, false], (i.e. cents are optional).
+    flags.decimal  The character used for the decimal point.  The default is specified by the locale.
+  @return  true or false.
+*/
+dojo.i18n.currency.isCurrency = function(value, iso, locale /*optional*/, flags){
+	flags = (typeof flags == "object") ? flags : {};
+
+	var numberFormatData = dojo.i18n.number._mapToLocalizedFormatData(dojo.i18n.number.FORMAT_TABLE, locale);
+	if (typeof flags.separator == "undefined") {flags.separator = numberFormatData[0];}
+	else if (dojo.lang.isArray(flags.separator) && flags.separator.length == 0){flags.separator = [numberFormatData[0],""];}
+	if (typeof flags.decimal == "undefined") {flags.decimal = numberFormatData[2];}
+	if (typeof flags.groupSize == "undefined") {flags.groupSize = numberFormatData[3];}
+	if (typeof flags.groupSize2 == "undefined") {flags.groupSize2 = numberFormatData[4];}
+
+	var formatData = dojo.i18n.currency._mapToLocalizedFormatData(dojo.i18n.currency.FORMAT_TABLE, iso, locale);
+	if (typeof flags.places == "undefined") {flags.places = formatData.places;}
+	if (typeof flags.places == "undefined") {flags.places = 2;}
+	if (typeof flags.symbol == "undefined") {flags.symbol = formatData.symbol;}
+	else if (dojo.lang.isArray(flags.symbol) && flags.symbol.length == 0){flags.symbol = [formatData.symbol,""];}
+	if (typeof flags.placement == "undefined") {flags.placement = formatData.placement;}
+	//TODO more... or mixin?
+
+	var re = new RegExp("^" + dojo.regexp.currency(flags) + "$");
+//dojo.debug(value+":"+dojo.regexp.currency(flags)+"="+re.test(value));
+	return re.test(value);
+};
+
+dojo.i18n.currency._mapToLocalizedFormatData = function(table, iso, locale /*optional*/){
+	var formatData = dojo.i18n.currency.FORMAT_TABLE[iso];
+	if (!dojo.lang.isArray(formatData)){
+		return formatData;
+	}
+
+	return dojo.i18n.number._mapToLocalizedFormatData(formatData[0], locale);
+};
+
+(function() {
+	var arabic = {symbol: "\u062C", placement: "after", htmlSymbol: "?"};
+	var euro = {symbol: "\u20AC", placement: "before", adjSpace: "symbol", htmlSymbol: "&euro;"};
+	var euroAfter = {symbol: "\u20AC", placement: "after", htmlSymbol: "&euro;"};
+
+//Q: Do European countries still use their old ISO symbols instead of just EUR?
+//Q: are signPlacement and currency symbol placement ISO-dependent or are they really locale-dependent?
+//TODO: htmlSymbol is for html entities, need images? (IBM: why? why can't we just use unicode everywhere?)
+//TODO: hide visibility of this table?
+//for html entities, need a image for arabic symbol "BHD" as "DZD", "EGP", "JOD", "KWD" "LBP", "MAD", "OMR", "QAR", "SAR", "SYP", "TND", "AED", "YER"
+//Note: html entities not used at the moment
+//placement: placement of currency symbol, before or after number
+//signPlacement: placement of negative sign, before or after symbol, or begin or end of expression, or around with parentheses
+// This table assumes defaults of
+//	places: 2, placement: "before", signPlacement: "begin", adjSpace: undefined, htmlSymbol: undefined]
+dojo.i18n.currency.FORMAT_TABLE = {
+	AED: {symbol: "\u062c", placement: "after"},
+	ARS: {symbol: "$", signPlacement: "after"},
+	//Old ATS: {symbol: "S", adjSpace: "symbol"},
+	ATS: {symbol: "\u20AC", adjSpace: "number", signPlacement: "after", htmlSymbol: "&euro;"}, 	//Austria using "EUR" // neg should read euro + sign + space + number
+	AUD: {symbol: "$"},
+	BOB: {symbol: "$b"},
+	BRL: {symbol: "R$", adjSpace: "symbol"},
+	//Old BEF: {symbol: "BF", placement: "after", adjSpace: "symbol"},
+	BEF: euroAfter,	//Belgium using "EUR"
+	//Old BHD: {symbol: "\u062C", signPlacement: "end", places: 3, htmlSymbol: "?"},
+	BHD: arabic,
+	//TODO: I'm suspicious that all the other entries have locale-specific data in them, too?
+	//Q: which attributes are iso-specific and which are locale specific?
+	CAD: [{
+			'*' : {symbol: "$"},
+			'fr-ca' : {symbol: "$", placement: "after", signPlacement: "around"}
+		}],
+	CHF: {symbol: "CHF", adjSpace: "symbol", signPlacement: "after"},
+	CLP: {symbol: "$"},
+	COP: {symbol: "$", signPlacement: "around"},
+	CNY: {symbol: "\u00A5", htmlSymbol: "&yen;"},
+	//// Costa Rica  - Spanish slashed C. need to find out the html entity image
+	CRC: {symbol: "\u20A1", signPlacement: "after", htmlSymbol: "?"},
+	// Czech Republic  - Czech //need image for html entities
+	CZK: {symbol: "Kc", adjSpace: "symbol", signPlacement: "after"},
+	DEM: euroAfter,
+	DKK: {symbol: "kr.", adjSpace: "symbol", signPlacement: "after"},
+	DOP: {symbol: "$"},
+	//for html entities, need a image, bidi, using "rtl", so from the link, symbol is suffix
+	//Old DZD: {symbol: "\u062C", signPlacement: "end", places: 3, htmlSymbol: "?"},
+	DZD: arabic,
+	//Ecuador using "USD"
+	ECS: {symbol: "$", signPlacement: "after"},
+	EGP: arabic,
+	//Old ESP: {symbol: "Pts", placement: "after", adjSpace: "symbol", places: 0},
+	ESP: euroAfter,	//spain using "EUR"
+	EUR: euro,
+	//Old FIM: {symbol: "mk", placement: "after", adjSpace: "symbol"},
+	FIM: euroAfter,	//Finland using "EUR"
+	//Old FRF: {symbol: "F", placement: "after", adjSpace: "symbol"},
+	FRF: euroAfter,	//France using "EUR"
+	GBP: {symbol: "\u00A3", htmlSymbol: "&pound;"},
+	GRD: {symbol: "\u20AC", signPlacement: "end", htmlSymbol: "&euro;"},
+	GTQ: {symbol: "Q", signPlacement: "after"},
+	//Hong Kong need "HK$" and "$". Now only support "HK$"
+	HKD: {symbol: "HK$"},
+	HNL: {symbol: "L.", signPlacement: "end"},
+	HUF: {symbol: "Ft", placement: "after", adjSpace: "symbol"},
+	//IEP: {symbol: "\u00A3", htmlSymbol: "&pound;"},
+	IEP: {symbol: "\u20AC", htmlSymbol: "&euro;"},	//ireland using "EUR" at the front.
+	//couldn't know what Israel - Hebrew symbol, some sites use "NIS", bidi, using "rtl", so from the link, symbol is suffix (IBM: huh?)
+	//ILS: {symbol: "\u05E9\u0022\u05D7", signPlacement: "end", htmlSymbol: "?"},
+	ILS: {symbol: "\u05E9\u0022\u05D7", placement: "after", htmlSymbol: "?"},
+	INR: {symbol: "Rs."},
+	//ITL: {symbol: "L", adjSpace: "symbol", signPlacement: "after", places: 0},
+	ITL: {symbol: "\u20AC", signPlacement: "after", htmlSymbol: "&euro;"},	//Italy using "EUR"
+	JOD: arabic,
+	JPY: {symbol: "\u00a5", places: 0, htmlSymbol: "&yen;"},
+	KRW: {symbol: "\u20A9", places: 0, htmlSymbol: "?"},
+	KWD: arabic,
+	LBP: arabic,
+	//Old LUF: {symbol: "LUF", placement: "after", adjSpace: "symbol"},
+	//for Luxembourg,using "EUR"
+	LUF: euroAfter,
+	MAD: arabic,
+	MXN: {symbol: "$", signPlacement: "around"},
+	NIO: {symbol: "C$", adjSpace: "symbol", signPlacement: "after"},
+	//Old NLG: {symbol: "f", adjSpace: "symbol", signPlacement: "end"},
+	//Netherlands, using "EUR"
+	NLG: {symbol: "\u20AC", signPlacement: "end", htmlSymbol: "&euro;"},
+	NOK: {symbol: "kr", adjSpace: "symbol", signPlacement: "after"},
+	NZD: {symbol: "$"},
+	OMR: arabic,
+	PAB: {symbol: "B/", adjSpace: "symbol", signPlacement: "after"},
+	PEN: {symbol: "S/", signPlacement: "after"},
+	//couldn't know what the symbol is from ibm link. (IBM: what does this mean?  Is the symbol 'z' wrong?)
+	PLN: {symbol: "z", placement: "after"},
+	//Old PTE: {symbol: "Esc.", placement: "after", adjSpace: "symbol", places: 0},
+	PTE: euroAfter,
+	PYG: {symbol: "Gs.", signPlacement: "after"},
+	QAR: arabic,
+	RUR: {symbol: "rub.", placement: "after"},
+	SAR: arabic,
+	SEK: {symbol: "kr", placement: "after", adjSpace: "symbol"},
+	SGD: {symbol: "$"},
+	//// El Salvador - Spanish slashed C. need to find out. (IBM: need to find out what?)
+	SVC: {symbol: "\u20A1", signPlacement: "after", adjSpace: "symbol"},
+	//for html entities, need a image
+	SYP: arabic,
+	TND: arabic,
+	TRL: {symbol: "TL", placement: "after"},
+	TWD: {symbol: "NT$"},
+	USD: {symbol: "$"},
+	UYU: {symbol: "$U", signplacement: "after", adjSpace: "symbol"},
+	VEB: {symbol: "Bs", signplacement: "after", adjSpace: "symbol"},
+	YER: arabic,
+	ZAR: {symbol: "R", signPlacement: "around"}
+};
+
+})();

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/common.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/EUR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/EUR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/EUR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/EUR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "EUR",
+	symbol: "\u20AC"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/EUR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/GBP.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/GBP.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/GBP.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/GBP.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "GBP",
+	symbol: "\u00A3"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/GBP.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/INR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/INR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/INR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/INR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "INR",
+	symbol: function(value){return (value == 1) ? "Re." : "Rs.";}
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/INR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ITL.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ITL.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ITL.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ITL.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "ITL",
+	symbol: "\u20A4"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ITL.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/JPY.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/JPY.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/JPY.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/JPY.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "JPY",
+	symbol: "\u00a5"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/JPY.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/README
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/README?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/README (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/README Fri Sep 22 16:22:30 2006
@@ -0,0 +1,6 @@
+All files within this directory and subdirectories were manually derived from http://unicode.org/cldr
+
+See terms of use: http://www.unicode.org/copyright.html#Exhibit1
+
+Eventually, this data should be generated directly from the XML in the CLDR repository to provide
+accurate and full support for the full set of locales.

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/README
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/USD.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/USD.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/USD.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/USD.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "USD",
+	symbol: "$"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/USD.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en-us/USD.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en-us/USD.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en-us/USD.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en-us/USD.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	symbol: "$"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en-us/USD.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/EUR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/EUR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/EUR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/EUR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "Euro"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/EUR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/GBP.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/GBP.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/GBP.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/GBP.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "British Pound Sterling"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/GBP.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/INR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/INR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/INR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/INR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "Indian Rupee"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/INR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/ITL.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/ITL.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/ITL.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/ITL.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "Italian Lira"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/ITL.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/JPY.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/JPY.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/JPY.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/JPY.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "Japanese Yen"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/JPY.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/USD.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/USD.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/USD.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/USD.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "US Dollar",
+	symbol: "US$"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/en/USD.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/EUR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/EUR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/EUR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/EUR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "युरो"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/EUR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/GBP.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/GBP.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/GBP.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/GBP.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "ब्रितन का पौन्ड स्टर्लिग"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/GBP.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/INR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/INR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/INR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/INR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "भारतीय  रूपया",
+	symbol: "रु."
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/INR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/ITL.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/ITL.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/ITL.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/ITL.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "इतली का लीरा"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/ITL.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/JPY.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/JPY.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/JPY.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/JPY.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "जापानी येन"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/JPY.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/USD.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/USD.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/USD.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/USD.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "अमरीकी डालर"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/hi/USD.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/EUR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/EUR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/EUR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/EUR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "ユーロ"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/EUR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/GBP.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/GBP.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/GBP.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/GBP.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "英国ポンド"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/GBP.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/INR.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/INR.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/INR.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/INR.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "インド ルピー",
+	symbol: "INR"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/INR.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/ITL.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/ITL.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/ITL.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/ITL.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "イタリア リラ"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/ITL.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/JPY.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/JPY.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/JPY.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/JPY.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,14 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "日本円",
+	symbol: "ï¿¥"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/JPY.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/USD.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/USD.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/USD.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/USD.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,13 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+	displayName: "米ドル"
+})
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/currency/nls/ja/USD.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/number.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/number.js?view=auto&rev=449122
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/number.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/number.js Fri Sep 22 16:22:30 2006
@@ -0,0 +1,292 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.i18n.number");
+
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.i18n.number");
+
+dojo.require("dojo.regexp");
+dojo.require("dojo.i18n.common");
+dojo.require("dojo.lang.common");
+
+/**
+* Method to Format and validate a given number
+*
+* @param Number value
+*	The number to be formatted and validated.
+* @param Object flags
+*   flags.places number of decimal places to show, default is 0 (cannot be Infinity)
+*   flags.round true to round the number, false to truncate
+* @param String locale
+*	The locale used to determine the number format.
+* @return String
+* 	the formatted number of type String if successful
+*   or null if an unsupported locale value was provided
+**/
+dojo.i18n.number.format = function(value, flags /*optional*/, locale /*optional*/){
+	flags = (typeof flags == "object") ? flags : {};
+
+	var formatData = dojo.i18n.number._mapToLocalizedFormatData(dojo.i18n.number.FORMAT_TABLE, locale);
+	if (typeof flags.separator == "undefined") {flags.separator = formatData[1];}
+	if (typeof flags.decimal == "undefined") {flags.decimal = formatData[2];}
+	if (typeof flags.groupSize == "undefined") {flags.groupSize = formatData[3];}
+	if (typeof flags.groupSize2 == "undefined") {flags.groupSize2 = formatData[4];}
+	if (typeof flags.round == "undefined") {flags.round = true;}
+	if (typeof flags.signed == "undefined") {flags.signed = true;}
+
+	var output = (flags.signed && (value < 0)) ? "-" : "";
+	value = Math.abs(value);
+	var whole = String((((flags.places > 0) || !flags.round) ? Math.floor : Math.round)(value));
+
+	// Splits str into substrings of size count, starting from right to left.  Is there a more clever way to do this in JS?
+	function splitSubstrings(str, count){
+		for(var subs = []; str.length >= count; str = str.substr(0, str.length - count)){
+			subs.push(str.substr(-count));
+		}
+		if (str.length > 0){subs.push(str);}
+		return subs.reverse();
+	}
+
+	if (flags.groupSize2 && (whole.length > flags.groupSize)){
+		var groups = splitSubstrings(whole.substr(0, whole.length - flags.groupSize), flags.groupSize2);
+		groups.push(whole.substr(-flags.groupSize));
+		output = output + groups.join(flags.separator);
+	}else if (flags.groupSize){
+		output = output + splitSubstrings(whole, flags.groupSize).join(flags.separator);
+	}else{
+		output = output + whole;
+	}
+
+//TODO: what if flags.places is Infinity?
+	if (flags.places > 0){
+	//Q: Is it safe to convert to a string and split on ".", or might that be locale dependent?  Use Math for now.
+		var fract = value - Math.floor(value);
+		fract = (flags.round ? Math.round : Math.floor)(fract * Math.pow(10, flags.places));
+		output = output + flags.decimal + fract;
+	}
+
+//TODO: exp
+
+	return output;
+};
+
+/**
+* Method to convert a properly formatted int string to a primative numeric value.
+*
+* @param String value
+*	The int string to be convertted
+* @param string locale
+*	The locale used to convert the number string
+* @param Object flags
+*   flags.validate true to check the string for strict adherence to the locale settings for separator, sign, etc.
+*     Default is true
+* @return Number
+* 	Returns a value of type Number, Number.NaN if not a number, or null if locale is not supported.
+**/
+dojo.i18n.number.parse = function(value, locale /*optional*/, flags /*optional*/){
+	flags = (typeof flags == "object") ? flags : {};
+
+	var formatData = dojo.i18n.number._mapToLocalizedFormatData(dojo.i18n.number.FORMAT_TABLE, locale);
+	if (typeof flags.separator == "undefined") {flags.separator = formatData[1];}
+	if (typeof flags.decimal == "undefined") {flags.decimal = formatData[2];}
+	if (typeof flags.groupSize == "undefined") {flags.groupSize = formatData[3];}
+	if (typeof flags.groupSize2 == "undefined") {flags.groupSize2 = formatData[4];}
+	if (typeof flags.validate == "undefined") {flags.validate = true;}
+
+	if (flags.validate && !dojo.i18n.number.isReal(value, locale, flags)) {
+		return Number.NaN;
+	}
+
+	var numbers = value.split(flags.decimal);
+	if (numbers.length > 2){return Number.NaN; }
+	var whole = Number(numbers[0].replace(new RegExp("\\" + flags.separator, "g"), ""));
+	var fract = (number.length == 1) ? 0 : Number(numbers[1]) / Math.pow(10, String(numbers[1]).length); // could also do Number(whole + "." + numbers[1]) if whole != NaN
+
+//TODO: exp
+
+	return whole + fract;
+};
+
+/**
+  Validates whether a string is in an integer format. 
+
+  @param value  A string.
+  @param locale the locale to determine formatting used.  By default, the locale defined by the
+    host environment: dojo.locale
+  @param flags  An object.
+    flags.signed  The leading plus-or-minus sign.  Can be true, false, or [true, false].
+      Default is [true, false], (i.e. sign is optional).
+    flags.separator  The character used as the thousands separator.  Default is specified by the locale.
+      For more than one symbol use an array, e.g. [",", ""], makes ',' optional.
+      The empty array [] makes the default separator optional.   
+  @return  true or false.
+*/
+dojo.i18n.number.isInteger = function(value, locale /*optional*/, flags /*optional*/) {
+	flags = (typeof flags == "object") ? flags : {};
+
+	var formatData = dojo.i18n.number._mapToLocalizedFormatData(dojo.i18n.number.FORMAT_TABLE, locale);
+	if (typeof flags.separator == "undefined") {flags.separator = formatData[1];}
+	else if (dojo.lang.isArray(flags.separator) && flags.separator.length ===0){
+		flags.separator = [formatData[1],""];
+	}
+	if (typeof flags.groupSize == "undefined") {flags.groupSize = formatData[3];}
+	if (typeof flags.groupSize2 == "undefined") {flags.groupSize2 = formatData[4];}
+
+	var re = new RegExp("^" + dojo.regexp.integer(flags) + "$");
+	return re.test(value);
+};
+
+/**
+  Validates whether a string is a real valued number. 
+  Format is the usual exponential notation.
+
+  @param value  A string.
+  @param locale the locale to determine formatting used.  By default, the locale defined by the
+    host environment: dojo.locale
+  @param flags  An object.
+    flags.places  The integer number of decimal places.
+      If not given, the decimal part is optional and the number of places is unlimited.
+    flags.decimal  The character used for the decimal point.  The default is specified by the locale.
+    flags.exponent  Express in exponential notation.  Can be true, false, or [true, false].
+      Default is [true, false], (i.e. the exponential part is optional).
+    flags.eSigned  The leading plus-or-minus sign on the exponent.  Can be true, false, 
+      or [true, false].  Default is [true, false], (i.e. sign is optional).
+    flags in regexp.integer can be applied.
+  @return  true or false.
+*/
+dojo.i18n.number.isReal = function(value, locale /*optional*/, flags /*optional*/) {
+	flags = (typeof flags == "object") ? flags : {};
+
+	var formatData = dojo.i18n.number._mapToLocalizedFormatData(dojo.i18n.number.FORMAT_TABLE, locale);
+	if (typeof flags.separator == "undefined") {flags.separator = formatData[1];}
+	else if (dojo.lang.isArray(flags.separator) && flags.separator.length ===0){
+		flags.separator = [formatData[1],""];
+	}
+	if (typeof flags.decimal == "undefined") {flags.decimal = formatData[2];}
+	if (typeof flags.groupSize == "undefined") {flags.groupSize = formatData[3];}
+	if (typeof flags.groupSize2 == "undefined") {flags.groupSize2 = formatData[4];}
+
+	var re = new RegExp("^" + dojo.regexp.realNumber(flags) + "$");
+	return re.test(value);
+};
+
+//TODO: hide in a closure?
+//TODO: change to use hashes and mixins, rather than arrays
+//Q: fallback algorithm/how to structure table:
+// does it make sense to look by country code most of the time (wildcard match on
+// language, except where it's relevant) and provide default country when only
+// a language is given?
+(function() {
+
+dojo.i18n.number.FORMAT_TABLE = {
+	//0: thousand seperator for monetary, 1: thousand seperator for number, 2: decimal seperator, 3: group size, 4: second group size because of india
+	'ar-ae': ["","", ",", 1],
+	'ar-bh': ["","",",", 1],
+	'ar-dz': ["","",",", 1],
+	'ar-eg': ["","", ",", 1],
+	'ar-jo': ["","",",", 1],
+	'ar-kw': ["","", ",", 1],
+	'ar-lb': ["","", ",", 1],
+	'ar-ma': ["","", ",", 1],
+	'ar-om': ["","", ",", 1],
+	'ar-qa': ["","", ",", 1],
+	'ar-sa': ["","", ",", 1],
+	'ar-sy': ["","", ",", 1],
+	'ar-tn': ["","", ",", 1],
+	'ar-ye': ["","", ",", 1],
+	'cs-cz': [".",".", ",", 3],
+	'da-dk': [".",".", ",", 3],
+	'de-at': [".",".", ",", 3],
+	'de-de': [".",".", ",", 3],
+	'de-lu': [".",".", ",", 3],
+	//IBM JSL defect 51278. right now we have problem with single quote. //IBM: explain?
+	'de-ch': ["'","'", ".", 3], //Q: comma as decimal separator for currency??
+	//'de-ch': [".",".", ",", 3],
+	'el-gr': [".",".", ",", 3],
+	'en-au': [",",",", ".", 3],
+	'en-ca': [",",",", ".", 3],
+	'en-gb': [",",",", ".", 3],
+	'en-hk': [",",",", ".", 3],
+	'en-ie': [",",",", ".", 3],
+	'en-in': [",",",", ".", 3,2],//india-english, 1,23,456.78
+	'en-nz': [",",",", ".", 3],
+	'en-us': [",",",", ".", 3],
+	'en-za': [",",",", ".", 3],
+	
+	'es-ar': [".",".", ",", 3],
+	'es-bo': [".",".", ",", 3],
+	'es-cl': [".",".", ",", 3],
+	'es-co': [".",".", ",", 3],
+	'es-cr': [".",".", ",", 3],
+	'es-do': [".",".", ",", 3],
+	'es-ec': [".",".", ",", 3],
+	'es-es': [".",".", ",", 3],
+	'es-gt': [",",",", ".", 3],
+	'es-hn': [",",",", ".", 3],
+	'es-mx': [",",",", ".", 3],
+	'es-ni': [",",",", ".", 3],
+	'es-pa': [",",",", ".", 3],
+	'es-pe': [",",",", ".", 3],
+	'es-pr': [",",",", ".", 3],
+	'es-py': [".",".",",", 3],
+	'es-sv': [",", ",",".", 3],
+	'es-uy': [".",".",",", 3],
+	'es-ve': [".",".", ",", 3],
+	
+	'fi-fi': [" "," ", ",", 3],
+	
+	'fr-be': [".",".",",", 3],
+	'fr-ca': [" ", " ", ",", 3],
+	
+	'fr-ch': [" ", " ",".", 3],
+	
+	'fr-fr': [" "," ", ",", 3],
+	'fr-lu': [".",".", ",", 3],
+	
+	'he-il': [",",",", ".", 3],
+	
+	'hu-hu': [" ", " ",",", 3],
+	
+	'it-ch': [" "," ", ".", 3],
+	
+	'it-it': [".",".", ",", 3],
+	'ja-jp': [",",",", ".", 3],
+	'ko-kr': [",", ",",".", 3],
+	
+	'no-no': [".",".", ",", 3],
+	
+	'nl-be': [" "," ", ",", 3],
+	'nl-nl': [".",".", ",", 3],
+	'pl-pl': [".", ".",",", 3],
+	
+	'pt-br': [".",".", ",", 3],
+	'pt-pt': [".",".", "$", 3],
+	'ru-ru': [" ", " ",",", 3],
+	
+	'sv-se': ["."," ", ",", 3],
+	
+	'tr-tr': [".",".", ",", 3],
+	
+	'zh-cn': [",",",", ".", 3],
+	'zh-hk': [",",",",".", 3],
+	'zh-tw': [",", ",",".", 3],
+	'*': [",",",", ".", 3]
+};
+})();
+
+dojo.i18n.number._mapToLocalizedFormatData = function(table, locale){
+	locale = dojo.hostenv.normalizeLocale(locale);
+//TODO: most- to least-specific search? search by country code?
+//TODO: implement aliases to simplify and shorten tables
+	var data = table[locale];
+	if (typeof data == 'undefined'){data = table['*'];}
+	return data;
+}

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/i18n/number.js
------------------------------------------------------------------------------
    svn:eol-style = native