-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathLocalizationSystem.h
executable file
·42 lines (30 loc) · 1.05 KB
/
LocalizationSystem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
//
// LocalizationSystem.h
// Battle of Puppets
//
// Created by Juan Albero Sanchis on 27/02/10.
// Copyright Aggressive Mediocrity 2010. All rights reserved.
//
#import <Foundation/Foundation.h>
#define AMLocalizedString(key, comment) \
[[LocalizationSystem sharedLocalSystem] localizedStringForKey:(key) value:(comment)]
#define LocalizationSetLanguage(language) \
[[LocalizationSystem sharedLocalSystem] setLanguage:(language)]
#define LocalizationGetLanguage \
[[LocalizationSystem sharedLocalSystem] getLanguage]
#define LocalizationReset \
[[LocalizationSystem sharedLocalSystem] resetLocalization]
@interface LocalizationSystem : NSObject {
NSString *language;
}
// you really shouldn't care about this functions and use the MACROS
+ (LocalizationSystem *)sharedLocalSystem;
//gets the string localized
- (NSString *)localizedStringForKey:(NSString *)key value:(NSString *)comment;
//sets the language
- (void) setLanguage:(NSString*) language;
//gets the current language
- (NSString*) getLanguage;
//resets this system.
- (void) resetLocalization;
@end