79216324

Date: 2024-11-22 19:21:41
Score: 1
Natty:
Report link
import {Settings,I18nManager} from 'react-native';//Settings only for IOS
export const GetLAng=()=>{
    var locale='?????';
    if (Platform.OS === 'ios') {
        locale = Settings.get('AppleLocale') || Settings.get('AppleLanguages')[0];
    } else {
        locale = I18nManager.getConstants().localeIdentifier;
    }   
    console.log( locale );
    return(
        <View style={[]} >
            <Text style={[]} >{locale}</Text>
        </View>
    )
}
Reasons:
  • Blacklisted phrase (1): ???
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Hakan