Check DIR_LANGUAGES_CORE if $local file not found

Check DIR_LANGUAGES_CORE if $local file not found in DIR_LANGUAGES

- Refactor to flatten for new code and readability
Merge pull request #1143 from mkly/check_core_language_directory

Check DIR_LANGUAGES_CORE if $local file not found