added function addLoadedLanguage
added parameter $lang to repository->loadField