Package world.mappable.runtime.i18n
Interface I18nManager
interface I18nManager
Localization manager.
Summary
Methods
Type and modifiers |
Method and Description |
java.lang.String |
localizeDistance(int distance) |
java.lang.String |
localizeDuration(int duration) |
java.lang.String |
localizeSpeed(double speed) |
java.lang.String |
localizeDataSize(long dataSize) |
canonicalSpeed(double speed) |
|
java.lang.String |
localizeCanonicalUnit(@NonNull CanonicalUnit canonicalUnit) |
getPrefs() |
|
void |
|
getSom() |
|
void |
setSom(@NonNull SystemOfMeasurement som) |
getTimeFormat() |
|
void |
setTimeFormat(@NonNull TimeFormat timeFormat) |
boolean |
isValid() |
Methods
localizeDistance
@NonNull |
Converts a distance value to the current locale.
localizeDuration
@NonNull |
Converts a duration to the current locale.
localizeSpeed
@NonNull |
Converts speed to the current locale.
localizeDataSize
@NonNull |
Converts data size to the current locale.
canonicalSpeed
@NonNull |
Represents the speed with the value and unit of measurement separated.
localizeCanonicalUnit
@NonNull |
Localizes a value represented by canonical units.
getPrefs
@NonNull |
Localization preferences.
setPrefs
void setPrefs(@NonNull I18nPrefs prefs) |
getSom
@NonNull |
System of measurement used.
setSom
void setSom(@NonNull SystemOfMeasurement som) |
getTimeFormat
@NonNull |
Preferred time format.
setTimeFormat
void setTimeFormat(@NonNull TimeFormat timeFormat) |
isValid
boolean isValid() |
Tells if this I18nManager is valid or not.
Any other method (except for this one) called on an invalid I18nManager will throw java.lang.RuntimeException. An instance becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.