23 OF_ASSUME_NONNULL_BEGIN
40 #define OF_LOCALIZED(ID, ...) \ 41 [[OFLocale currentLocale] localizedStringForID: ID \ 42 fallback: __VA_ARGS__, nil] 52 OF_SUBCLASSING_RESTRICTED
55 OFString *_Nullable _languageCode, *_Nullable _countryCode;
62 #ifdef OF_HAVE_CLASS_PROPERTIES 63 @property (
class, readonly, nullable, nonatomic)
OFLocale *currentLocale;
64 @property (
class, readonly, nullable, nonatomic)
OFString *languageCode;
65 @property (
class, readonly, nullable, nonatomic)
OFString *countryCode;
67 @property (
class, readonly, nullable, nonatomic)
OFString *decimalSeparator;
75 @property OF_NULLABLE_PROPERTY (readonly, nonatomic)
OFString *languageCode;
82 @property OF_NULLABLE_PROPERTY (readonly, nonatomic)
OFString *countryCode;
97 @property (readonly, nonatomic)
OFString *decimalSeparator;
107 + (nullable
OFLocale *)currentLocale;
116 + (nullable
OFString *)languageCode;
144 + (nullable
OFString *)decimalSeparator;
151 + (void)addLocalizationDirectoryIRI: (
OFIRI *)IRI;
153 - (instancetype)init OF_DEPRECATED(ObjFW, 1, 1, "Manually creating an
OFLocale "
154 "is no longer necessary. Use +[
OFLocale currentLocale] instead.");
161 - (void)addLocalizationDirectoryIRI: (
OFIRI *)IRI;
183 fallback: (
id)fallback, ... OF_SENTINEL;
210 fallback: (
id)fallback
211 arguments: (va_list)arguments;
214 OF_ASSUME_NONNULL_END
OFStringEncoding
The encoding of a string.
Definition: OFString.h:65
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:41
The root class for all other classes inside ObjFW.
Definition: OFObject.h:690
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:47
A class for handling strings.
Definition: OFString.h:138
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:82
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition: OFIRI.h:39
A class for querying the locale and retrieving localized strings.
Definition: OFLocale.h:53