ObjFW  Diff

Differences From Artifact [ca12b9c93f]:

To Artifact [11147ec893]:


14
15
16
17
18
19
20


21
22
23
24
25
26
27
 */

#import "OFObject.h"
#import "OFString.h"

OF_ASSUME_NONNULL_BEGIN



/** @file */

/**
 * @def OF_LOCALIZED
 *
 * @brief Returns the localized string for the specified ID with the specified
 *	  arguments inserted.







>
>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 */

#import "OFObject.h"
#import "OFString.h"

OF_ASSUME_NONNULL_BEGIN

@class OFURI;

/** @file */

/**
 * @def OF_LOCALIZED
 *
 * @brief Returns the localized string for the specified ID with the specified
 *	  arguments inserted.
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/**
 * @brief Returns the decimal point of the system's locale.
 *
 * @return The decimal point of the system's locale
 */
+ (nullable OFString *)decimalSeparator;

#ifdef OF_HAVE_FILES
/**
 * @brief Adds a directory to scan for localizations.
 *
 * @param path The path to the directory to scan for localizations
 */
+ (void)addLocalizationDirectory: (OFString *)path;
#endif

/**
 * @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;

#ifdef OF_HAVE_FILES
/**
 * @brief Adds a directory to scan for localizations.
 *
 * @param path The path to the directory to scan for localizations 
 */
- (void)addLocalizationDirectory: (OFString *)path;
#endif

/**
 * @brief Returns the localized string for the specified ID, using the fallback
 *	  string if it cannot be looked up or is missing.
 *
 * @note This takes a variadic argument, terminated by `nil`, that consists of
 *	 pairs of variable names and variable values, which will be replaced







<



|

|
<













<



|

|
<







136
137
138
139
140
141
142

143
144
145
146
147
148

149
150
151
152
153
154
155
156
157
158
159
160
161

162
163
164
165
166
167

168
169
170
171
172
173
174
/**
 * @brief Returns the decimal point of the system's locale.
 *
 * @return The decimal point of the system's locale
 */
+ (nullable OFString *)decimalSeparator;


/**
 * @brief Adds a directory to scan for localizations.
 *
 * @param URI The URI to the directory to scan for localizations
 */
+ (void)addLocalizationDirectoryURI: (OFURI *)URI;


/**
 * @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;


/**
 * @brief Adds a directory to scan for localizations.
 *
 * @param URI The URI to the directory to scan for localizations
 */
- (void)addLocalizationDirectoryURI: (OFURI *)URI;


/**
 * @brief Returns the localized string for the specified ID, using the fallback
 *	  string if it cannot be looked up or is missing.
 *
 * @note This takes a variadic argument, terminated by `nil`, that consists of
 *	 pairs of variable names and variable values, which will be replaced