public final class SimpleLocalization extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLTR()
Returns true if this app is running in a Left-to-Right (LTR) layout.
|
boolean |
isRTL()
Returns true if this app is running in a Right-to-Left (RTL) layout.
|
static String |
localizeCurrency(Currency currency,
double amount)
Returns a currency number string formatted for the given currency.
|
static String |
localizeCurrency(double amount)
Returns a currency number string formatted for this locale.
|
static String |
localizeCurrency(String currency,
double amount)
Returns a currency number string formatted for the given currency.
|
static String |
localizeDate(Date date)
Returns a date string formatted for this locale.
|
static String |
localizeNumber(double number)
Returns a number string formatted for this locale.
|
static String |
localizeNumber(int number)
Returns a number string formatted for this locale.
|
static String |
localizeNumber(long number)
Returns a number string formatted for this locale.
|
static double |
parseLocalizedDouble(String text) |
static float |
parseLocalizedFloat(String text)
Returns a float parsed from the given string.
|
static int |
parseLocalizedInt(String text) |
static long |
parseLocalizedLong(String text) |
static SimpleLocalization |
with(Context context) |
public static SimpleLocalization with(Context context)
public boolean isLTR()
public boolean isRTL()
public static String localizeDate(Date date)
public static String localizeNumber(int number)
public static String localizeNumber(long number)
public static String localizeNumber(double number)
public static String localizeCurrency(double amount)
public static String localizeCurrency(String currency, double amount)
public static String localizeCurrency(Currency currency, double amount)
public static int parseLocalizedInt(String text)
public static long parseLocalizedLong(String text)
public static double parseLocalizedDouble(String text)
public static float parseLocalizedFloat(String text)