Gets or sets the LCID of the field.
Syntax
public int LocaleId { get; set; }
Public Property LocaleId As Integer
Get
Set
public:
property int LocaleId {
int get ();
void set (int value);
}
member LocaleId : int with get, set
Property Value
Type:
Int32
Examples
Shows how to insert a field and work with its locale.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Field field = builder.InsertField(@"DATE");
Console.WriteLine($"Today's date, as displayed in the \"{CultureInfo.CurrentCulture.EnglishName}\" culture: {field.Result}");
Assert.AreEqual(1033, field.LocaleId);
doc.FieldOptions.FieldUpdateCultureSource = FieldUpdateCultureSource.FieldCode;
CultureInfo de = new CultureInfo("de-DE");
field.LocaleId = de.LCID;
field.Update();
Console.WriteLine($"Today's date, as displayed according to the \"{CultureInfo.GetCultureInfo(field.LocaleId).EnglishName}\" culture: {field.Result}");
See Also