This API endpoint is one way to do it.  Another way is to simply return `langs` in the `update_languages` view to the template directly, then iterate in template code there.

Just different strategies; no change necessary.