public class PI18nHelper extends Object
Constructor and Description |
---|
PI18nHelper()
Constructor of PI18NHelper
|
Modifier and Type | Method and Description |
---|---|
static String |
formatName(Locale locale,
String first,
String last) |
static String |
formatName(Locale locale,
String first,
String middle,
String last)
Format a name based on locale.
|
static String |
getString(ResourceBundle bundle,
String tag,
Locale locale)
Retrieve a resource string for a locale.
|
static boolean |
isCJKLocale(Locale locale)
Find out if a locale is a Chinese, Japanese or Korean locale.
|
static void |
setFontStyle(Component c,
int style)
Avoid setting the BOLD font style for a CJK(Chinese, Japanese or Korean)
locale.
|
static Locale |
stringToLocale(String locStr)
Convert the locale string such as "en_US" to Java's Locale object
|
public static String formatName(Locale locale, String first, String middle, String last)
locale
- Portal account localefirst
- The first name from nameinfomiddle
- The middle name from nameinfolast
- The last name from nameinfopublic static String getString(ResourceBundle bundle, String tag, Locale locale)
bundle
- Resource bundle that has the format stringstag
- The tag of a format stringlocale
- Account locale or system localepublic static boolean isCJKLocale(Locale locale)
locale
- Account locale or system localepublic static void setFontStyle(Component c, int style)
c
- The componentstyle
- The new font style you want to set for the font used in the componentpublic static Locale stringToLocale(String locStr)
locStr
- the locale string such as "en_US" or "zh_TW"Copyright © 2003, 2023, Oracle and/or its affiliates.