We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to Set a Default LanguageId for PowerPoint Documents in C#?

I understand that each Portion can be set to a different LanguageId (e.g., "en-US", "ja-JP") via PortionFormat. However, is there a way to specify a default LanguageId for the entire document?

Also, what’s the purpose of AlternativeLanguageId? In the PowerPoint VBA object model, I can see the LangaugeID property under TextRange, but there is no AlternativeLanguageId. How is this property used?

Thanks!

@bingxie,
Thank you for contacting support. I am working on the question you posted and will get back to you soon.

@bingxie,
Unfortunately, I have not found a way to set a default language for an entire PowerPoint document. I’ve added a ticket with ID SLIDESNET-43700 to our issue-tracking system. Our development team will consider implementing such a feature. You will be notified when a new release of Aspose.Slides with the update is published.

I have also not found detailed information about that property. I’ve added a ticket with ID SLIDESNET-43701 to our issue-tracking system. We will provide the information ASAP.

@bingxie,
Our developers have investigated your requirements to set the default language for PowerPoint presentations. Please try using the ForEach.Portion method like this:

using (Presentation pres = new Presentation("pres.pptx"))
{
    Aspose.Slides.LowCode.ForEach.Portion(pres, (portion, para, slide, index) =>
    {
        portion.PortionFormat.LanguageId = "ja-JP";
    });

    pres.Save("pres-out.pptx", SaveFormat.Pptx);
}

Thank you @andrey.potapov.

While the code snippet updates the LanguageId of all existing portions in the presentation, will new portions inherit this setting? Or do I have to always perform this step before saving any presentation in Aspose.Slides?

P.S. Do you have an update about AlternativeLanguageId in the original post?

Thanks!

@bingxie,

I’ve forwarded your questions to our developers. We will let you know soon.

I’ve requested information from our development team.

@bingxie,
The SLIDESNET-43701 issue has been scheduled for investigation this week.

@andrey.potapov Thank you very much for the update!

@bingxie,
Thank you for using Aspose.Slides.