add inner lookup function

lookup is done in this order:
search first in the specified language dictionary, then in the default
language dictionary and finally in the default dictionary