23OF_ASSUME_NONNULL_BEGIN
40#define OF_LOCALIZED(ID, ...) \
41 [[OFLocale currentLocale] localizedStringForID: ID \
42 fallback: __VA_ARGS__, nil]
52OF_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;
151+ (void)addLocalizationDirectoryIRI: (
OFIRI *)IRI;
154 OF_DEPRECATED(ObjFW, 1, 1,
155 "Manually creating an
OFLocale is no longer necessary. "
163- (void)addLocalizationDirectoryIRI: (
OFIRI *)IRI;
186 fallback: (
id)fallback, ... OF_SENTINEL;
213 fallback: (
id)fallback
214 arguments: (va_list)arguments;
OFStringEncoding
The encoding of a string.
Definition OFString.h:65
A class for storing constant strings using the @"" literal.
Definition OFConstantString.h:42
An abstract class for storing objects in a dictionary.
Definition OFDictionary.h:84
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition OFIRI.h:41
A class for querying the locale and retrieving localized strings.
Definition OFLocale.h:54
OFStringEncoding encoding
The native 8-bit string encoding of the locale for messages.
Definition OFLocale.m:389
OFString * languageCode
The language code of the locale for messages.
Definition OFLocale.m:375
OFString * decimalSeparator
The decimal separator of the locale.
Definition OFLocale.m:396
OFString * countryCode
The country code of the locale for messages.
Definition OFLocale.m:382
nullable OFLocale * currentLocale()
Returns the current OFLocale.
Definition OFLocale.m:368
instancetype init()
Initializes an already allocated object.
Definition OFLocale.m:408
An abstract class for storing, adding and removing objects in an array.
Definition OFMutableArray.h:50
The root class for all other classes inside ObjFW.
Definition OFObject.h:956
A class for handling strings.
Definition OFString.h:143