SupportedLocales

Inheritance: java.lang.Object

public class SupportedLocales

The SupportedLocales class provides constants representing the supported locales for GroupDocs.Comparison.

It allows you to specify the locale for language-specific operations, such as formatting and displaying messages.

For more information about locales, refer to the Java Locale documentation: Java Locale

Example usage:


 final boolean localeSupported = SupportedLocales.isLocaleSupported(Locale.CANADA);
 

Methods

Method Description
isLocaleSupported(String localeString) Determines whether locale supported or not.
isLocaleSupported(Locale locale) Determines whether locale supported or not.
isLocaleSupported(CultureInfo culture) Determines whether locale, represented as CultureInfo, supported or not.

isLocaleSupported(String localeString)

public static boolean isLocaleSupported(String localeString)

Determines whether locale supported or not.

Format of localeString is xx-YY or xx_YY , examples: en-US , en_US

Parameters:

Parameter Type Description
localeString java.lang.String The locale to be checked, may be null

Returns: boolean - true if supported, otherwise false

isLocaleSupported(Locale locale)

public static boolean isLocaleSupported(Locale locale)

Determines whether locale supported or not.

Parameters:

Parameter Type Description
locale java.util.Locale The locale to be checked, not null

Returns: boolean - true if supported, otherwise false

isLocaleSupported(CultureInfo culture)

public static boolean isLocaleSupported(CultureInfo culture)

Determines whether locale, represented as CultureInfo, supported or not.

Parameters:

Parameter Type Description
culture com.groupdocs.foundation.utils.CultureInfo The culture to be checked, not null

Returns: boolean - true if supported, otherwise false