Uses of Class
java.util.Locale
-
Packages that use Locale Package Description com.sun.java.accessibility.util Provides a collection of interfaces and classes that compose the Java Accessibility Utilities.java.applet Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.java.awt.im Provides classes and interfaces for the input method framework.java.awt.im.spi Provides interfaces that enable the development of input methods that can be used with any Java runtime environment.java.beans.beancontext Provides classes and interfaces relating to bean context.java.io Provides for system input and output through data streams, serialization and the file system.java.lang Provides classes that are fundamental to the design of the Java programming language.java.nio.charset Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.java.text.spi Service provider classes for the classes in the java.text package.java.time The main API for dates, times, instants, and durations.java.time.chrono Generic API for calendar systems other than the default ISO.java.time.format Provides classes to print and parse dates and times.java.time.temporal Access to date and time using fields and units, and date time adjusters.java.util Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.java.util.spi Service provider classes for the classes in the java.util package.javafx.beans.binding Provides classes that create and operate on aBinding
that calculates a value that depends on one or more sources.javafx.scene.media Provides the set of classes for integrating audio and video into Java FX Applications.javafx.util.converter This package is for standard string converters for JavaFX.javax.accessibility Defines a contract between user-interface components and an assistive technology that provides access to those components.javax.annotation.processing Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.javax.imageio The main package of the Java Image I/O API.javax.imageio.metadata A package of the Java Image I/O API dealing with reading and writing metadata.javax.imageio.plugins.bmp Package containing the public classes used by the built-in BMP plug-in.javax.imageio.plugins.jpeg Classes supporting the built-in JPEG plug-in.javax.imageio.spi A package of the Java Image I/O API containing the plug-in interfaces for readers, writers, transcoders, and streams, and a runtime registry.javax.print.attribute Provides classes and interfaces that describe the types of Java™ Print Service attributes and how they can be collected into attribute sets.javax.print.attribute.standard Package javax.print.attribute.standard contains classes for specific printing attributes.javax.security.auth.callback This package provides the classes necessary for services to interact with applications in order to retrieve information (authentication data including usernames or passwords, for example) or to display information (error and warning messages, for example).javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.javax.swing.table Provides classes and interfaces for dealing withjavax.swing.JTable
.javax.tools Provides interfaces for tools which can be invoked from a program, for example, compilers.javax.xml.datatype Defines XML/Java Type Mappings.javax.xml.soap Provides the API for creating and building SOAP messages.jdk.javadoc.doclet The Doclet API provides an environment which, in conjunction with the Language Model API and Compiler Tree API, allows clients to inspect the source-level structures of programs and libraries, including API comments embedded in the source.jdk.jshell Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL), which interactively evaluate "snippets" of Java programming language code.jdk.jshell.tool Provides a mechanism to launch an instance of a Java™ shell tool.org.xml.sax Provides the core SAX APIs.org.xml.sax.helpers Provides helper classes, including support for bootstrapping SAX-based applications. -
-
Uses of Locale in com.sun.java.accessibility.util
Methods in com.sun.java.accessibility.util that return Locale Modifier and Type Method Description Locale
Translator. getLocale()
Gets theLocale
of the component. -
Uses of Locale in java.applet
Methods in java.applet that return Locale Modifier and Type Method Description Locale
Applet. getLocale()
Deprecated.Gets the locale of the applet. -
Uses of Locale in java.awt
Methods in java.awt that return Locale Modifier and Type Method Description Locale
Component.AccessibleAWTComponent. getLocale()
Returns the locale of this object.Locale
Component. getLocale()
Gets the locale of this component.Locale
List.AccessibleAWTList.AccessibleAWTListChild. getLocale()
Gets the locale of the component.Locale
MenuComponent.AccessibleAWTMenuComponent. getLocale()
Returns the locale of this object.Locale
Window. getLocale()
Gets theLocale
object that is associated with this window, if the locale has been set.Methods in java.awt with parameters of type Locale Modifier and Type Method Description abstract String[]
GraphicsEnvironment. getAvailableFontFamilyNames(Locale l)
Returns an array containing the names of all font families in thisGraphicsEnvironment
localized for the specified locale.String
Font. getFamily(Locale l)
Returns the family name of thisFont
, localized for the specified locale.String
Font. getFontName(Locale l)
Returns the font face name of theFont
, localized for the specified locale.static ComponentOrientation
ComponentOrientation. getOrientation(Locale locale)
Returns the orientation that is appropriate for the given locale.void
Component. setLocale(Locale l)
Sets the locale of this component. -
Uses of Locale in java.awt.im
Methods in java.awt.im that return Locale Modifier and Type Method Description Locale
InputContext. getLocale()
Returns the current locale of the current input method or keyboard layout.Methods in java.awt.im with parameters of type Locale Modifier and Type Method Description boolean
InputContext. selectInputMethod(Locale locale)
Attempts to select an input method or keyboard layout that supports the given locale, and returns a value indicating whether such an input method or keyboard layout has been successfully selected. -
Uses of Locale in java.awt.im.spi
Methods in java.awt.im.spi that return Locale Modifier and Type Method Description Locale[]
InputMethodDescriptor. getAvailableLocales()
Returns the locales supported by the corresponding input method.Locale
InputMethod. getLocale()
Returns the current input locale.Methods in java.awt.im.spi with parameters of type Locale Modifier and Type Method Description String
InputMethodDescriptor. getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage)
Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed.Image
InputMethodDescriptor. getInputMethodIcon(Locale inputLocale)
Returns an icon for the corresponding input method.boolean
InputMethod. setLocale(Locale locale)
Attempts to set the input locale. -
Uses of Locale in java.beans.beancontext
Fields in java.beans.beancontext declared as Locale Modifier and Type Field Description protected Locale
BeanContextSupport. locale
The current locale of this BeanContext.Methods in java.beans.beancontext that return Locale Modifier and Type Method Description Locale
BeanContextSupport. getLocale()
Gets the locale for thisBeanContext
.Methods in java.beans.beancontext with parameters of type Locale Modifier and Type Method Description void
BeanContextSupport. setLocale(Locale newLocale)
Sets the locale of this BeanContext.Constructors in java.beans.beancontext with parameters of type Locale Constructor Description BeanContextServicesSupport(BeanContextServices peer, Locale lcle)
Create an instance using the specified localeBeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextServicesSupport instanceBeanContextSupport(BeanContext peer, Locale lcle)
Create an instance using the specified localeBeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
Create an instance using the specified Locale and design mode.BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextSupport instance -
Uses of Locale in java.io
Methods in java.io with parameters of type Locale Modifier and Type Method Description PrintStream
PrintStream. format(Locale l, String format, Object... args)
Writes a formatted string to this output stream using the specified format string and arguments.PrintWriter
PrintWriter. format(Locale l, String format, Object... args)
Writes a formatted string to this writer using the specified format string and arguments.PrintStream
PrintStream. printf(Locale l, String format, Object... args)
A convenience method to write a formatted string to this output stream using the specified format string and arguments.PrintWriter
PrintWriter. printf(Locale l, String format, Object... args)
A convenience method to write a formatted string to this writer using the specified format string and arguments. -
Uses of Locale in java.lang
Methods in java.lang with parameters of type Locale Modifier and Type Method Description static String
String. format(Locale l, String format, Object... args)
Returns a formatted string using the specified locale, format string, and arguments.String
String. toLowerCase(Locale locale)
Converts all of the characters in thisString
to lower case using the rules of the givenLocale
.String
String. toUpperCase(Locale locale)
Converts all of the characters in thisString
to upper case using the rules of the givenLocale
. -
Uses of Locale in java.nio.charset
Methods in java.nio.charset with parameters of type Locale Modifier and Type Method Description String
Charset. displayName(Locale locale)
Returns this charset's human-readable name for the given locale. -
Uses of Locale in java.text
Methods in java.text that return Locale Modifier and Type Method Description static Locale[]
BreakIterator. getAvailableLocales()
Returns an array of all locales for which theget*Instance
methods of this class can return localized instances.static Locale[]
Collator. getAvailableLocales()
Returns an array of all locales for which thegetInstance
methods of this class can return localized instances.static Locale[]
DateFormat. getAvailableLocales()
Returns an array of all locales for which theget*Instance
methods of this class can return localized instances.static Locale[]
DateFormatSymbols. getAvailableLocales()
Returns an array of all locales for which thegetInstance
methods of this class can return localized instances.static Locale[]
DecimalFormatSymbols. getAvailableLocales()
Returns an array of all locales for which thegetInstance
methods of this class can return localized instances.static Locale[]
NumberFormat. getAvailableLocales()
Returns an array of all locales for which theget*Instance
methods of this class can return localized instances.Locale
MessageFormat. getLocale()
Gets the locale that's used when creating or comparing subformats.Methods in java.text with parameters of type Locale Modifier and Type Method Description static BreakIterator
BreakIterator. getCharacterInstance(Locale locale)
Returns a newBreakIterator
instance for character breaks for the given locale.static NumberFormat
NumberFormat. getCurrencyInstance(Locale inLocale)
Returns a currency format for the specified locale.static DateFormat
DateFormat. getDateInstance(int style, Locale aLocale)
Gets the date formatter with the given formatting style for the given locale.static DateFormat
DateFormat. getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale)
Gets the date/time formatter with the given formatting styles for the given locale.static Collator
Collator. getInstance(Locale desiredLocale)
Gets the Collator for the desired locale.static DateFormatSymbols
DateFormatSymbols. getInstance(Locale locale)
Gets theDateFormatSymbols
instance for the specified locale.static DecimalFormatSymbols
DecimalFormatSymbols. getInstance(Locale locale)
Gets theDecimalFormatSymbols
instance for the specified locale.static NumberFormat
NumberFormat. getInstance(Locale inLocale)
Returns a general-purpose number format for the specified locale.static NumberFormat
NumberFormat. getIntegerInstance(Locale inLocale)
Returns an integer number format for the specified locale.static BreakIterator
BreakIterator. getLineInstance(Locale locale)
Returns a newBreakIterator
instance for line breaks for the given locale.static NumberFormat
NumberFormat. getNumberInstance(Locale inLocale)
Returns a general-purpose number format for the specified locale.static NumberFormat
NumberFormat. getPercentInstance(Locale inLocale)
Returns a percentage format for the specified locale.static BreakIterator
BreakIterator. getSentenceInstance(Locale locale)
Returns a newBreakIterator
instance for sentence breaks for the given locale.static DateFormat
DateFormat. getTimeInstance(int style, Locale aLocale)
Gets the time formatter with the given formatting style for the given locale.static BreakIterator
BreakIterator. getWordInstance(Locale locale)
Returns a newBreakIterator
instance for word breaks for the given locale.void
MessageFormat. setLocale(Locale locale)
Sets the locale to be used when creating or comparing subformats.Constructors in java.text with parameters of type Locale Constructor Description DateFormatSymbols(Locale locale)
Construct a DateFormatSymbols object by loading format data from resources for the given locale.DecimalFormatSymbols(Locale locale)
Create a DecimalFormatSymbols object for the given locale.MessageFormat(String pattern, Locale locale)
Constructs a MessageFormat for the specified locale and pattern.SimpleDateFormat(String pattern, Locale locale)
Constructs aSimpleDateFormat
using the given pattern and the default date format symbols for the given locale. -
Uses of Locale in java.text.spi
Methods in java.text.spi with parameters of type Locale Modifier and Type Method Description abstract BreakIterator
BreakIteratorProvider. getCharacterInstance(Locale locale)
Returns a newBreakIterator
instance for character breaks for the given locale.abstract NumberFormat
NumberFormatProvider. getCurrencyInstance(Locale locale)
Returns a newNumberFormat
instance which formats monetary values for the specified locale.abstract DateFormat
DateFormatProvider. getDateInstance(int style, Locale locale)
Returns a newDateFormat
instance which formats date with the given formatting style for the specified locale.abstract DateFormat
DateFormatProvider. getDateTimeInstance(int dateStyle, int timeStyle, Locale locale)
Returns a newDateFormat
instance which formats date and time with the given formatting style for the specified locale.abstract Collator
CollatorProvider. getInstance(Locale locale)
Returns a newCollator
instance for the specified locale.abstract DateFormatSymbols
DateFormatSymbolsProvider. getInstance(Locale locale)
Returns a newDateFormatSymbols
instance for the specified locale.abstract DecimalFormatSymbols
DecimalFormatSymbolsProvider. getInstance(Locale locale)
Returns a newDecimalFormatSymbols
instance for the specified locale.abstract NumberFormat
NumberFormatProvider. getIntegerInstance(Locale locale)
Returns a newNumberFormat
instance which formats integer values for the specified locale.abstract BreakIterator
BreakIteratorProvider. getLineInstance(Locale locale)
Returns a newBreakIterator
instance for line breaks for the given locale.abstract NumberFormat
NumberFormatProvider. getNumberInstance(Locale locale)
Returns a new general-purposeNumberFormat
instance for the specified locale.abstract NumberFormat
NumberFormatProvider. getPercentInstance(Locale locale)
Returns a newNumberFormat
instance which formats percentage values for the specified locale.abstract BreakIterator
BreakIteratorProvider. getSentenceInstance(Locale locale)
Returns a newBreakIterator
instance for sentence breaks for the given locale.abstract DateFormat
DateFormatProvider. getTimeInstance(int style, Locale locale)
Returns a newDateFormat
instance which formats time with the given formatting style for the specified locale.abstract BreakIterator
BreakIteratorProvider. getWordInstance(Locale locale)
Returns a newBreakIterator
instance for word breaks for the given locale. -
Uses of Locale in java.time
Methods in java.time with parameters of type Locale Modifier and Type Method Description String
DayOfWeek. getDisplayName(TextStyle style, Locale locale)
Gets the textual representation, such as 'Mon' or 'Friday'.String
Month. getDisplayName(TextStyle style, Locale locale)
Gets the textual representation, such as 'Jan' or 'December'.String
ZoneId. getDisplayName(TextStyle style, Locale locale)
Gets the textual representation of the zone, such as 'British Time' or '+02:00'. -
Uses of Locale in java.time.chrono
Methods in java.time.chrono with parameters of type Locale Modifier and Type Method Description default String
Chronology. getDisplayName(TextStyle style, Locale locale)
Gets the textual representation of this chronology.default String
Era. getDisplayName(TextStyle style, Locale locale)
Gets the textual representation of this era.String
JapaneseEra. getDisplayName(TextStyle style, Locale locale)
Gets the textual representation of this era.static Chronology
Chronology. ofLocale(Locale locale)
Obtains an instance ofChronology
from a locale. -
Uses of Locale in java.time.format
Methods in java.time.format that return Locale Modifier and Type Method Description Locale
DateTimeFormatter. getLocale()
Gets the locale to be used during formatting.Methods in java.time.format that return types with arguments of type Locale Modifier and Type Method Description static Set<Locale>
DecimalStyle. getAvailableLocales()
Lists all the locales that are supported.Methods in java.time.format with parameters of type Locale Modifier and Type Method Description static String
DateTimeFormatterBuilder. getLocalizedDateTimePattern(FormatStyle dateStyle, FormatStyle timeStyle, Chronology chrono, Locale locale)
Gets the formatting pattern for date and time styles for a locale and chronology.static DecimalStyle
DecimalStyle. of(Locale locale)
Obtains the DecimalStyle for the specified locale.static DateTimeFormatter
DateTimeFormatter. ofPattern(String pattern, Locale locale)
Creates a formatter using the specified pattern and locale.DateTimeFormatter
DateTimeFormatterBuilder. toFormatter(Locale locale)
Completes this builder by creating theDateTimeFormatter
using the specified locale.DateTimeFormatter
DateTimeFormatter. withLocale(Locale locale)
Returns a copy of this formatter with a new locale. -
Uses of Locale in java.time.temporal
Methods in java.time.temporal with parameters of type Locale Modifier and Type Method Description String
ChronoField. getDisplayName(Locale locale)
default String
TemporalField. getDisplayName(Locale locale)
Gets the display name for the field in the requested locale.static WeekFields
WeekFields. of(Locale locale)
Obtains an instance ofWeekFields
appropriate for a locale. -
Uses of Locale in java.util
Fields in java.util declared as Locale Modifier and Type Field Description static Locale
Locale. CANADA
Useful constant for country.static Locale
Locale. CANADA_FRENCH
Useful constant for country.static Locale
Locale. CHINA
Useful constant for country.static Locale
Locale. CHINESE
Useful constant for language.static Locale
Locale. ENGLISH
Useful constant for language.static Locale
Locale. FRANCE
Useful constant for country.static Locale
Locale. FRENCH
Useful constant for language.static Locale
Locale. GERMAN
Useful constant for language.static Locale
Locale. GERMANY
Useful constant for country.static Locale
Locale. ITALIAN
Useful constant for language.static Locale
Locale. ITALY
Useful constant for country.static Locale
Locale. JAPAN
Useful constant for country.static Locale
Locale. JAPANESE
Useful constant for language.static Locale
Locale. KOREA
Useful constant for country.static Locale
Locale. KOREAN
Useful constant for language.static Locale
Locale. PRC
Useful constant for country.static Locale
Locale. ROOT
Useful constant for the root locale.static Locale
Locale. SIMPLIFIED_CHINESE
Useful constant for language.static Locale
Locale. TAIWAN
Useful constant for country.static Locale
Locale. TRADITIONAL_CHINESE
Useful constant for language.static Locale
Locale. UK
Useful constant for country.static Locale
Locale. US
Useful constant for country.Methods in java.util that return Locale Modifier and Type Method Description Locale
Locale.Builder. build()
Returns an instance ofLocale
created from the fields set on this builder.static Locale
Locale. forLanguageTag(String languageTag)
Returns a locale for the specified IETF BCP 47 language tag string.static Locale[]
Calendar. getAvailableLocales()
Returns an array of all locales for which thegetInstance
methods of this class can return localized instances.static Locale[]
Locale. getAvailableLocales()
Returns an array of all installed locales.static Locale
Locale. getDefault()
Gets the current value of the default locale for this instance of the Java Virtual Machine.static Locale
Locale. getDefault(Locale.Category category)
Gets the current value of the default locale for the specified Category for this instance of the Java Virtual Machine.Locale
ResourceBundle.Control. getFallbackLocale(String baseName, Locale locale)
Returns aLocale
to be used as a fallback locale for further resource bundle searches by theResourceBundle.getBundle
factory method.Locale
ResourceBundle. getLocale()
Returns the locale of this resource bundle.Locale
Formatter. locale()
Returns the locale set by the construction of this formatter.Locale
Scanner. locale()
Returns this scanner's locale.static Locale
Locale. lookup(List<Locale.LanguageRange> priorityList, Collection<Locale> locales)
Returns aLocale
instance for the best-matching language tag using the lookup mechanism defined in RFC 4647.Locale
Locale. stripExtensions()
Returns a copy of thisLocale
with no extensions.Methods in java.util that return types with arguments of type Locale Modifier and Type Method Description static List<Locale>
Locale. filter(List<Locale.LanguageRange> priorityList, Collection<Locale> locales)
Returns a list of matchingLocale
instances using the filtering mechanism defined in RFC 4647.static List<Locale>
Locale. filter(List<Locale.LanguageRange> priorityList, Collection<Locale> locales, Locale.FilteringMode mode)
Returns a list of matchingLocale
instances using the filtering mechanism defined in RFC 4647.List<Locale>
ResourceBundle.Control. getCandidateLocales(String baseName, Locale locale)
Returns aList
ofLocale
s as candidate locales forbaseName
andlocale
.Methods in java.util with parameters of type Locale Modifier and Type Method Description Formatter
Formatter. format(Locale l, String format, Object... args)
Writes a formatted string to this object's destination using the specified locale, format string, and arguments.static ResourceBundle
ResourceBundle. getBundle(String baseName, Locale locale)
Gets a resource bundle using the specified base name and locale, and the caller's class loader.static ResourceBundle
ResourceBundle. getBundle(String baseName, Locale locale, ClassLoader loader)
Gets a resource bundle using the specified base name, locale, and class loader.static ResourceBundle
ResourceBundle. getBundle(String baseName, Locale targetLocale, ClassLoader loader, ResourceBundle.Control control)
Returns a resource bundle using the specified base name, target locale, class loader and control.static ResourceBundle
ResourceBundle. getBundle(String baseName, Locale targetLocale, Module module)
Gets a resource bundle using the specified base name and locale on behalf of the specified module.static ResourceBundle
ResourceBundle. getBundle(String baseName, Locale targetLocale, ResourceBundle.Control control)
Returns a resource bundle using the specified base name, target locale and control, and the caller's class loader.List<Locale>
ResourceBundle.Control. getCandidateLocales(String baseName, Locale locale)
Returns aList
ofLocale
s as candidate locales forbaseName
andlocale
.String
Locale. getDisplayCountry(Locale inLocale)
Returns a name for the locale's country that is appropriate for display to the user.String
Locale. getDisplayLanguage(Locale inLocale)
Returns a name for the locale's language that is appropriate for display to the user.String
Calendar. getDisplayName(int field, int style, Locale locale)
Returns the string representation of the calendarfield
value in the givenstyle
andlocale
.String
Currency. getDisplayName(Locale locale)
Gets the name that is suitable for displaying this currency for the specified locale.String
Locale. getDisplayName(Locale inLocale)
Returns a name for the locale that is appropriate for display to the user.String
TimeZone. getDisplayName(boolean daylight, int style, Locale locale)
Returns a name in the specifiedstyle
of thisTimeZone
suitable for presentation to the user in the specifiedlocale
.String
TimeZone. getDisplayName(Locale locale)
Returns a long standard time name of thisTimeZone
suitable for presentation to the user in the specifiedlocale
.Map<String,Integer>
Calendar. getDisplayNames(int field, int style, Locale locale)
Returns aMap
containing all names of the calendarfield
in the givenstyle
andlocale
and their corresponding field values.String
Locale. getDisplayScript(Locale inLocale)
Returns a name for the locale's script that is appropriate for display to the user.String
Locale. getDisplayVariant(Locale inLocale)
Returns a name for the locale's variant code that is appropriate for display to the user.Locale
ResourceBundle.Control. getFallbackLocale(String baseName, Locale locale)
Returns aLocale
to be used as a fallback locale for further resource bundle searches by theResourceBundle.getBundle
factory method.static Calendar
Calendar. getInstance(Locale aLocale)
Gets a calendar using the default time zone and specified locale.static Calendar
Calendar. getInstance(TimeZone zone, Locale aLocale)
Gets a calendar with the specified time zone and locale.static Currency
Currency. getInstance(Locale locale)
Returns theCurrency
instance for the country of the given locale.String
Currency. getSymbol(Locale locale)
Gets the symbol of this currency for the specified locale.long
ResourceBundle.Control. getTimeToLive(String baseName, Locale locale)
Returns the time-to-live (TTL) value for resource bundles that are loaded under thisResourceBundle.Control
.boolean
ResourceBundle.Control. needsReload(String baseName, Locale locale, String format, ClassLoader loader, ResourceBundle bundle, long loadTime)
Determines if the expiredbundle
in the cache needs to be reloaded based on the loading time given byloadTime
or some other criteria.ResourceBundle
ResourceBundle.Control. newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload)
Instantiates a resource bundle for the given bundle name of the given format and locale, using the given class loader if necessary.static void
Locale. setDefault(Locale newLocale)
Sets the default locale for this instance of the Java Virtual Machine.static void
Locale. setDefault(Locale.Category category, Locale newLocale)
Sets the default locale for the specified Category for this instance of the Java Virtual Machine.Calendar.Builder
Calendar.Builder. setLocale(Locale locale)
Sets the locale parameter to the givenlocale
.Locale.Builder
Locale.Builder. setLocale(Locale locale)
Resets theBuilder
to match the providedlocale
.String
ResourceBundle.Control. toBundleName(String baseName, Locale locale)
Converts the givenbaseName
andlocale
to the bundle name.Scanner
Scanner. useLocale(Locale locale)
Sets this scanner's locale to the specified locale.Method parameters in java.util with type arguments of type Locale Modifier and Type Method Description static List<Locale>
Locale. filter(List<Locale.LanguageRange> priorityList, Collection<Locale> locales)
Returns a list of matchingLocale
instances using the filtering mechanism defined in RFC 4647.static List<Locale>
Locale. filter(List<Locale.LanguageRange> priorityList, Collection<Locale> locales, Locale.FilteringMode mode)
Returns a list of matchingLocale
instances using the filtering mechanism defined in RFC 4647.static Locale
Locale. lookup(List<Locale.LanguageRange> priorityList, Collection<Locale> locales)
Returns aLocale
instance for the best-matching language tag using the lookup mechanism defined in RFC 4647.Constructors in java.util with parameters of type Locale Constructor Description Calendar(TimeZone zone, Locale aLocale)
Constructs a calendar with the specified time zone and locale.Formatter(File file, String csn, Locale l)
Constructs a new formatter with the specified file, charset, and locale.Formatter(OutputStream os, String csn, Locale l)
Constructs a new formatter with the specified output stream, charset, and locale.Formatter(Appendable a, Locale l)
Constructs a new formatter with the specified destination and locale.Formatter(String fileName, String csn, Locale l)
Constructs a new formatter with the specified file name, charset, and locale.Formatter(Locale l)
Constructs a new formatter with the specified locale.GregorianCalendar(Locale aLocale)
Constructs aGregorianCalendar
based on the current time in the default time zone with the given locale.GregorianCalendar(TimeZone zone, Locale aLocale)
Constructs aGregorianCalendar
based on the current time in the given time zone with the given locale. -
Uses of Locale in java.util.spi
Methods in java.util.spi that return Locale Modifier and Type Method Description abstract Locale[]
LocaleServiceProvider. getAvailableLocales()
Returns an array of all locales for which this locale service provider can provide localized objects or names.Methods in java.util.spi with parameters of type Locale Modifier and Type Method Description ResourceBundle
AbstractResourceBundleProvider. getBundle(String baseName, Locale locale)
Returns aResourceBundle
for the givenbaseName
andlocale
.ResourceBundle
ResourceBundleProvider. getBundle(String baseName, Locale locale)
Returns aResourceBundle
for the given bundle name and locale.abstract String
LocaleNameProvider. getDisplayCountry(String countryCode, Locale locale)
Returns a localized name for the given IETF BCP47 region code (either ISO 3166 country code or UN M.49 area codes) and the given locale that is appropriate for display to the user.abstract String
LocaleNameProvider. getDisplayLanguage(String languageCode, Locale locale)
Returns a localized name for the given IETF BCP47 language code and the given locale that is appropriate for display to the user.abstract String
CalendarNameProvider. getDisplayName(String calendarType, int field, int value, int style, Locale locale)
Returns the string representation (display name) of the calendarfield value
in the givenstyle
andlocale
.String
CurrencyNameProvider. getDisplayName(String currencyCode, Locale locale)
Returns a name for the currency that is appropriate for display to the user.abstract String
TimeZoneNameProvider. getDisplayName(String ID, boolean daylight, int style, Locale locale)
Returns a name for the given time zone ID that's suitable for presentation to the user in the specified locale.abstract Map<String,Integer>
CalendarNameProvider. getDisplayNames(String calendarType, int field, int style, Locale locale)
Returns aMap
containing all string representations (display names) of theCalendar
field
in the givenstyle
andlocale
and their corresponding field values.String
LocaleNameProvider. getDisplayScript(String scriptCode, Locale locale)
Returns a localized name for the given IETF BCP47 script code and the given locale that is appropriate for display to the user.abstract String
LocaleNameProvider. getDisplayVariant(String variant, Locale locale)
Returns a localized name for the given variant code and the given locale that is appropriate for display to the user.abstract int
CalendarDataProvider. getFirstDayOfWeek(Locale locale)
Returns the first day of a week in the givenlocale
.String
TimeZoneNameProvider. getGenericDisplayName(String ID, int style, Locale locale)
Returns a generic name for the given time zoneID
that's suitable for presentation to the user in the specifiedlocale
.abstract int
CalendarDataProvider. getMinimalDaysInFirstWeek(Locale locale)
Returns the minimal number of days required in the first week of a year.abstract String
CurrencyNameProvider. getSymbol(String currencyCode, Locale locale)
Gets the symbol of the given currency code for the specified locale.boolean
LocaleServiceProvider. isSupportedLocale(Locale locale)
Returnstrue
if the givenlocale
is supported by this locale service provider.protected String
AbstractResourceBundleProvider. toBundleName(String baseName, Locale locale)
Returns the bundle name for the givenbaseName
andlocale
that this provider provides. -
Uses of Locale in javafx.beans.binding
Methods in javafx.beans.binding with parameters of type Locale Modifier and Type Method Description StringBinding
NumberExpression. asString(Locale locale, String format)
StringBinding
NumberExpressionBase. asString(Locale locale, String format)
StringBinding
ObjectExpression. asString(Locale locale, String format)
static StringExpression
Bindings. format(Locale locale, String format, Object... args)
Creates aStringExpression
that holds the value of multipleObjects
formatted according to a formatString
and a specifiedLocale
-
Uses of Locale in javafx.scene.media
Methods in javafx.scene.media that return Locale Modifier and Type Method Description Locale
Track. getLocale()
TheLocale
specifying the language and possibly the country that theTrack
contents are formatted for. -
Uses of Locale in javafx.util.converter
Fields in javafx.util.converter declared as Locale Modifier and Type Field Description protected Locale
DateTimeStringConverter. locale
Constructors in javafx.util.converter with parameters of type Locale Constructor Description CurrencyStringConverter(Locale locale)
CurrencyStringConverter(Locale locale, String pattern)
DateStringConverter(Locale locale)
Create aStringConverter
forDate
values, using the specified locale and theDateFormat.DEFAULT
date style.DateStringConverter(Locale locale, int dateStyle)
DateStringConverter(Locale locale, String pattern)
Create aStringConverter
forDate
values, using the specified locale and pattern.DateTimeStringConverter(Locale locale)
Create aStringConverter
forDate
values, using the specified locale andDateFormat.DEFAULT
styles for date and time.DateTimeStringConverter(Locale locale, int dateStyle, int timeStyle)
Create aStringConverter
forDate
values, using specified locale andDateFormat
styles for date and time.DateTimeStringConverter(Locale locale, String pattern)
Create aStringConverter
forDate
values, using the specified locale and pattern.LocalDateStringConverter(FormatStyle dateStyle, Locale locale, Chronology chronology)
Create a StringConverter forLocalDate
values using a default formatter and parser, which will be based on the suppliedFormatStyle
,Locale
, andChronology
.LocalDateTimeStringConverter(FormatStyle dateStyle, FormatStyle timeStyle, Locale locale, Chronology chronology)
Create aStringConverter
forLocalDateTime
values using a default formatter and parser, which will be based on the suppliedFormatStyle
s,Locale
, andChronology
.LocalTimeStringConverter(FormatStyle timeStyle, Locale locale)
Create a StringConverter forLocalTime
values, using a default formatter and parser with the specifiedFormatStyle
andLocale
.NumberStringConverter(Locale locale)
NumberStringConverter(Locale locale, String pattern)
PercentageStringConverter(Locale locale)
TimeStringConverter(Locale locale)
Create aStringConverter
forDate
values, using the specified locale and theDateFormat.DEFAULT
time style.TimeStringConverter(Locale locale, int timeStyle)
TimeStringConverter(Locale locale, String pattern)
Create aStringConverter
forDate
values, using the specified locale and pattern. -
Uses of Locale in javax.accessibility
Methods in javax.accessibility that return Locale Modifier and Type Method Description abstract Locale
AccessibleContext. getLocale()
Gets the locale of the component.Methods in javax.accessibility with parameters of type Locale Modifier and Type Method Description protected String
AccessibleBundle. toDisplayString(String resourceBundleName, Locale locale)
Obtains the key as a localized string.String
AccessibleBundle. toDisplayString(Locale locale)
Obtains the key as a localized string. -
Uses of Locale in javax.annotation.processing
Methods in javax.annotation.processing that return Locale Modifier and Type Method Description Locale
ProcessingEnvironment. getLocale()
Returns the current locale ornull
if no locale is in effect. -
Uses of Locale in javax.imageio
Fields in javax.imageio declared as Locale Modifier and Type Field Description protected Locale[]
ImageReader. availableLocales
An array ofLocale
s which may be used to localize warning messages, ornull
if localization is not supported.protected Locale[]
ImageWriter. availableLocales
An array ofLocale
s that may be used to localize warning messages and compression setting values, ornull
if localization is not supported.protected Locale
ImageReader. locale
The currentLocale
to be used for localization, ornull
if none has been set.protected Locale
ImageWriteParam. locale
ALocale
to be used to localize compression type names and quality descriptions, ornull
to use a defaultLocale
.protected Locale
ImageWriter. locale
The currentLocale
to be used for localization, ornull
if none has been set.Fields in javax.imageio with type parameters of type Locale Modifier and Type Field Description protected List<Locale>
ImageReader. warningLocales
AList
of theLocale
s associated with each currently registeredIIOReadWarningListener
, initialized by default tonull
, which is synonymous with an emptyList
.protected List<Locale>
ImageWriter. warningLocales
AList
ofLocale
s, one for each element ofwarningListeners
, initialized by defaultnull
, which is synonymous with an emptyList
.Methods in javax.imageio that return Locale Modifier and Type Method Description Locale[]
ImageReader. getAvailableLocales()
Returns an array ofLocale
s that may be used to localize warning listeners and compression settings.Locale[]
ImageWriter. getAvailableLocales()
Returns an array ofLocale
s that may be used to localize warning listeners and compression settings.Locale
ImageReader. getLocale()
Returns the currently setLocale
, ornull
if none has been set.Locale
ImageWriteParam. getLocale()
Returns the currently setLocale
, ornull
if only a defaultLocale
is supported.Locale
ImageWriter. getLocale()
Returns the currently setLocale
, ornull
if none has been set.Methods in javax.imageio with parameters of type Locale Modifier and Type Method Description void
ImageReader. setLocale(Locale locale)
Sets the currentLocale
of thisImageReader
to the given value.void
ImageWriter. setLocale(Locale locale)
Sets the currentLocale
of thisImageWriter
to the given value.Constructors in javax.imageio with parameters of type Locale Constructor Description ImageWriteParam(Locale locale)
Constructs anImageWriteParam
set to use a givenLocale
. -
Uses of Locale in javax.imageio.metadata
Methods in javax.imageio.metadata with parameters of type Locale Modifier and Type Method Description String
IIOMetadataFormat. getAttributeDescription(String elementName, String attrName, Locale locale)
Returns aString
containing a description of the named attribute, ornull
.String
IIOMetadataFormatImpl. getAttributeDescription(String elementName, String attrName, Locale locale)
Returns aString
containing a description of the named attribute, ornull
.String
IIOMetadataFormat. getElementDescription(String elementName, Locale locale)
Returns aString
containing a description of the named element, ornull
.String
IIOMetadataFormatImpl. getElementDescription(String elementName, Locale locale)
Returns aString
containing a description of the named element, ornull
. -
Uses of Locale in javax.imageio.plugins.bmp
Constructors in javax.imageio.plugins.bmp with parameters of type Locale Constructor Description BMPImageWriteParam(Locale locale)
Constructs aBMPImageWriteParam
set to use a givenLocale
and with default values for all parameters. -
Uses of Locale in javax.imageio.plugins.jpeg
Constructors in javax.imageio.plugins.jpeg with parameters of type Locale Constructor Description JPEGImageWriteParam(Locale locale)
Constructs aJPEGImageWriteParam
. -
Uses of Locale in javax.imageio.spi
Methods in javax.imageio.spi with parameters of type Locale Modifier and Type Method Description abstract String
IIOServiceProvider. getDescription(Locale locale)
Returns a brief, human-readable description of this service provider and its associated implementation. -
Uses of Locale in javax.print.attribute
Methods in javax.print.attribute that return Locale Modifier and Type Method Description Locale
TextSyntax. getLocale()
Returns this text attribute's text string's natural language (locale).Constructors in javax.print.attribute with parameters of type Locale Constructor Description TextSyntax(String value, Locale locale)
Constructs a TextAttribute with the specified string and locale. -
Uses of Locale in javax.print.attribute.standard
Constructors in javax.print.attribute.standard with parameters of type Locale Constructor Description DocumentName(String documentName, Locale locale)
Constructs a new document name attribute with the given document name and locale.JobMessageFromOperator(String message, Locale locale)
Constructs a new job message from operator attribute with the given message and locale.JobName(String jobName, Locale locale)
Constructs a new job name attribute with the given job name and locale.JobOriginatingUserName(String userName, Locale locale)
Constructs a new job originating user name attribute with the given user name and locale.OutputDeviceAssigned(String deviceName, Locale locale)
Constructs a new output device assigned attribute with the given device name and locale.PrinterInfo(String info, Locale locale)
Constructs a new printer info attribute with the given information string and locale.PrinterLocation(String location, Locale locale)
Constructs a new printer location attribute with the given location and locale.PrinterMakeAndModel(String makeAndModel, Locale locale)
Constructs a new printer make and model attribute with the given make and model string and locale.PrinterMessageFromOperator(String message, Locale locale)
Constructs a new printer message from operator attribute with the given message and locale.PrinterName(String printerName, Locale locale)
Constructs a new printer name attribute with the given name and locale.RequestingUserName(String userName, Locale locale)
Constructs a new requesting user name attribute with the given user name and locale. -
Uses of Locale in javax.security.auth.callback
Methods in javax.security.auth.callback that return Locale Modifier and Type Method Description Locale
LanguageCallback. getLocale()
Get the retrievedLocale
.Methods in javax.security.auth.callback with parameters of type Locale Modifier and Type Method Description void
LanguageCallback. setLocale(Locale locale)
Set the retrievedLocale
. -
Uses of Locale in javax.swing
Methods in javax.swing that return Locale Modifier and Type Method Description static Locale
JComponent. getDefaultLocale()
Returns the default locale used to initialize each JComponent's locale property upon creation.Locale
UIDefaults. getDefaultLocale()
Returns the default locale.Locale
ImageIcon.AccessibleImageIcon. getLocale()
Returns the locale of this object.Locale
JList.AccessibleJList.AccessibleJListChild. getLocale()
Locale
JTable.AccessibleJTable.AccessibleJTableCell. getLocale()
Gets the locale of the component.Locale
JTree.AccessibleJTree.AccessibleJTreeNode. getLocale()
Gets the locale of the component.Locale
ProgressMonitor.AccessibleProgressMonitor. getLocale()
Gets the locale of the component.Methods in javax.swing with parameters of type Locale Modifier and Type Method Description Object
UIDefaults. get(Object key, Locale l)
Returns the value for key associated with the given locale.static Object
UIManager. get(Object key, Locale l)
Returns an object from the defaults that is appropriate for the given locale.boolean
UIDefaults. getBoolean(Object key, Locale l)
If the value ofkey
for the givenLocale
is boolean, return the boolean value, otherwise return false.static boolean
UIManager. getBoolean(Object key, Locale l)
Returns a boolean from the defaults which is associated with the key value and the givenLocale
.Border
UIDefaults. getBorder(Object key, Locale l)
If the value ofkey
for the givenLocale
is aBorder
return it, otherwise returnnull
.static Border
UIManager. getBorder(Object key, Locale l)
Returns a border from the defaults that is appropriate for the given locale.Color
UIDefaults. getColor(Object key, Locale l)
If the value ofkey
for the givenLocale
is aColor
return it, otherwise returnnull
.static Color
UIManager. getColor(Object key, Locale l)
Returns a color from the defaults that is appropriate for the given locale.Dimension
UIDefaults. getDimension(Object key, Locale l)
If the value ofkey
for the givenLocale
is aDimension
return it, otherwise returnnull
.static Dimension
UIManager. getDimension(Object key, Locale l)
Returns a dimension from the defaults that is appropriate for the given locale.Font
UIDefaults. getFont(Object key, Locale l)
If the value ofkey
for the givenLocale
is aFont
return it, otherwise returnnull
.static Font
UIManager. getFont(Object key, Locale l)
Returns a font from the defaults that is appropriate for the given locale.Icon
UIDefaults. getIcon(Object key, Locale l)
If the value ofkey
for the givenLocale
is anIcon
return it, otherwise returnnull
.static Icon
UIManager. getIcon(Object key, Locale l)
Returns anIcon
from the defaults that is appropriate for the given locale.Insets
UIDefaults. getInsets(Object key, Locale l)
If the value ofkey
for the givenLocale
is anInsets
return it, otherwise returnnull
.static Insets
UIManager. getInsets(Object key, Locale l)
Returns anInsets
object from the defaults that is appropriate for the given locale.int
UIDefaults. getInt(Object key, Locale l)
If the value ofkey
for the givenLocale
is anInteger
return its integer value, otherwise return 0.static int
UIManager. getInt(Object key, Locale l)
Returns an integer from the defaults that is appropriate for the given locale.String
UIDefaults. getString(Object key, Locale l)
If the value ofkey
for the givenLocale
is aString
return it, otherwise returnnull
.static String
UIManager. getString(Object key, Locale l)
Returns a string from the defaults that is appropriate for the given locale.static void
JComponent. setDefaultLocale(Locale l)
Sets the default locale used to initialize each JComponent's locale property upon creation.void
UIDefaults. setDefaultLocale(Locale l)
Sets the default locale. -
Uses of Locale in javax.swing.table
Methods in javax.swing.table that return Locale Modifier and Type Method Description Locale
JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry. getLocale()
-
Uses of Locale in javax.tools
Methods in javax.tools with parameters of type Locale Modifier and Type Method Description String
Diagnostic. getMessage(Locale locale)
Returns a localized message for the given locale.StandardJavaFileManager
DocumentationTool. getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
Returns a new instance of the standard file manager implementation for this tool.StandardJavaFileManager
JavaCompiler. getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
Returns a new instance of the standard file manager implementation for this tool.void
DocumentationTool.DocumentationTask. setLocale(Locale locale)
Sets the locale to be applied when formatting diagnostics and other localized data.void
JavaCompiler.CompilationTask. setLocale(Locale locale)
Sets the locale to be applied when formatting diagnostics and other localized data. -
Uses of Locale in javax.xml.datatype
Methods in javax.xml.datatype with parameters of type Locale Modifier and Type Method Description abstract GregorianCalendar
XMLGregorianCalendar. toGregorianCalendar(TimeZone timezone, Locale aLocale, XMLGregorianCalendar defaults)
Convert thisXMLGregorianCalendar
along with provided parameters to aGregorianCalendar
instance. -
Uses of Locale in javax.xml.soap
Methods in javax.xml.soap that return Locale Modifier and Type Method Description Locale
SOAPFault. getFaultStringLocale()
Gets the locale of the fault string for thisSOAPFault
object.Methods in javax.xml.soap that return types with arguments of type Locale Modifier and Type Method Description Iterator<Locale>
SOAPFault. getFaultReasonLocales()
Returns anIterator
over a distinct sequence ofLocale
s for which there are associated Reason Text items.Methods in javax.xml.soap with parameters of type Locale Modifier and Type Method Description SOAPFault
SOAPBody. addFault(QName faultCode, String faultString, Locale locale)
Creates a newSOAPFault
object and adds it to thisSOAPBody
object.SOAPFault
SOAPBody. addFault(Name faultCode, String faultString, Locale locale)
Creates a newSOAPFault
object and adds it to thisSOAPBody
object.void
SOAPFault. addFaultReasonText(String text, Locale locale)
Appends or replaces a Reason Text item containing the specified text message and an xml:lang derived fromlocale
.String
SOAPFault. getFaultReasonText(Locale locale)
Returns the Reason Text associated with the givenLocale
.void
SOAPFault. setFaultString(String faultString, Locale locale)
Sets the fault string for thisSOAPFault
object to the given string and localized to the given locale. -
Uses of Locale in jdk.javadoc.doclet
Methods in jdk.javadoc.doclet with parameters of type Locale Modifier and Type Method Description void
Doclet. init(Locale locale, Reporter reporter)
Initializes this doclet with the given locale and error reporter.void
StandardDoclet. init(Locale locale, Reporter reporter)
-
Uses of Locale in jdk.jshell
Methods in jdk.jshell with parameters of type Locale Modifier and Type Method Description abstract String
Diag. getMessage(Locale locale)
Returns a localized message for the given locale. -
Uses of Locale in jdk.jshell.tool
Methods in jdk.jshell.tool with parameters of type Locale Modifier and Type Method Description JavaShellToolBuilder
JavaShellToolBuilder. locale(Locale locale)
Set the locale. -
Uses of Locale in org.xml.sax
Methods in org.xml.sax with parameters of type Locale Modifier and Type Method Description void
Parser. setLocale(Locale locale)
Deprecated.Allow an application to request a locale for errors and warnings. -
Uses of Locale in org.xml.sax.helpers
Methods in org.xml.sax.helpers with parameters of type Locale Modifier and Type Method Description void
XMLReaderAdapter. setLocale(Locale locale)
Set the locale for error reporting.
-