17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#include "config.h"
#import "OFLocalization.h"
#import "OFAutoreleasePool.h"
#import "TestsAppDelegate.h"
@implementation TestsAppDelegate (OFLocalizationTests)
- (void)localizationTests
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFString *msg;
msg = [OFString stringWithFormat:
@"[OFLocalization] Language: %@\n", [OFLocalization language]];
[self outputString: msg
inColor: GREEN];
msg = [OFString stringWithFormat:
@"[OFLocalization] Territory: %@\n", [OFLocalization territory]];
[self outputString: msg
inColor: GREEN];
msg = [OFString stringWithFormat:
@"[OFLocalization] Encoding: %@\n",
of_string_name_of_encoding([OFLocalization encoding])];
[self outputString: msg
inColor: GREEN];
msg = [OFString stringWithFormat:
@"[OFLocalization] Decimal point: %@\n",
[OFLocalization decimalPoint]];
[self outputString: msg
inColor: GREEN];
[pool drain];
}
@end
|
>
>
<
<
|
<
<
<
|
<
<
<
|
|
<
<
<
<
|
<
<
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#include "config.h"
#import "OFLocalization.h"
#import "OFAutoreleasePool.h"
#import "TestsAppDelegate.h"
static OFString *module = @"OFLocalization";
@implementation TestsAppDelegate (OFLocalizationTests)
- (void)localizationTests
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
PRINT(GREEN, @"Language: %@", [OFLocalization language]);
PRINT(GREEN, @"Territory: %@", [OFLocalization territory]);
PRINT(GREEN, @"Encoding: %@",
of_string_name_of_encoding([OFLocalization encoding]));
PRINT(GREEN, @"Decimal point: %@", [OFLocalization decimalPoint]);
[pool drain];
}
@end
|