Fix template error

Missing an 's'
Fix variable name typo
Switch defaults to numbers instead of strings

The quoting functionality assumes that if we want them as numbers in the
javascript then we feed them to the Python dict as numbers, not strings.
Improve language handling

As explained in the comments we attempt to convert from Django's
'language_countryCode' format that comes from 'get_language' to the
two letter language code that the Javascript is expecting.

To smooth the transition we store the available languages from the
javascript files in a set and try to match one if we possibly can by
checking first the language_countryCode and then the language by
splitting the former on '-'.

For non-i18n code paths we just leave the language entry in the options
as is. Expecting the user to get it right from the Python end if they
want something other than the default 'en'.
Merge branch 'fixes'