32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*!
* @class OFLocalization OFLocalization.h ObjFW/OFLocalization.h
*
* @brief A class for querying the locale and retrieving localized strings.
*/
@interface OFLocalization: OFObject
{
OFString *_language;
OFString *_territory;
of_string_encoding_t _encoding;
OFString *_decimalPoint;
OFMutableArray OF_GENERIC(OFDictionary OF_GENERIC(OFString *, id) *)
*_localizedStrings;
}
/**
|
|
<
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*!
* @class OFLocalization OFLocalization.h ObjFW/OFLocalization.h
*
* @brief A class for querying the locale and retrieving localized strings.
*/
@interface OFLocalization: OFObject
{
OFString *_Nullable _language, *_Nullable _territory;
of_string_encoding_t _encoding;
OFString *_decimalPoint;
OFMutableArray OF_GENERIC(OFDictionary OF_GENERIC(OFString *, id) *)
*_localizedStrings;
}
/**
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
*
* @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.
*
* @return The shared OFLocalization instance
*/
+ (instancetype)sharedLocalization;
/**
* @brief Returns the language of the locale.
*
* If the language is unknown, `nil` is returned.
*
* @return The language of the locale.
|
|
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
*
* @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.
*
* @return The shared OFLocalization instance
*/
+ (nullable instancetype)sharedLocalization;
/**
* @brief Returns the language of the locale.
*
* If the language is unknown, `nil` is returned.
*
* @return The language of the locale.
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
+ (of_string_encoding_t)encoding;
/*!
* @brief Returns the decimal point of the system's locale.
*
* @return The decimal point of the system's locale
*/
+ (OFString *)decimalPoint;
#ifdef OF_HAVE_FILES
/*!
* @brief Adds a directory to scan for language files.
*
* @param path The path to the directory to scan for language files
*/
|
|
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
+ (of_string_encoding_t)encoding;
/*!
* @brief Returns the decimal point of the system's locale.
*
* @return The decimal point of the system's locale
*/
+ (nullable OFString *)decimalPoint;
#ifdef OF_HAVE_FILES
/*!
* @brief Adds a directory to scan for language files.
*
* @param path The path to the directory to scan for language files
*/
|