MRTI18nManager
class MRTI18nManager : NSObject |
Localization manager.
Summary
Instance methods
func localizeDistance(withDistance distance: Int) -> String |
func localizeDuration(withDuration duration: Int) -> String |
func localizeSpeed(withSpeed speed: Double) -> String |
func localizeDataSize(withDataSize dataSize: Int64) -> String |
func canonicalSpeed(withSpeed speed: Double) -> MRTCanonicalUnit |
func localizeCanonicalUnit(with canonicalUnit: MRTCanonicalUnit) -> String |
Properties
var prefs: MRTI18nPrefs { get set } |
var som: MRTSystemOfMeasurement { get set } |
var timeFormat: MRTTimeFormat { get set } |
var isValid: Bool { get } |
Instance methods
localizeDistance(withDistance:)
func localizeDistance(withDistance distance: Int) -> String |
Converts a distance value to the current locale.
localizeDuration(withDuration:)
func localizeDuration(withDuration duration: Int) -> String |
Converts a duration to the current locale.
localizeSpeed(withSpeed:)
func localizeSpeed(withSpeed speed: Double) -> String |
Converts speed to the current locale.
localizeDataSize(withDataSize:)
func localizeDataSize(withDataSize dataSize: Int64) -> String |
Converts data size to the current locale.
canonicalSpeed(withSpeed:)
func canonicalSpeed(withSpeed speed: Double) -> MRTCanonicalUnit |
Represents the speed with the value and unit of measurement separated.
localizeCanonicalUnit(with:)
func localizeCanonicalUnit(with canonicalUnit: MRTCanonicalUnit) -> String |
Localizes a value represented by canonical units.
Properties
prefs
var prefs: MRTI18nPrefs { get set } |
Localization preferences.
som
var som: MRTSystemOfMeasurement { get set } |
System of measurement used.
timeFormat
var timeFormat: MRTTimeFormat { get set } |
Preferred time format.
isValid
var isValid: Bool { get } |
Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object 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.