Skip to content

Commit

Permalink
Making it work
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderZaytsev committed Jun 14, 2015
1 parent 2d85779 commit b09e088
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion RNI18n/RNI18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion RNI18n/RNI18n.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
//

#import "RNI18n.h"
#import "RCTBridge.h"

@interface RNI18n ()
-(NSString*) getCurrentLocale;
@end

@implementation RNI18n
RCT_EXPORT_MODULE();
Expand Down
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -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;
File renamed without changes.

0 comments on commit b09e088

Please sign in to comment.