diff --git a/React/Modules/RCTI18nUtil.m b/React/Modules/RCTI18nUtil.m index 183b4c498..804154e2a 100644 --- a/React/Modules/RCTI18nUtil.m +++ b/React/Modules/RCTI18nUtil.m @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -#import - #import "RCTI18nUtil.h" +#import + @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