mirror of
https://github.com/status-im/react-native-i18n.git
synced 2025-01-09 19:56:03 +00:00
24 lines
436 B
Objective-C
24 lines
436 B
Objective-C
//
|
|
// RNI18n.m
|
|
// RNI18n
|
|
//
|
|
// Created by Alexander Zaytsev on 14/06/15.
|
|
// Copyright (c) 2015 Alexander Zaytsev. All rights reserved.
|
|
//
|
|
|
|
#import "RNI18n.h"
|
|
|
|
@implementation RNI18n
|
|
RCT_EXPORT_MODULE();
|
|
|
|
-(NSString*) getCurrentLocale{
|
|
NSString *localeString=[[NSLocale currentLocale] localeIdentifier];
|
|
return localeString;
|
|
}
|
|
|
|
- (NSDictionary *)constantsToExport
|
|
{
|
|
return @{ @"locale": [self getCurrentLocale] };
|
|
}
|
|
@end
|