Fixed #18419 -- Full backwards compatibility for old language codes

Refs https://code.djangoproject.com/ticket/18419#comment:15