28 lines
494 B
Mathematica
Raw Permalink Normal View History

2015-06-14 17:47:18 +07:00
//
// RNI18n.m
// RNI18n
//
// Created by Alexander Zaytsev on 14/06/15.
// Copyright (c) 2015 Alexander Zaytsev. All rights reserved.
//
#import "RNI18n.h"
2015-06-14 18:01:41 +07:00
2015-06-14 19:14:02 +07:00
@interface RNI18n ()
-(NSString*) getCurrentLocale;
@end
2015-06-14 17:47:18 +07:00
@implementation RNI18n
RCT_EXPORT_MODULE();
-(NSString*) getCurrentLocale{
NSString *localeString=[[NSLocale currentLocale] localeIdentifier];
return localeString;
}
- (NSDictionary *)constantsToExport
{
return @{ @"locale": [self getCurrentLocale] };
}
@end