mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
12
src/helpers/getLanguage.ts
Normal file
12
src/helpers/getLanguage.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { store } from '@root/store'
|
||||
import { getSettingsLanguage } from '@utils/slices/settingsSlice'
|
||||
import * as Localization from 'expo-localization'
|
||||
import { Platform } from "react-native"
|
||||
|
||||
const getLanguage = (): string => {
|
||||
return Platform.OS === 'ios'
|
||||
? Localization.locale
|
||||
: getSettingsLanguage(store.getState())
|
||||
}
|
||||
|
||||
export default getLanguage
|
Reference in New Issue
Block a user