diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2009-06-16 07:06:48 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:13:15 +0000 |
commit | 43f3d7f667a56659b4ac4b2e8171fbf8b7cc3c94 (patch) | |
tree | 72ccb2249620bfcd9141772276a5a9025b069a96 /UICaboodle/UCLocalize.h | |
parent | 0dceb29b5b709a6f9cfea52648941a6c2c5ef46b (diff) |
We prefer this factoring.
Diffstat (limited to 'UICaboodle/UCLocalize.h')
-rw-r--r-- | UICaboodle/UCLocalize.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/UICaboodle/UCLocalize.h b/UICaboodle/UCLocalize.h new file mode 100644 index 0000000..ba66655 --- /dev/null +++ b/UICaboodle/UCLocalize.h @@ -0,0 +1,12 @@ +#ifndef UICABOODLE_UCLOCALIZE_H +#define UICABOODLE_UCLOCALIZE_H + +#import <Foundation/Foundation.h> + +static inline NSString *UCLocalizeEx(NSString *key, NSString *value = nil) { + return [[NSBundle mainBundle] localizedStringForKey:key value:value table:nil]; +} + +#define UCLocalize(key) UCLocalizeEx(@ key) + +#endif/*UICABOODLE_UCLOCALIZE_H*/ |