HomePhabricator

Use Language::isSupportedLanguage for language code validation

Description

Use Language::isSupportedLanguage for language code validation

Aforementioned function is faster and available since 1.21 so we
can start using it. In addition it is needed to fix T104987.

Made it so that default value is empty string instead of null
because the language validations barf at null.

Bug: T104987
Change-Id: Ie944f5c8af0c825546f9fab660451f41ab7dde3c