I just tested this on Safari, Version 7.0 (9537.71), and the regex seemed to fail.

Would this work:

```javascript
    navigatorLanguage.replace(/\-\w+$/g, '');
```