跳到主要内容

GetLocale

Returns the current locale ID.

Syntax

expression.GetLocale();

expression - A variable that represents a Api class.

Parameters

This method doesn't have any parameters.

Returns

number

Example

This example shows how to get the current locale ID.

var oWorksheet = Api.GetActiveSheet();
Api.SetLocale("en-CA");
var nLocale = Api.GetLocale();
oWorksheet.GetRange("A1").SetValue("Locale: " + nLocale);