0

I try to create jasper report (Internationalized reports) in different languages. REPORT_LOCALE parameter used to specify the runtime locale when filling the report. but some languages not available in the jasper report designer. how to create properties file for new languages based on REPORT_LOCALE. is it possible.

Thanks

Lakshan
  • 1,404
  • 3
  • 10
  • 23
  • thanks for your response @AlexK . this works for me. 'Locale locale = new Locale("sin", "LK");' – Lakshan May 20 '18 at 13:12

1 Answers1

1

REPORT_LOCALE Configuration uses java.util.locale

Since the locale you mentioned is not directly supported http://www.oracle.com/technetwork/java/javase/javase7locales-334809.html#installers

Try using the Icu Library, for getting the locale.

    <dependency>
        <groupId>com.ibm.icu</groupId>
        <artifactId>icu4j</artifactId>
        <version>4.8</version>
    </dependency>

Sample Code below.

ULocale locale = ULocale.forLanguageTag("si-LK");
Locale java = locale.toLocale();
resatz
  • 536
  • 3
  • 8