Yes, but you don't need to modify the localization class to do what you're trying to do.
That function will work just the same inside your own class rather than being a part of the localization. Now, if you were to add a custom delegate to the localization class that would be called before setting each text, then it would make sense to modify the localization class.