Fixed issue with multiple locales in TranslatableMapBuilder

This PR solves an issue with multiple locales of Resource Element. 
Previously only first one localization was set to the database.
@bartekgruszka please try to refactor this method and make it more clearer to read. Maybe try to extract some parts of it to smaller private methods.