[]
        
(Showing Draft Content)

GC.Spread.Common.CultureManager

Class: CultureManager

Spread.Common.CultureManager

Table of contents

Constructors

Methods

Constructors

constructor

new CultureManager()

Represent a culture manager.

Methods

addCultureInfo

Static addCultureInfo(cultureName, culture, language?): void

Adds the cultureInfo or custom language into the culture manager.

static

example

var myCulture = new GC.Spread.Common.CultureInfo();
myCulture.NumberFormat.currencySymbol = "\u20ac"
myCulture.NumberFormat.numberDecimalSeparator = ",";
myCulture.NumberFormat.numberGroupSeparator = ".";
myCulture.NumberFormat.arrayGroupSeparator = ";";
myCulture.NumberFormat.arrayListSeparator = "\\";
myCulture.NumberFormat.listSeparator = ";";
//add one culture
GC.Spread.Common.CultureManager.addCultureInfo("de-DE", myCulture);

Parameters

Name Type Description
cultureName string The culture name to set.
culture CultureInfo -
language? object The custom language set to the culture. If already set, it will overwrite the old language.

Returns

void


culture

Static culture(cultureName?): string

Get or set the Sheets culture.

static

Parameters

Name Type Description
cultureName? string The culture name to get.

Returns

string

. The current culture name of Sheets.


getCultureInfo

Static getCultureInfo(cultureName): CultureInfo

Gets the specified cultureInfo. If no culture name, get current cultureInfo.

static

example

GC.Spread.Common.CultureManager.getCultureInfo(); // return the current culture info.
GC.Spread.Common.CultureManager.getCultureInfo(1033); // return the culture info of culture id 1033, it's en culture.
GC.Spread.Common.CultureManager.getCultureInfo('en-us'); // return the culture info of en.

Parameters

Name Type Description
cultureName string | number Culture name or culture ID

Returns

CultureInfo

The specified cultureInfo object.


getLanguage

Static getLanguage(cultureName): object

Gets the specified custom language.

static

Parameters

Name Type Description
cultureName string The culture name to get.

Returns

object

The specified object. Null if not define the language.


getResources

Static getResources(cultureName?): object

Gets the specified or current working resources.

static

Parameters

Name Type
cultureName? string

Returns

object

The specified or current working resources. Null if not define the language.