File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 55 * LICENSE file in the root directory of this source tree.
66 */
77
8- #import < Foundation/Foundation.h>
9-
108#import " RCTI18nUtil.h"
119
10+ #import < UIKit/UIKit.h>
11+
1212@implementation RCTI18nUtil
1313
1414+ (instancetype )sharedInstance
@@ -98,9 +98,8 @@ - (BOOL)isDevicePreferredLanguageRTL
9898// Check if the current application language is RTL
9999- (BOOL )isApplicationPreferredLanguageRTL
100100{
101- NSString *preferredAppLanguage = [[[NSBundle mainBundle ] preferredLocalizations ] objectAtIndex: 0 ];
102- NSLocaleLanguageDirection direction = [NSLocale characterDirectionForLanguage: preferredAppLanguage];
103- return direction == NSLocaleLanguageDirectionRightToLeft;
101+ NSWritingDirection direction = [NSParagraphStyle defaultWritingDirectionForLanguage: nil ];
102+ return direction == NSWritingDirectionRightToLeft;
104103}
105104
106105@end
You can’t perform that action at this time.
0 commit comments