DefaultTextLanguage

ILoadOptions.DefaultTextLanguage property

Returns or sets the default language for presentation text. Read/write String.

public string DefaultTextLanguage { get; set; }

Examples

Example:

[C#]
// Use load options to define the default text culture
LoadOptions loadOptions = new LoadOptions();
loadOptions.DefaultTextLanguage = "en-US";
using (Presentation pres = new Presentation(loadOptions))
 {
    // Add new rectangle shape with text
    IAutoShape shp = pres.Slides[0].Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 150, 50);
    shp.TextFrame.Text = "New Text";

    // Check the first portion language
    Console.WriteLine(shp.TextFrame.Paragraphs[0].Portions[0].PortionFormat.LanguageId);
}

See Also