- Fix PNInstallation
This commit is contained in:
1 parent
1df32f64a7
commit
7752bf3e18
51 files changed
+14486
-12301
No files matched your search
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// DJLocalizationSystem.h
|
||||
// DJLocalization
|
||||
//
|
||||
// Created by David Jennes on 15/02/15.
|
||||
// Copyright (c) 2015. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
// replace Apple's macros with our own
|
||||
#undef NSLocalizedString
|
||||
#define NSLocalizedString(key, comment) \
|
||||
[DJLocalizationSystem.shared localizedStringForKey:(key) value: @"" table: nil]
|
||||
|
||||
#undef NSLocalizedStringFromTable
|
||||
#define NSLocalizedStringFromTable(key, tbl, comment) \
|
||||
[DJLocalizationSystem.shared localizedStringForKey:(key) value:@"" table:(tbl)]
|
||||
|
||||
@interface DJLocalizationSystem : NSObject
|
||||
|
||||
/*!
|
||||
* Get the system's global instance
|
||||
*
|
||||
* @return A localization system instance
|
||||
*/
|
||||
+ (instancetype)shared;
|
||||
|
||||
/*!
|
||||
* Get the localized string for a given key/value
|
||||
*
|
||||
* @param key The localization key
|
||||
* @param comment The localization value
|
||||
* @param tableName The localization table name
|
||||
* @return The localized string
|
||||
*/
|
||||
- (NSString *)localizedStringForKey:(NSString *)key value:(NSString *)comment table:(NSString *)tableName;
|
||||
|
||||
/*!
|
||||
* Get the localized string for a given key/value in the specified bundle
|
||||
*
|
||||
* @param key The localization key
|
||||
* @param comment The localization value
|
||||
* @param bundle The bundle to search in
|
||||
* @return The localized string
|
||||
*/
|
||||
- (NSString *)localizedStringForKey:(NSString *)key value:(NSString *)comment table:(NSString *)tableName bundle:(NSBundle *)bundle;
|
||||
|
||||
/*!
|
||||
* Reset the localization to the system's default language
|
||||
*/
|
||||
- (void)resetLocalization;
|
||||
|
||||
/*!
|
||||
* The bundle for the currently active language
|
||||
*/
|
||||
@property (nonatomic, readonly) NSBundle *bundle;
|
||||
|
||||
/*!
|
||||
* The currently active language
|
||||
*/
|
||||
@property (nonatomic, strong) NSString *language;
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user