|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsoc.util.I18n
public abstract class I18n
Common helper methods for I18N.
I18N localization was added in v2.0.00; network messages sending localized text should
check the remote receiver's version against SOCStringManager.VERSION_FOR_I18N.
SOCStringManager| Field Summary | |
|---|---|
static java.lang.String |
PROP_JSETTLERS_LOCALE
Property jsettlers.locale to specify the locale,
overriding the default from Locale.getDefault().toString(). |
| Constructor Summary | |
|---|---|
I18n()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
listItems(java.util.List<? extends java.lang.Object> items,
SOCStringManager strings)
Build a string with the contents of this list, such as "x, y, and z". |
static java.util.Locale |
parseLocale(java.lang.String loc)
Parse and construct a Locale for this locale string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROP_JSETTLERS_LOCALE
jsettlers.locale to specify the locale,
overriding the default from Locale.getDefault().toString().
| Constructor Detail |
|---|
public I18n()
| Method Detail |
|---|
public static final java.util.Locale parseLocale(java.lang.String loc)
throws java.lang.IllegalArgumentException
loc - Locale string, such as "en_US" from Locale.toString()
Locale.getDefault().
java.lang.IllegalArgumentException - if no locale can be parsed or found
public static final java.lang.String listItems(java.util.List<? extends java.lang.Object> items,
SOCStringManager strings)
throws java.lang.IllegalArgumentException
This method and its formatting strings (i18n.listitems.*) may need
refinement as more languages are supported.
items - Each item's toString() will be placed in the liststrings - StringManager to retrieve localized formatting between items
java.lang.IllegalArgumentException - if items is null, or strings is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||