@@ -93,13 +93,12 @@ @property (readonly, nonatomic) OFString *decimalSeparator; /** * @brief Returns the current OFLocale. * - * @warning If you don't use @ref OFApplication, this might be `nil`! In this - * case, you need to manually allocate an instance and call - * @ref init once. + * @note If you don't use @ref OFApplication, you need to call this as early as + * possible to initialize the locale! * * @return The current OFLocale instance */ + (nullable OFLocale *)currentLocale; @@ -145,21 +144,12 @@ * * @param IRI The IRI to the directory to scan for localizations */ + (void)addLocalizationDirectoryIRI: (OFIRI *)IRI; -/** - * @brief Initializes the current OFLocale. - * - * @warning This sets the locale via `setlocale()`! - * - * @warning You should never call this yourself, except if you do not use - * @ref OFApplication. In this case, you need to allocate exactly one - * instance of OFLocale, which will become the current locale, and - * call this method. - */ -- (instancetype)init; +- (instancetype)init OF_DEPRECATED(ObjFW, 1, 1, "Manually creating an OFLocale " + "is no longer necessary. Use +[OFLocale currentLocale] instead."); /** * @brief Adds a directory to scan for localizations. * * @param IRI The IRI to the directory to scan for localizations