Differences From Artifact [ca12b9c93f]:
- File src/OFLocale.h — part of check-in [915bfc7431] at 2022-09-29 20:27:57 on branch trunk — OFLocale: Rename a few methods (user: js, size: 7145) [annotate] [blame] [check-ins using] [more...]
To Artifact [11147ec893]:
- File
src/OFLocale.h
— part of check-in
[88ed5be671]
at
2022-11-23 21:39:13
on branch trunk
— Use a URI for the localization directory
This theoretically allows embedding localizations. While this isn't
great as all will be held in memory but only one will be used, there
might be cases where everything should be in one binary. (user: js, size: 7097) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
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 | /** * @brief Returns the decimal point of the system's locale. * * @return The decimal point of the system's locale */ + (nullable OFString *)decimalSeparator; | < | | < < | | < | 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 |
︙ | ︙ |