Move addObserver to a separate function together with the call to requestLocales