Does the localization system not already do what you want it to? I really don't know the answer, but often with this sort of thing APple has just done the right thing and it is already to go out of the box.
I know that NSTextArea can already handle this, but don't know about