Refactored default application language logic