#1, #3: Added docstrings to _get_localized_fn(). Fixed few bugs.
#1, #9: Added tests of the _get_localized_fn().