Migrating from the plugin awesome-cordova-plugins/globalization to the Internationalization API

I need to get user system language in order to set default language into my ionic 7 app.

awesome-cordova-plugins/globalization is deprecated plugin and I’d like to integrate Internationalization API.

Tried to integrate it but I receive this error:

    navigator.globalization.getPreferredLanguage(function (language) {          
        console.log('[Global API] language: ' + language.value + '\n');
    }, function () { 
        console.log('[Global API] Error getting language\n'); 
error TS2339: Property 'globalization' does not exist on type 'Navigator'.

40     navigator.globalization.getPreferredLanguage(function (language) {

Could you please help me to use it?