Differences From 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]
To Artifact [080cdcf15b]:
- File src/OFLocale.h — part of check-in [23272e6d43] at 2022-11-24 00:21:15 on branch trunk — Rename OFURI to OFIRI (user: js, size: 7097) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
14 15 16 17 18 19 20 | */ #import "OFObject.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | */ #import "OFObject.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN @class OFIRI; /** @file */ /** * @def OF_LOCALIZED * * @brief Returns the localized string for the specified ID with the specified |
︙ | ︙ | |||
139 140 141 142 143 144 145 | * @return The decimal point of the system's locale */ + (nullable OFString *)decimalSeparator; /** * @brief Adds a directory to scan for localizations. * | | | | | | 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 | * @return The decimal point of the system's locale */ + (nullable OFString *)decimalSeparator; /** * @brief Adds a directory to scan for localizations. * * @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; /** * @brief Adds a directory to scan for localizations. * * @param IRI The IRI to the directory to scan for localizations */ - (void)addLocalizationDirectoryIRI: (OFIRI *)IRI; /** * @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 |
︙ | ︙ |