MRTI18nManager

@interface MRTI18nManager : NSObject

Localization manager.

Summary

Instance methods

- (nonnull NSString *)localizeDistanceWithDistance:(NSInteger)distance;
Converts a distance value to the current locale

- (nonnull NSString *)localizeDurationWithDuration:(NSInteger)duration;
Converts a duration to the current locale

- (nonnull NSString *)localizeSpeedWithSpeed:(double)speed;
Converts speed to the current locale

- (nonnull NSString *)localizeDataSizeWithDataSize:(long long)dataSize;
Converts data size to the current locale

- (nonnull MRTCanonicalUnit *)canonicalSpeedWithSpeed:(double)speed;
Represents the speed with the value and unit of measurement separated

- (nonnull NSString *)localizeCanonicalUnitWithCanonicalUnit:
    (nonnull MRTCanonicalUnit *)canonicalUnit;

Localizes a value represented by canonical units

Properties

@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull)
    MRTI18nPrefs *prefs;

Localization preferences

@property (nonatomic, assign, unsafe_unretained, readwrite)
    MRTSystemOfMeasurement som;

System of measurement used

@property (nonatomic, assign, unsafe_unretained, readwrite)
    MRTTimeFormat timeFormat;

Preferred time format

@property (nonatomic, readonly, getter=isValid) BOOL valid;
Tells if this object is valid or no

Instance methods

localizeDistanceWithDistance:

- (nonnull NSString *)localizeDistanceWithDistance:(NSInteger)distance;

Converts a distance value to the current locale.


localizeDurationWithDuration:

- (nonnull NSString *)localizeDurationWithDuration:(NSInteger)duration;

Converts a duration to the current locale.


localizeSpeedWithSpeed:

- (nonnull NSString *)localizeSpeedWithSpeed:(double)speed;

Converts speed to the current locale.


localizeDataSizeWithDataSize:

- (nonnull NSString *)localizeDataSizeWithDataSize:(long long)dataSize;

Converts data size to the current locale.


canonicalSpeedWithSpeed:

- (nonnull MRTCanonicalUnit *)canonicalSpeedWithSpeed:(double)speed;

Represents the speed with the value and unit of measurement separated.


localizeCanonicalUnitWithCanonicalUnit:

- (nonnull NSString *)localizeCanonicalUnitWithCanonicalUnit:
    (nonnull MRTCanonicalUnit *)canonicalUnit;

Localizes a value represented by canonical units.


Properties

prefs

@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull)
    MRTI18nPrefs *prefs;

Localization preferences.


som

@property (nonatomic, assign, unsafe_unretained, readwrite)
    MRTSystemOfMeasurement som;

System of measurement used.


timeFormat

@property (nonatomic, assign, unsafe_unretained, readwrite)
    MRTTimeFormat timeFormat;

Preferred time format.


valid

@property (nonatomic, readonly, getter=isValid) BOOL valid;

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.