Guard against referencing undefined array members

Check for the existence of a language name to prevent warning logs such
as "Notice: Undefined index: cz" and "Notice: Undefined index: zh-cfr".

Change-Id: I1cc618a21ebe6c84b3f7fd0895724ac80f158c06