Yes that’s intentional. Refresh string is not needed if you call get localized string as it generates the string each time,(if using formatting).
I’ll try and make the error message clearer.
It seems like GetLocalizedString is calling in it’s RefreshString in it’s callback, and calling GetLocalizedString without first initializing it with a ChangeHandler causes it to fail.
So the expected flow is to always provide a ChangHandle before calling GetLocalizedString?
Thats really strange. Are you registering a null change handler?
If you just want to use GetLocalizedString then you do not need to use anything to do with ChangeHandlers or RefreshString.
I have added a null check in RegisterChangeHandler.
Discovered the issue, had nothing to do with GetLocalizedString at all. I am using LocalizeStringBehaviour on my main menu. By default it loads the entire scene, which has all of the menu GameObjects active, then deactivates all of them but the active menu. What this functionally results in is a OnEnable call, registering the handler (including the AutomaticLoadingCompleted callback), then instantly disables them, clearing the change handler. This launches the loading operation, but then removes the change handler for it, and AutomaticLoadingCompleted is still subscribed, which results in it calling a RefreshString without that handler.