fixes #2179 and validates that LANGUAGE_CODE is in LANGUAGES
Merge pull request #2668 from digi604/fix-2179

fixes #2179 and validates that LANGUAGE_CODE is in LANGUAGES