<commit_before>//
//  LocalizationUtils.swift
//  Pageboy
//
//  Created by <NAME> on 18/06/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

extension UIView {
    
    /// Whether the layout direction of the view is right to left.
    var layoutIsRightToLeft: Bool {
        if #available(iOS 9.0, *) {
            return UIView.userInterfaceLayoutDirection(for: self.semanticContentAttribute) == .rightToLeft
        } else {
            // Fallback on earlier versions
            return false
        }
    }
    
}
<commit_msg>Add RtL language support for iOS 8 fallback<commit_after>//
//  LocalizationUtils.swift
//  Pageboy
//
//  Created by <NAME> on 18/06/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

extension UIView {
    
    /// Whether the layout direction of the view is right to left.
    var layoutIsRightToLeft: Bool {
        if #available(iOS 9.0, *) {
            return UIView.userInterfaceLayoutDirection(for: self.semanticContentAttribute) == .rightToLeft
        } else {
            return UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft
        }
    }
    
}

{'fraction_non_alphanumeric': 0.10086206896551723, 'fraction_numerical': 0.025, 'mean_word_length': 2.225, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1684816', 'n_tokens_mistral': 363, 'n_tokens_neox': 333, 'n_words': 98}