Making it work

This commit is contained in:
Alexander Zaytsev 2015-06-14 19:14:02 +07:00
parent 2d85779500
commit b09e088ec3
4 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -7,8 +7,10 @@
//
#import "RNI18n.h"
#import "RCTBridge.h"
@interface RNI18n ()
-(NSString*) getCurrentLocale;
@end
@implementation RNI18n
RCT_EXPORT_MODULE();

View File

@ -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;

View File