diff --git a/Sources/FSPageViewLayout.swift b/Sources/FSPageViewLayout.swift index 9477ac4..282129e 100644 --- a/Sources/FSPageViewLayout.swift +++ b/Sources/FSPageViewLayout.swift @@ -20,6 +20,12 @@ class FSPagerViewLayout: UICollectionViewLayout { return FSPagerViewLayoutAttributes.self } + override var flipsHorizontallyInOppositeLayoutDirection: Bool { + let currentLanguage = String((Bundle.main.preferredLocalizations.first ?? "").prefix(2))?.uppercased() + let rtlLanguages = ["AR", "AZ", "DV", "HE", "KU", "FA", "UR"] + return rtlLanguages.contains(currentLanguage) + } + fileprivate var pagerView: FSPagerView? { return self.collectionView?.superview?.superview as? FSPagerView }