Edited insertTranslations function to accept additional data-i18n-* attributes (label, name, and value); simplified code so set of allowed attributes is only specified once at beginning of function