Skip to content

Commit

Permalink
Fix native translations on iOS 17.5.1 (#4282)
Browse files Browse the repository at this point in the history
* enable translations on iOS 17.5.1

* add comment
  • Loading branch information
mozzius authored May 30, 2024
1 parent a72f55a commit 13c08f5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export function NativeTranslationView() {
return <NativeView />
}

export const isAvailable = Number(Platform.Version) >= 17.4
// can be something like "17.5.1", so just take the first two parts
const version = String(Platform.Version).split('.').slice(0, 2).join('.')

export const isAvailable = Number(version) >= 17.4

// https://en.wikipedia.org/wiki/Translate_(Apple)#Languages
const SUPPORTED_LANGUAGES = [
Expand Down

0 comments on commit 13c08f5

Please sign in to comment.