need a helper function first
added 'localizeByMapping' helper function to localize by ids