Function addLocaleSubscriber

Add a subscriber to be notified when the locale changes. Returns a function to remove the subscriber

If notifyImmediately is true, the subscriber will be called immediately with the current locale

  • Parameters

    • fn: (locale: string) => void
    • OptionalnotifyImmediately: boolean

    Returns () => void