Making it work
This commit is contained in:
parent
2d85779500
commit
b09e088ec3
|
@ -6,8 +6,9 @@
|
|||
// Copyright (c) 2015 Alexander Zaytsev. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTLog.h"
|
||||
|
||||
@interface RNI18n : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
//
|
||||
|
||||
#import "RNI18n.h"
|
||||
#import "RCTBridge.h"
|
||||
|
||||
@interface RNI18n ()
|
||||
-(NSString*) getCurrentLocale;
|
||||
@end
|
||||
|
||||
@implementation RNI18n
|
||||
RCT_EXPORT_MODULE();
|
||||
|
|
9
index.js
9
index.js
|
@ -1,7 +1,8 @@
|
|||
var React = require('react-native');
|
||||
var I18n = require('i18n');
|
||||
var { NativeI18n } = require('react-native').NativeModules;
|
||||
'use strict';
|
||||
|
||||
I18n.locale = NativeI18n.locale;
|
||||
var I18n = require('./vendor/i18n');
|
||||
var { RNI18n } = require('react-native').NativeModules;
|
||||
|
||||
I18n.locale = RNI18n.locale;
|
||||
|
||||
module.exports = I18n;
|
Loading…
Reference in New Issue