Change React Native application layout check
Reviewed By: shergin Differential Revision: D7076910 fbshipit-source-id: dc6df2dee886bbdf139d6e50192d621efad6d57e
This commit is contained in:
parent
bd30336d86
commit
3eee96ab86
|
@ -5,10 +5,10 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "RCTI18nUtil.h"
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@implementation RCTI18nUtil
|
||||
|
||||
+ (instancetype)sharedInstance
|
||||
|
@ -98,9 +98,8 @@
|
|||
// Check if the current application language is RTL
|
||||
- (BOOL)isApplicationPreferredLanguageRTL
|
||||
{
|
||||
NSString *preferredAppLanguage = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];
|
||||
NSLocaleLanguageDirection direction = [NSLocale characterDirectionForLanguage:preferredAppLanguage];
|
||||
return direction == NSLocaleLanguageDirectionRightToLeft;
|
||||
NSWritingDirection direction = [NSParagraphStyle defaultWritingDirectionForLanguage:nil];
|
||||
return direction == NSWritingDirectionRightToLeft;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue