handeling the localize() in a class function better in case of missing key