Skip to content

Commit ef60fc4

Browse files
authored
Merge pull request #124 from ropellanda/main
Update language visionOS code
2 parents b2d97b6 + e709536 commit ef60fc4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/RichTextKit/Bundle/Bundle+RichTextKit.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ extension Bundle {
6969
}
7070

7171
func bundlePath(for locale: Locale) -> String? {
72-
bundlePath(named: locale.identifier) ?? bundlePath(named: locale.languageCode)
72+
if #available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) {
73+
bundlePath(named: locale.identifier) ?? bundlePath(named: locale.language.languageCode?.identifier)
74+
} else {
75+
bundlePath(named: locale.identifier) ?? bundlePath(named: locale.languageCode)
76+
}
7377
}
7478

7579
func bundlePath(named name: String?) -> String? {

0 commit comments

Comments
 (0)