[]
• new CultureManager()
Represent a culture manager.
▸ 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);
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. |
void
▸ Static
culture(cultureName?
): string
Get or set the Sheets culture.
static
Name | Type | Description |
---|---|---|
cultureName? |
string |
The culture name to get. |
string
. The current culture name of Sheets.
▸ 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.
Name | Type | Description |
---|---|---|
cultureName |
string | number |
Culture name or culture ID |
The specified cultureInfo object.
▸ Static
getLanguage(cultureName
): object
Gets the specified custom language.
static
Name | Type | Description |
---|---|---|
cultureName |
string |
The culture name to get. |
object
The specified object. Null if not define the language.
▸ Static
getResources(cultureName?
): object
Gets the specified or current working resources.
static
Name | Type |
---|---|
cultureName? |
string |
object
The specified or current working resources. Null if not define the language.