Free Support Forum - aspose.com

Culture Name: de-US is not a supported culture exception

Hi,

I am using Aspose slides v15.6.0
The following code throws an exception:

public static void main(String[] args) {
Locale.getDefault();
Locale locale = new Locale(“de”, “US”);
Locale.setDefault(locale);
Presentation p = new Presentation(“C:\Users\jkaur\Documents\Test.pptx”);
p.getCustomData();
System.out.println(locale.toString()+" worked.");
}

The real scenario is a machine with such Local settings.
Will I have to change the Syetem Local settings of a Client to Aspose supported Locales?

Exception in thread “main” java.lang.ExceptionInInitializerError
at com.aspose.slides.vx.(Unknown Source)
at com.aspose.slides.aqe.goto(Unknown Source)
at com.aspose.slides.aqe.(Unknown Source)
at com.aspose.slides.ana.byte(Unknown Source)
at com.aspose.slides.ana.(Unknown Source)
at com.aspose.slides.ana.case(Unknown Source)
at com.aspose.slides.ana.(Unknown Source)
at com.aspose.slides.ParagraphFormat.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.quark.qpp.filter.service.aspose.manager.impl.Test.main(Test.java:13)
Caused by: class com.aspose.slides.ms.pbdb106a0.i: Culture Name: de-US is not a supported culture
com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.int(Unknown Source)
com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.(Unknown Source)
com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.do(Unknown Source)
com.aspose.slides.ms.pbdb106a0.p9f36407e.aa.char(Unknown Source)
com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.byte(Unknown Source)
com.aspose.slides.ms.pbdb106a0.ec.case(Unknown Source)
com.aspose.slides.ms.pbdb106a0.ec.char(Unknown Source)
com.aspose.slides.vx.do(Unknown Source)
com.aspose.slides.vx.do(Unknown Source)
com.aspose.slides.vx.if(Unknown Source)
com.aspose.slides.vx.if(Unknown Source)
com.aspose.slides.FontData.(Unknown Source)
com.aspose.slides.vx.(Unknown Source)
com.aspose.slides.aqe.goto(Unknown Source)
com.aspose.slides.aqe.(Unknown Source)
com.aspose.slides.ana.byte(Unknown Source)
com.aspose.slides.ana.(Unknown Source)
com.aspose.slides.ana.case(Unknown Source)
com.aspose.slides.ana.(Unknown Source)
com.aspose.slides.ParagraphFormat.(Unknown Source)
com.aspose.slides.Presentation.(Unknown Source)
com.quark.qpp.filter.service.aspose.manager.impl.Test.main(Test.java:13)
at com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.int(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.do(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.p9f36407e.aa.char(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.pa5e0ff62.i.byte(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.ec.case(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.ec.char(Unknown Source)
at com.aspose.slides.vx.do(Unknown Source)
at com.aspose.slides.vx.do(Unknown Source)
at com.aspose.slides.vx.if(Unknown Source)
at com.aspose.slides.vx.if(Unknown Source)
at com.aspose.slides.FontData.(Unknown Source)
… 10 more



Can you figure out the reason.

Thanks,
Jaspreet

Hi Jaspreet,


Thank you for contacting Aspose support.

Your provided code snippet and mentioned API version suggest that you are having the said problem with Aspose.Slides for Java API therefore we are going to move this thread to the appropriate forum. Hopefully soon our colleagues from the Aspose.Slides team will get back to you with updates in this regard.

Hi Jaspreet,

I have observed the sample code shared by you and have observed that you are using non standard locale in your application. Aspose.Slides throws valid exception on using non standard locales. Please use the standard locale in your application like en. I hope this will be helpful. Please share if I may help you further in this regard.

Many Thanks,