可能是因为函数 addCulterInfo 没有在 globalize.js 文件中定义。前段时间我在我的一个项目中使用了类似的东西。我希望它有帮助:
Globalize.addCultureInfo = function( cultureName, baseCultureName, info ) {
var base = {},
isNew = false;
if ( typeof cultureName !== "string" ) {
// cultureName argument is optional string. If not specified, assume info is first
// and only argument. Specified info deep-extends current culture.
info = cultureName;
cultureName = this.culture().name;
base = this.cultures[ cultureName ];
} else if ( typeof baseCultureName !== "string" ) {
// baseCultureName argument is optional string. If not specified, assume info is second
// argument. Specified info deep-extends specified culture.
// If specified culture does not exist, create by deep-extending default
info = baseCultureName;
isNew = ( this.cultures[ cultureName ] == null );
base = this.cultures[ cultureName ] || this.cultures[ "default" ];
} else {
// cultureName and baseCultureName specified. Assume a new culture is being created
// by deep-extending an specified base culture
isNew = true;
base = this.cultures[ baseCultureName ];
}
this.cultures[ cultureName ] = extend(true, {},
base,
info
);
// Make the standard calendar the current culture if it's a new culture
if ( isNew ) {
this.cultures[ cultureName ].calendar = this.cultures[ cultureName ].calendars.standard;
}
};