21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#import "OFLocalization.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#ifdef OF_MORPHOS
# define BOOL EXEC_BOOL
# include <proto/dos.h>
# include <proto/locale.h>
# undef BOOL
#endif
|
>
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#import "OFLocalization.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFOpenItemFailedException.h"
#ifdef OF_MORPHOS
# define BOOL EXEC_BOOL
# include <proto/dos.h>
# include <proto/locale.h>
# undef BOOL
#endif
|
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
if (_language == nil)
return;
pool = objc_autoreleasePoolPush();
mapPath = [path stringByAppendingPathComponent: @"languages.json"];
map = [[OFString stringWithContentsOfFile: mapPath] JSONValue];
language = [_language lowercaseString];
territory = [_territory lowercaseString];
if (territory == nil)
territory = @"";
|
>
|
>
>
>
>
|
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
if (_language == nil)
return;
pool = objc_autoreleasePoolPush();
mapPath = [path stringByAppendingPathComponent: @"languages.json"];
@try {
map = [[OFString stringWithContentsOfFile: mapPath] JSONValue];
} @catch (OFOpenItemFailedException *e) {
objc_autoreleasePoolPop(pool);
return;
}
language = [_language lowercaseString];
territory = [_territory lowercaseString];
if (territory == nil)
territory = @"";
|