Back to Devexpress

SpreadsheetBehaviorOptions.LocalizeBooleanValues Property

officefileapi-devexpress-dot-xtraspreadsheet-dot-spreadsheetbehavioroptions-d7d34702.md

latest4.4 KB
Original Source

SpreadsheetBehaviorOptions.LocalizeBooleanValues Property

Specifies whether to localize TRUE and FALSE values in the Spreadsheet control.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
[DefaultValue(true)]
public bool LocalizeBooleanValues { get; set; }
vb
<DefaultValue(True)>
Public Property LocalizeBooleanValues As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true to localize Boolean values; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to LocalizeBooleanValues
SpreadsheetControlOptions

.Behavior .LocalizeBooleanValues

|

Remarks

The DevExpress WinForms Spreadsheet control uses the standard localization mechanism from the .NET framework—Satellite Resource Assemblies (libraries that contain translated resources). Satellite assemblies for the following languages are included in the DevExpress Unified Component Installer and available in the DevExpress NuGet Gallery:

  • German
  • Spanish
  • Japanese

Use the DevExpress Localization Service to obtain satellite assemblies for other cultures. Add translations for the XtraSpreadsheetFunctionNameStringId.True and XtraSpreadsheetFunctionNameStringId.False strings to localize Boolean values, download the modified satellite assemblies, and include them in your project. If you are new to our Localization Service, refer to the following help topic for assistance: Localizing WinForms Controls with Satellite Resource Assemblies.

After you add localization resources to your application, use the SpreadsheetControl.Options.Culture property to set the control’s culture. If satellite assemblies for this culture are not found, the invariant (English) culture is used.

csharp
using DevExpress.Spreadsheet;
using DevExpress.XtraSpreadsheet;
//...

// Specify the Spreadsheet control's culture.
spreadsheetControl1.Options.Culture = new System.Globalization.CultureInfo("de-DE");
// Localize function names.
spreadsheetControl1.Options.Behavior.FunctionNameCulture = FunctionNameCulture.Local;

IWorkbook workbook = spreadsheetControl1.Document;
Worksheet worksheet = workbook.Worksheets.ActiveWorksheet;
// Create a simple formula.
worksheet["B2"].Formula = "ODER(WAHR;FALSCH)";
worksheet.Calculate();
vb
Imports DevExpress.Spreadsheet
Imports DevExpress.XtraSpreadsheet
'...

' Specify the Spreadsheet control's culture.
spreadsheetControl1.Options.Culture = New System.Globalization.CultureInfo("de-DE")
' Localize function names.
spreadsheetControl1.Options.Behavior.FunctionNameCulture = FunctionNameCulture.Local

Dim workbook As IWorkbook = spreadsheetControl1.Document
Dim worksheet As Worksheet = workbook.Worksheets.ActiveWorksheet
' Create a simple formula.
worksheet("B2").Formula = "ODER(WAHR;FALSCH)"
worksheet.Calculate()

See Also

FunctionNameCulture

SpreadsheetBehaviorOptions Class

SpreadsheetBehaviorOptions Members

DevExpress.XtraSpreadsheet Namespace